diff --git a/web/locales/cs/main.ftl b/web/locales/cs/main.ftl index 7ddb76af..8e12e901 100644 --- a/web/locales/cs/main.ftl +++ b/web/locales/cs/main.ftl @@ -661,6 +661,7 @@ builder-choose-profile = Vyberte profil builder-new-profile = Nový profil… builder-new-profile-name = Název nového profilu builder-accounting-currency = Účetní měna +builder-accounting-currency-hint = Účetnictví se zatím vede v EUR — ostatní měny jsou v seznamu, ale server je zatím odmítá. builder-table-name = Název tabulky builder-add-column-heading = Přidat sloupec builder-add-column-button = Přidat sloupec diff --git a/web/locales/en/main.ftl b/web/locales/en/main.ftl index 053c9361..ee5544f8 100644 --- a/web/locales/en/main.ftl +++ b/web/locales/en/main.ftl @@ -648,6 +648,7 @@ builder-choose-profile = Choose a profile builder-new-profile = New profile… builder-new-profile-name = New profile name builder-accounting-currency = Accounting currency +builder-accounting-currency-hint = Books are kept in EUR for now — other currencies are listed but the server still refuses them. builder-table-name = Table name builder-add-column-heading = Add a column builder-add-column-button = Add column diff --git a/web/locales/sk/main.ftl b/web/locales/sk/main.ftl index 6a4b4774..8a0e224f 100644 --- a/web/locales/sk/main.ftl +++ b/web/locales/sk/main.ftl @@ -661,6 +661,7 @@ builder-choose-profile = Vyberte profil builder-new-profile = Nový profil… builder-new-profile-name = Názov nového profilu builder-accounting-currency = Účtovná mena +builder-accounting-currency-hint = Účtovníctvo sa zatiaľ vedie v EUR — ostatné meny sú v zozname, ale server ich ešte odmieta. builder-table-name = Názov tabuľky builder-add-column-heading = Pridať stĺpec builder-add-column-button = Pridať stĺpec diff --git a/web/src/pages/admin/table_definition/logic.rs b/web/src/pages/admin/table_definition/logic.rs index 87685c31..519738d6 100644 --- a/web/src/pages/admin/table_definition/logic.rs +++ b/web/src/pages/admin/table_definition/logic.rs @@ -529,7 +529,18 @@ pub(crate) async fn copy_profile( let request = CopyProfileRequest { source_profile_name: form.profile.clone(), target_profile_name: form.target_profile_name.trim().to_string(), - table_names: form.table_names.clone(), + // No table selected means the whole profile, which is what the hint + // promises and what the server does with an empty list. A browser + // sends no `table_names` key at all when nothing is ticked; anything + // posting the field empty would otherwise send one blank name, and + // the server rejects a blank name rather than reading it as "all". + table_names: form + .table_names + .iter() + .map(|name| name.trim()) + .filter(|name| !name.is_empty()) + .map(str::to_string) + .collect(), }; let Ok(request) = authenticated_request(&headers, request) else { return Redirect::to("/login").into_response(); diff --git a/web/templates/pages/add_table/builder.html b/web/templates/pages/add_table/builder.html index 0eb03894..a5924b3e 100644 --- a/web/templates/pages/add_table/builder.html +++ b/web/templates/pages/add_table/builder.html @@ -81,6 +81,12 @@ {% else %}