Version 4.5.0
This commit is contained in:
1 parent
1a0c7fd3c2
commit
f79dcf067a
3791 files changed
+248032
-76372
No files matched your search
@@ -0,0 +1,52 @@
|
||||
<ips:template parameters="$name, $value, $required, $options, $multiple=FALSE, $class='', $disabled=FALSE, $toggles=array(), $id=NULL, $unlimited=NULL, $unlimitedLang='all', $unlimitedToggles=array(), $toggleOn=TRUE, $descriptions=array()" />
|
||||
{{if $multiple}}
|
||||
<input type="hidden" name="{$name}[__EMPTY]" value="__EMPTY">
|
||||
{{endif}}
|
||||
{{if $unlimited !== NULL}}
|
||||
<div data-control="granularCheckboxset">
|
||||
<div data-role="checkboxsetUnlimited" class="{{if !\is_array( $value )}}ipsJS_show{{else}}ipsHide{{endif}}">
|
||||
<input
|
||||
type='checkbox'
|
||||
name="{expression="trim( $name, '[]' )"}_unlimited"
|
||||
value='{$unlimited}'
|
||||
id="{expression="trim( $id ?: $name, '[]' )"}_unlimited"
|
||||
{{if $unlimited === $value}}checked aria-checked='true'{{else}}aria-checked='false'{{endif}}
|
||||
{{if $disabled}}disabled aria-disabled='true'{{endif}}
|
||||
data-ipsToggle
|
||||
data-role="checkboxsetUnlimitedToggle"
|
||||
>
|
||||
|
||||
{lang="or"}
|
||||
|
||||
<a class="ipsCursor_pointer" data-action="checkboxsetCustomize">{lang="customize"}</a>
|
||||
</div>
|
||||
{{endif}}
|
||||
<div data-role="checkboxsetGranular" class="{{if $unlimited !== NULL and !\is_array( $value )}}ipsJS_hide{{endif}}">
|
||||
<ul class="ipsField_fieldList">
|
||||
{{foreach $options as $k => $v}}
|
||||
<li>
|
||||
<span class='ipsCustomInput'>
|
||||
<input type="checkbox" {{if $class}}class="{$class}"{{endif}} name="{$name}[{$k}]" value="1" {{if ( $unlimited !== NULL AND $unlimited === $value ) or ( \is_array( $value ) AND \in_array( $k, $value ) )}}checked{{endif}} {{if $disabled === TRUE or ( \is_array( $disabled ) and \in_array( $k, $disabled ) )}}disabled{{endif}} {{if isset( $toggles[ $k ] ) and !empty( $toggles[ $k ] )}}data-control="toggle" {{if $toggleOn === FALSE}}data-togglesOff{{else}}data-togglesOn{{endif}}="{expression="implode( ',', $toggles[ $k ] )"}"{{endif}} id="elCheckbox_{$name}_{$k}">
|
||||
<span></span>
|
||||
</span>
|
||||
<div class='ipsField_fieldList_content'>
|
||||
<label for='elCheckbox_{$name}_{$k}' id='elField_{$name}_label'>{$v|raw}</label>
|
||||
{{if isset( $descriptions[ $k ] )}}
|
||||
<br>
|
||||
<span class='ipsFieldRow_desc'>
|
||||
{$descriptions[ $k ]|raw}
|
||||
</span>
|
||||
{{endif}}
|
||||
</div>
|
||||
</li>
|
||||
{{endforeach}}
|
||||
</ul>
|
||||
{{if $unlimited !== NULL}}
|
||||
<div class="ipsSpacer_top ipsSpacer_half">
|
||||
{lang="or"}
|
||||
|
||||
<a class="ipsCursor_pointer" data-action="checkboxsetAll">{lang="all"}</a> / <a class="ipsCursor_pointer" data-action="checkboxsetNone">{lang="none"}</a>
|
||||
</div>
|
||||
</div>
|
||||
{{endif}}
|
||||
</div>
|
||||
Reference in new issue
Block a user