confirm messages

This commit is contained in:
Yuri Kuznetsov
2024-01-11 10:54:55 +02:00
parent a5ed0864be
commit d5a441b0e8
4 changed files with 10 additions and 3 deletions
@@ -73,7 +73,7 @@
}
},
"messages": {
"confirmRemoveLink": "Are you sure you want to remove the relationship?",
"confirmRemoveLink": "Are you sure you want to remove the *{link}* relationship?",
"nameIsAlreadyUsed": "Name '{name}' is already used.",
"nameIsNotAllowed": "Name '{name}' is not allowed.",
"nameIsTooLong": "Name is too long.",
@@ -162,6 +162,7 @@
"linkMultiple": "A set of records related through Has-Many (many-to-many or one-to-many) relationship. Not all relationships have their link-multiple fields. Only those do, where Link-Multiple parameter(s) is enabled."
},
"messages": {
"confirmRemove": "Are you sure you want to remove the *{field}* field?\n\nField removal does not remove data from the database. Data from the database will be removed if you run hard rebuild.",
"fieldNameIsNotAllowed": "Field name '{field}' is not allowed.",
"fieldAlreadyExists": "Field '{field}' already exists in '{entityType}'.",
"linkWithSameNameAlreadyExists": "Link with the name '{field}' already exists in '{entityType}'."
+4 -1
View File
@@ -102,7 +102,10 @@ class FieldManagerListView extends View {
}
removeField(field) {
this.confirm(this.translate('confirmation', 'messages'), () => {
const msg = this.translate('confirmRemove', 'messages', 'FieldManager')
.replace('{field}', field);
this.confirm(msg, () => {
Espo.Ui.notify(' ... ');
Espo.Ajax.deleteRequest('Admin/fieldManager/' + this.scope + '/' + field).then(() => {
+4 -1
View File
@@ -59,7 +59,10 @@ class LinkManagerIndexView extends View {
'click [data-action="removeLink"]': function (e) {
const link = $(e.currentTarget).data('link');
this.confirm(this.translate('confirmRemoveLink', 'messages', 'EntityManager'), () => {
const msg = this.translate('confirmRemoveLink', 'messages', 'EntityManager')
.replace('{link}', link);
this.confirm(msg, () => {
this.removeLink(link);
});
},