CSV import, also from file, and more UX improvements

This commit is contained in:
2018-08-10 20:19:16 +02:00
parent 1e183f5059
commit a3df7a724c
18 changed files with 371 additions and 155 deletions
+18
View File
@@ -38,6 +38,19 @@ class WidgetFactory
"</div>";
}
public function labeledPar($label, $text, $extraClasses='', $escape=true)
{
if (false === strpos($extraClasses, 'mb-')) $extraClasses .= ' mb-2';
return
"<div class=\"row\">".
"<label class=\"text-md-right col-form-label col-md-$this->labelCols\">".e($label)."</label>".
"<p class=\"form-control-plaintext col-md-$this->fieldCols".e($extraClasses)."\">".
($escape ? e($text) : $text) .
"</p>".
"</div>";
}
/**
* Convert the given string to a-href if it is a link.
*
@@ -85,6 +98,11 @@ class WidgetFactory
return $this->baseWidget('input', $name, $label)->type('email');
}
public function file($name, $label)
{
return $this->baseWidget('input', $name, $label)->type('file');
}
public function checkbox($name, $label)
{
return (new CheckboxWidget('checkbox', $name, $label))