-
Notifications
You must be signed in to change notification settings - Fork 3
/
globalFormAttributes.hbs
25 lines (25 loc) · 1.02 KB
/
globalFormAttributes.hbs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
{{#if id}} id="{{id}}"{{/if}}
{{#if name}} name="{{name}}"{{/if}}
{{#if value}} value="{{value}}"{{/if}}
{{#if error}} invalid aria-invalid="true"{{/if}}
{{#if error}} aria-describedby="error-{{id}}"{{/if}}
{{#unless optional}} required aria-required="true"{{/unless}}
{{#if disabled}} disabled{{/if}}
{{#if readonly}} readonly{{/if}}
{{#if checked}} checked{{/if}}
{{#if maxlength}} maxlength="{{maxlength}}"{{/if}}
{{#if minlength}} minlength="{{minlength}}"{{/if}}
{{#unless autocomplete}} autocomplete="off"{{/unless}}
{{#if autocomplete}} autocomplete="{{autocomplete}}"{{/if}}
{{#if spellcheck}} spellcheck="{{spellcheck}}"{{/if}}
{{#if novalidate}} novalidate{{/if}}
{{#if datalist.id}} list="{{datalist.id}}"{{/if}}
{{#if accept}} accept="{{accept}}"{{/if}}
{{#if multiple}} multiple{{/if}}
{{#if capture}} capture="{{capture}}"{{/if}}
{{#if rows}} rows="{{rows}}"{{/if}}
{{#if cols}} cols="{{cols}}"{{/if}}
{{#if pattern}} pattern="{{pattern}}"{{/if}}
{{#if dataAttrs}}
{{#each dataAttrs}} data-{{@key}}="{{this}}"{{/each}}
{{/if}}