checkbox.tpl 876 B

1234567891011121314151617
  1. {if $enableLabel}
  2. <label for="{$formName}_{$name}" class="col-sm-3 control-label">{$MGLANG->T('label')}</label>
  3. {/if}
  4. <div class="checkbox col-sm-{$colWidth}" {if $addIDs}id="{$addIDs}_{$name}"{/if}>
  5. {foreach from=$options item=option key=opValue}
  6. <div class="checkbox">
  7. <label>
  8. <input type="checkbox" {if is_array($opValue) && in_array($opValue,$value)}checked="checked"{/if} name="{$nameAttr}[]" value="{$opValue}" {if $disabled}disabled="disabled"{/if} {foreach from=$dataAttr key=dataKey item=dataValue}data-{$dataKey}="{$dataValue}"{/foreach}/>
  9. {$option}
  10. </label>
  11. </div>
  12. {/foreach}
  13. {if $enableDescription}
  14. <span class="help-block">{$MGLANG->T('description')}</span>
  15. {/if}
  16. <span class="help-block error-block"{if !$error}style="display:none;"{/if}>{$error}</span>
  17. </div>