Merge branch 'ui' into dev

This commit is contained in:
florian 2023-04-27 11:44:36 +02:00
commit db5789fcb4
No known key found for this signature in database
GPG Key ID: 3D80806F12602A7C
1 changed files with 14 additions and 3 deletions

View File

@ -72,6 +72,7 @@ class ServiceModal {
const obj = JSON.parse(servicesSettings);
this.updateModalData(obj);
//show modal
this.resetFilterInp();
this.changeSubmitBtnName("EDIT");
this.openModal();
}
@ -94,6 +95,7 @@ class ServiceModal {
inpServName.value = "";
//show modal
this.resetFilterInp();
this.changeSubmitBtnName("CREATE");
this.openModal();
}
@ -114,6 +116,12 @@ class ServiceModal {
});
}
resetFilterInp() {
const inpFilter = document.querySelector('input[name="settings-filter"]');
inpFilter.value = "";
inpFilter.dispatchEvent(new Event("input"));
}
changeSubmitBtnName(text) {
const submitBtn = document.querySelector(
"button[data-services-modal-submit]"
@ -129,7 +137,8 @@ class ServiceModal {
if (
inpName === "csrf_token" ||
inpName === "OLD_SERVER_NAME" ||
inpName === "operation"
inpName === "operation" ||
inpName === "settings-filter"
)
return;
@ -270,7 +279,8 @@ class ServiceModal {
if (
inpName === "csrf_token" ||
inpName === "OLD_SERVER_NAME" ||
inpName === "operation"
inpName === "operation" ||
inpName === "settings-filter"
)
return;
@ -673,7 +683,8 @@ class Multiple {
if (
inpName === "csrf_token" ||
inpName === "OLD_SERVER_NAME" ||
inpName === "operation"
inpName === "operation" ||
inpName === "settings-filter"
)
return;