Compare commits
2 Commits
5e01965d7e
...
46fe90c867
Author | SHA1 | Date |
---|---|---|
jordi fita mas | 46fe90c867 | |
jordi fita mas | b30aeb5d49 |
|
@ -270,6 +270,9 @@ type ToggleField struct {
|
|||
|
||||
func (field *ToggleField) FillValue(r *http.Request) {
|
||||
field.Selected = strings.TrimSpace(r.FormValue(field.Name))
|
||||
if field.Selected != field.FirstOption.Value && field.Selected != field.SecondOption.Value {
|
||||
field.Selected = field.FirstOption.Value
|
||||
}
|
||||
}
|
||||
|
||||
type FormValidator struct {
|
||||
|
|
3
po/ca.po
3
po/ca.po
|
@ -8,7 +8,7 @@ msgid ""
|
|||
msgstr ""
|
||||
"Project-Id-Version: numerus\n"
|
||||
"Report-Msgid-Bugs-To: jordi@tandem.blog\n"
|
||||
"POT-Creation-Date: 2023-04-15 04:00+0200\n"
|
||||
"POT-Creation-Date: 2023-04-15 20:39+0200\n"
|
||||
"PO-Revision-Date: 2023-01-18 17:08+0100\n"
|
||||
"Last-Translator: jordi fita mas <jordi@tandem.blog>\n"
|
||||
"Language-Team: Catalan <ca@dodds.net>\n"
|
||||
|
@ -640,7 +640,6 @@ msgid "To Date"
|
|||
msgstr "Fins la data"
|
||||
|
||||
#: pkg/invoices.go:191
|
||||
#, fuzzy
|
||||
msgctxt "input"
|
||||
msgid "Tags Condition"
|
||||
msgstr "Condició de les etiquetes"
|
||||
|
|
2
po/es.po
2
po/es.po
|
@ -7,7 +7,7 @@ msgid ""
|
|||
msgstr ""
|
||||
"Project-Id-Version: numerus\n"
|
||||
"Report-Msgid-Bugs-To: jordi@tandem.blog\n"
|
||||
"POT-Creation-Date: 2023-04-15 04:00+0200\n"
|
||||
"POT-Creation-Date: 2023-04-15 20:39+0200\n"
|
||||
"PO-Revision-Date: 2023-01-18 17:45+0100\n"
|
||||
"Last-Translator: jordi fita mas <jordi@tandem.blog>\n"
|
||||
"Language-Team: Spanish <es@tp.org.es>\n"
|
||||
|
|
|
@ -97,7 +97,9 @@
|
|||
{{- /*gotype: dev.tandem.ws/tandem/numerus/pkg.ToggleField*/ -}}
|
||||
<fieldset class="input{{ if .Errors }} has-errors{{ end }}" is="numerus-toggle">
|
||||
<legend>{{ .Label }}</legend>
|
||||
<label><input type="radio" name="{{ .Name }}" value="{{ .FirstOption.Value }}" {{ if eq .Selected .FirstOption.Value}}checked{{ end }}> {{ .FirstOption.Label }}</label>
|
||||
<label><input type="radio" name="{{ .Name }}" value="{{ .SecondOption.Value }}" {{ if eq .Selected .SecondOption.Value}}checked{{ end }}> {{ .SecondOption.Label }}</label>
|
||||
<label><input type="radio" name="{{ .Name }}" value="{{ .FirstOption.Value }}"
|
||||
{{ if eq .Selected .FirstOption.Value }}checked{{ end }}> {{ .FirstOption.Label }}</label>
|
||||
<label><input type="radio" name="{{ .Name }}" value="{{ .SecondOption.Value }}"
|
||||
{{ if eq .Selected .SecondOption.Value }}checked{{ end }}> {{ .SecondOption.Label }}</label>
|
||||
</fieldset>
|
||||
{{- end }}
|
||||
|
|
Loading…
Reference in New Issue