fixing erros

This commit is contained in:
Priec
2026-08-15 15:29:15 +02:00
parent fe3848c453
commit fa9ee23538
5 changed files with 21 additions and 1 deletions

View File

@@ -661,6 +661,7 @@ builder-choose-profile = Vyberte profil
builder-new-profile = Nový profil… builder-new-profile = Nový profil…
builder-new-profile-name = Název nového profilu builder-new-profile-name = Název nového profilu
builder-accounting-currency = Účetní měna 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-table-name = Název tabulky
builder-add-column-heading = Přidat sloupec builder-add-column-heading = Přidat sloupec
builder-add-column-button = Přidat sloupec builder-add-column-button = Přidat sloupec

View File

@@ -648,6 +648,7 @@ builder-choose-profile = Choose a profile
builder-new-profile = New profile… builder-new-profile = New profile…
builder-new-profile-name = New profile name builder-new-profile-name = New profile name
builder-accounting-currency = Accounting currency 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-table-name = Table name
builder-add-column-heading = Add a column builder-add-column-heading = Add a column
builder-add-column-button = Add column builder-add-column-button = Add column

View File

@@ -661,6 +661,7 @@ builder-choose-profile = Vyberte profil
builder-new-profile = Nový profil… builder-new-profile = Nový profil…
builder-new-profile-name = Názov nového profilu builder-new-profile-name = Názov nového profilu
builder-accounting-currency = Účtovná mena 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-table-name = Názov tabuľky
builder-add-column-heading = Pridať stĺpec builder-add-column-heading = Pridať stĺpec
builder-add-column-button = Pridať stĺpec builder-add-column-button = Pridať stĺpec

View File

@@ -529,7 +529,18 @@ pub(crate) async fn copy_profile(
let request = CopyProfileRequest { let request = CopyProfileRequest {
source_profile_name: form.profile.clone(), source_profile_name: form.profile.clone(),
target_profile_name: form.target_profile_name.trim().to_string(), 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 { let Ok(request) = authenticated_request(&headers, request) else {
return Redirect::to("/login").into_response(); return Redirect::to("/login").into_response();

View File

@@ -81,6 +81,12 @@
<label>{{ nav.tr("builder-accounting-currency") }} <label>{{ nav.tr("builder-accounting-currency") }}
<input name="accounting_currency" value="{{ page.draft.accounting_currency }}" list="currency-codes" <input name="accounting_currency" value="{{ page.draft.accounting_currency }}" list="currency-codes"
maxlength="3" placeholder="EUR"> maxlength="3" placeholder="EUR">
{#
The list stays complete: EUR-only books are the server's current
limitation, not the shape of the field. When it accepts more, this
hint goes and nothing else here has to change.
#}
<small>{{ nav.tr("builder-accounting-currency-hint") }}</small>
</label> </label>
{% else %} {% else %}
<input type="hidden" name="accounting_currency" value="{{ page.draft.accounting_currency }}"> <input type="hidden" name="accounting_currency" value="{{ page.draft.accounting_currency }}">