Merge pull request #38313 from KerollesFathy/fix/show-options-description-on-currency-field

refactor: add options description for Currency fieldtype
This commit is contained in:
Ejaaz Khan 2026-03-31 12:32:17 +05:30 committed by GitHub
commit 0f6d4e59f0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -61,11 +61,14 @@ let docfield_df = computed(() => {
df.options = ["", "Email", "Name", "Phone", "URL", "Barcode", "IBAN"];
}
if (store.form.selected_field.fieldtype === "Select") {
df.description = __("Enter list of Options, each on a new line.");
} else {
df.description = "";
}
const FIELD_DESCRIPTIONS = {
Select: __("Enter list of Options, each on a new line."),
Currency: __(
"Enter the fieldname of the currency field or a cached value (e.g. Company:company:default_currency)."
),
};
const fieldtype = store.form.selected_field?.fieldtype;
df.description = FIELD_DESCRIPTIONS[fieldtype] || "";
}
// show link_filters docfield only when link field is selected