diff --git a/app/Core/Widget/@form.latte b/app/Core/Widget/@form.latte index f38ae46..6590258 100644 --- a/app/Core/Widget/@form.latte +++ b/app/Core/Widget/@form.latte @@ -1,8 +1,8 @@ -{var string $class = ''} +{varType string $class} {varType string $name} {varType Nette\Application\UI\Form $form} -
+ @@ -12,20 +12,14 @@
{* General form field definition (input, select, textarea, submit) using switch *} -{define input, string $type, string $name, int $columns = 12, string $class = '', int $rows = 3} +{define input, string $type, string $name, int $columns = 12, string $class, int $rows = 3}
- - {* Bootstrap classes for form elements *} - {var $text = 'form-control'} - {var $select = 'form-select'} - {var $submit = 'btn btn-primary'} - {label $name, class: 'form-label' /} {switch $type} - {case 'text'}{input $name, class: $class ? "$text $class" : $text} - {case 'select'}{input $name, class: $class ? "$select $class" : $select} - {case 'textarea'}{input $name, class: $class ? "$text $class" : $text, rows: $rows} - {case 'submit'}{input $name, class: $class ? "$submit $class" : $submit} + {case 'text'} + {case 'select'} + {case 'textarea'} + {case 'submit'}