Skip to content

Commit 9ad9cbd

Browse files
Convert checkbox subtemplate markup to bootstrap
1 parent d2b2f25 commit 9ad9cbd

File tree

1 file changed

+13
-10
lines changed

1 file changed

+13
-10
lines changed

html-templates/subtemplates/forms.tpl

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -37,21 +37,24 @@
3737
{/template}
3838

3939
{template checkbox inputName value label='' error='' hint='' attribs='' default=null class=null unsetValue=null}
40-
<div class="form-group">
41-
{capture assign=html}
40+
<div class="checkbox">
41+
{if $unsetValue !== null}
42+
<input type="hidden" name="{$inputName|escape}" value="{$unsetValue|escape}">
43+
{/if}
44+
45+
<label>
4246
<input type="checkbox"
43-
class="field-control form-control {$class}"
47+
class="{$class}"
4448
name="{$inputName|escape}"
4549
value="{$value|escape}"
4650
{$attribs}
4751
{refill field=$inputName default=$default checked=$value}>
48-
{/capture}
49-
50-
{if $unsetValue !== null}
51-
<input type="hidden" name="{$inputName|escape}" value="{$unsetValue|escape}">
52-
{/if}
53-
54-
{labeledField html=$html type=checkbox label=$label error=$error hint=$hint required=$required}
52+
53+
{$label}
54+
</label>
55+
56+
{if $error}<p class="error-text">{$error}</p>{/if}
57+
{if $hint}<p class="hint help-block">{$hint}</p>{/if}
5558
</div>
5659
{/template}
5760

0 commit comments

Comments
 (0)