CSV import, also from file, and more UX improvements
This commit is contained in:
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user