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:
commit
0f6d4e59f0
1 changed files with 8 additions and 5 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue