use proper names for new form fields

This commit is contained in:
philipp 2023-10-30 09:31:22 +01:00
parent 010a8a870b
commit e256d7274d
2 changed files with 3 additions and 3 deletions

View File

@ -198,7 +198,7 @@ function initNewChoice(select: HTMLInputElement) {
const name = event.detail.label;
if (event.detail.customProperties.is_cox) {
const coxSelect = <HTMLSelectElement>document.querySelector('#cox');
const coxSelect = <HTMLSelectElement>document.querySelector('#shipmaster');
if (coxSelect){
coxSelect.add(new Option(name, user_id));
}
@ -215,7 +215,7 @@ function initNewChoice(select: HTMLInputElement) {
const user_id = event.detail.value;
const coxSelect = <HTMLSelectElement>document.querySelector('#cox');
const coxSelect = <HTMLSelectElement>document.querySelector('#shipmaster');
if (coxSelect) {
for (var i=0; i<coxSelect.length; i++) {
if (coxSelect.options[i].value == user_id)

View File

@ -41,7 +41,7 @@
{% if not only_ones %}
{{ log::rower_select(id="newrower", selected=[], class="col-span-4", init=true) }}
{% endif %}
{{ macros::select(label="Schiffsführer", data=[], name='cox', wrapper_class="col-span-2") }}
{{ macros::select(label="Schiffsführer", data=[], name='shipmaster', wrapper_class="col-span-2") }}
{{ macros::select(label="Steuerperson", data=[], name='steering_person', wrapper_class="col-span-2") }}
{{ macros::input(label='Abfahrtszeit', name='departure', type='datetime-local', required=true, wrapper_class='col-span-2') }}
{{ macros::input(label='Ankunftszeit', name='arrival', type='datetime-local', wrapper_class='col-span-2') }}