made method checkbox IDs a bit shorter
This commit is contained in:
parent
efe748ad3e
commit
b2007bfc66
1 changed files with 5 additions and 5 deletions
|
@ -4,12 +4,12 @@
|
||||||
{%- assign tag = "h4" -%}
|
{%- assign tag = "h4" -%}
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
<{{tag}}>Method</{{tag}}>
|
<{{tag}}>Method</{{tag}}>
|
||||||
{%- assign name = page.name | downcase | url_encode -%}
|
{%- assign prefix = page.id | downcase | split: "/" | last | url_encode | prepend: "cb-" -%}
|
||||||
<ol class='method' data-cb-prefix='check-{{ name }}'>
|
<ol class='method' data-cb-prefix='{{ prefix }}'>
|
||||||
{% assign i = 1 -%}
|
{% assign i = 1 -%}
|
||||||
{%- for item in page.method -%}
|
{%- for item in page.method -%}
|
||||||
<li><input id='check-{{ name }}-{{ i }}' class='method-checkbox' data-number='{{ i }}' type='checkbox'><label for='check-{{ name }}-{{ i }}'>{{ item }}</label></li>
|
<li><input id='{{ prefix }}-{{ i }}' class='method-checkbox' data-number='{{ i }}' type='checkbox'><label for='{{ prefix }}-{{ i }}'>{{ item }}</label></li>
|
||||||
{%- assign i = i | plus: 1 -%}
|
{% assign i = i | plus: 1 -%}
|
||||||
{% endfor %}
|
{%- endfor %}
|
||||||
</ol>
|
</ol>
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
|
|
Loading…
Reference in a new issue