Ver código fonte

respect required keyword in checkboxes

master
Dom SP 2 anos atrás
pai
commit
171263c26b
1 arquivos alterados com 2 adições e 1 exclusões
  1. +2
    -1
      app/views/form.htm

+ 2
- 1
app/views/form.htm Ver arquivo

@@ -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>

Carregando…
Cancelar
Salvar