basic profile edit page, not working yet

This commit is contained in:
2018-07-22 20:49:22 +02:00
parent 96efa3fa15
commit ddb885b4e2
11 changed files with 96 additions and 18 deletions
+1 -1
View File
@@ -119,7 +119,7 @@ class Widget
// add a compiled list of styles
if (!empty($this->styleArray)) {
$attribs_s .= 'style="'.trim(e(array_reduce(array_keys($this->styleArray), function ($carry, $key) {
$attribs_s .= ' style="'.trim(e(array_reduce(array_keys($this->styleArray), function ($carry, $key) {
return $carry . $key . ': ' . $this->styleArray[$key] . '; ';
}, ''))).'"';
}
+14
View File
@@ -14,6 +14,20 @@ class WidgetFactory
$this->fieldCols = $fieldCols;
}
public function header($hx, $text)
{
return "<div class=\"row\">".
"<h$hx class=\"col-md-$this->fieldCols offset-md-$this->labelCols\">".e($text)."</h$hx>".
"</div>";
}
public function par($text)
{
return "<div class=\"row\">".
"<p class=\"col-md-$this->fieldCols offset-md-$this->labelCols\">".e($text)."</o>".
"</div>";
}
private function baseWidget($view, $name, $label)
{
return (new Widget($view, $name, $label))->layout($this->labelCols, $this->fieldCols);