add to layout alert
This commit is contained in:
@@ -164,6 +164,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": {
|
||||
"fieldCreatedAddToLayouts": "Field has been created. Now, you can add it to [layouts]({link})",
|
||||
"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}'.",
|
||||
|
||||
@@ -179,7 +179,7 @@ class IndexFieldManagerView extends View {
|
||||
this.type = type;
|
||||
|
||||
this.getRouter()
|
||||
.navigate(`#Admin/fieldManager/scope=${scope}&type=${type}&create=true`, {trigger: false});
|
||||
.navigate('#Admin/fieldManager/scope=' + scope + '&type=' + type + '&create=true', {trigger: false});
|
||||
|
||||
Espo.Ui.notify(' ... ');
|
||||
|
||||
@@ -196,7 +196,18 @@ class IndexFieldManagerView extends View {
|
||||
view.once('after:save', () => {
|
||||
this.openScope(this.scope);
|
||||
|
||||
Espo.Ui.success(this.translate('Created'));
|
||||
if (!this.getMetadata().get(`scopes.${this.scope}.layouts`)) {
|
||||
Espo.Ui.success(this.translate('Created'), {suppress: true});
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
const message = this.translate('fieldCreatedAddToLayouts', 'messages', 'FieldManager')
|
||||
.replace('{link}', `#Admin/layouts/scope=${this.scope}&em=true`);
|
||||
|
||||
setTimeout(() => {
|
||||
Espo.Ui.notify(message, 'success', undefined, {closeButton: true});
|
||||
}, 100);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
@@ -145,6 +145,9 @@ class LayoutIndexView extends View {
|
||||
}
|
||||
|
||||
afterRender() {
|
||||
// To ensure notify about added field is closed. When followed to here from the field manager.
|
||||
Espo.Ui.notify();
|
||||
|
||||
this.controlActiveButton();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user