id="{$ui.id}"
action="{$ui.action}"
method="{$ui.method}"
- {if $ui.file}enctype="multipart/form-data"{/if}
+ {if !empty($ui.file)}enctype="multipart/form-data"{/if}
data-abide novalidate data-validate-on-blur="true">
<label>{$ui.label}</label>
{if isset($ui.list) && $ui.list}
{foreach $ui.list as $checkbox => $checkboxLabel}
- <label class="{if $ui.reouired} glm-required{/if}">
+ <label class="{if !empty($ui.reouired)}glm-required{/if}">
<input
type="checkbox"
id="{$checkbox}"
{/foreach}
{/if}
- {if $ui.dataError}<span class="form-error is-visible">{$ui.dataError}</span>{/if}
- {if isset($ui.helpText)}<p class="help-text" id="{$field}_HelpText">{$ui.helpText}</p>{/if}
- {if isset($ui.errorText)}<span id="{$field}_ErrorText" class="form-error">{$ui.errorText}</span>{/if}
+ {if !empty($ui.dataError)}<span class="form-error is-visible">{$ui.dataError}</span>{/if}
+ {if !empty($ui.helpText)}<p class="help-text" id="{$ui.field}_HelpText">{$ui.helpText}</p>{/if}
+ {if !empty($ui.errorText)}<span id="{$ui.field}_ErrorText" class="form-error">{$ui.errorText}</span>{/if}
</div>
--- /dev/null
+{*
+ Foundation 6 Submit Button
+
+ Button Colors:
+ primary = blue
+ secondary = grey
+ success = green
+ alert = red
+ warning = yellow
+
+ {$ui = [
+ 'id' => string Optional The id for button,
+ 'type' => string Optional Type for button,
+ 'label' => string Required Name of the Button Label,
+ 'class' => string Default Primary class (primary, secondary, alert, success, warning)
+ ]}
+*}
+<button
+ {if !empty($ui.type)}type="{$ui.type}"{/if}
+ {if !empty($ui.id)}id="{$ui.id}"{/if}
+ class="button {$ui.class|default:'primary'}"
+ >
+ {$ui.label}
+</button>