fradrive/templates/widgets/form.hamlet
2018-10-03 13:09:25 +02:00

16 lines
654 B
Plaintext

$newline never
#{fragment}
$case formLayout
$of FormStandard
$forall view <- views
$# TODO: add class 'form-group--submit' if this is the submit-button view
<div .form-group :fvRequired view:.form-group--required :not $ fvRequired view:.form-group--optional :isJust $ fvErrors view:.form-group--has-error>
$if not (Blaze.null $ fvLabel view)
<label .form-group__label for=#{fvId view}>#{fvLabel view}
<div .form-group__input>
^{fvInput view}
$maybe tooltip <- fvTooltip view
<div .js-tooltip>
<div .tooltip__handle>
<div .tooltip__content>^{tooltip}