Sfoglia il codice sorgente

respect required keyword in checkboxes

master
Dom SP 2 anni fa
parent
commit
171263c26b
1 ha cambiato i file con 2 aggiunte e 1 eliminazioni
  1. +2
    -1
      app/views/form.htm

+ 2
- 1
app/views/form.htm Vedi File

@@ -46,7 +46,8 @@
id="{{ sprintf('%s[%s]',@name,@key) }}"
name="{{ sprintf('%s[%s]',@name,@key) }}"
value="true"
{{ is_array(@info.checked) ? (in_array(@key,@info.checked) ? 'checked' : '') : (!strcmp(@key,@info.checked) ? 'checked' : '') }} />
{{ is_array(@info.checked) ? (in_array(@key,@info.checked) ? 'checked' : '') : (!strcmp(@key,@info.checked) ? 'checked' : '') }}
{{ is_array(@info.required) ? (in_array(@key,@info.required) ? 'required' : '') : (!strcmp(@key,@info.required) ? 'required' : '') }} />
<label for="{{ sprintf('%s[%s]',@name,@key) }}">
{{ @val }}</label><br>
</repeat>

Loading…
Annulla
Salva