Use lang-selector template for location.gohtml

This commit is contained in:
jordi fita mas 2024-01-24 00:48:30 +01:00
parent 28ab22bc22
commit 937628ca9a
1 changed files with 2 additions and 12 deletions

View File

@ -18,12 +18,7 @@
{{ with .Directions -}} {{ with .Directions -}}
<fieldset> <fieldset>
<legend>{{( pgettext "Directions" "input" )}}</legend> <legend>{{( pgettext "Directions" "input" )}}</legend>
<div class="lang-selector" role="toolbar"> {{ template "lang-selector" . }}
{{ range $lang, $input := . -}}
<button :aria-pressed="lang === '{{ $lang }}'"
@click.prevent="lang = '{{ $lang }}'">{{ $lang }}</button>
{{- end }}
</div>
{{ range $lang, $input := . -}} {{ range $lang, $input := . -}}
<label x-cloak x-show="lang === '{{ $lang }}'"><span>{{ $lang }}</span><br> <label x-cloak x-show="lang === '{{ $lang }}'"><span>{{ $lang }}</span><br>
<textarea class="html" <textarea class="html"
@ -36,12 +31,7 @@
{{ with .OpeningDates -}} {{ with .OpeningDates -}}
<fieldset> <fieldset>
<legend>{{( pgettext "Opening Dates" "input" )}}</legend> <legend>{{( pgettext "Opening Dates" "input" )}}</legend>
<div class="lang-selector" role="toolbar"> {{ template "lang-selector" . }}
{{ range $lang, $input := . -}}
<button :aria-pressed="lang === '{{ $lang }}'"
@click.prevent="lang = '{{ $lang }}'">{{ $lang }}</button>
{{- end }}
</div>
{{ range $lang, $input := . -}} {{ range $lang, $input := . -}}
<label x-cloak x-show="lang === '{{ $lang }}'"><span>{{ $lang }}</span><br> <label x-cloak x-show="lang === '{{ $lang }}'"><span>{{ $lang }}</span><br>
<textarea class="html" <textarea class="html"