From 2cca5bd9b92e1040f95730993cc4742fabf747b7 Mon Sep 17 00:00:00 2001 From: maxnes3 <112558334+maxnes3@users.noreply.github.com> Date: Sat, 20 May 2023 09:55:10 +0400 Subject: [PATCH] =?UTF-8?q?=D0=95=D1=89=D1=91=20=D0=BD=D0=B5=D0=BC=D0=BD?= =?UTF-8?q?=D0=BE=D0=B3=D0=BE=20=D0=B2=D0=B0=D0=BB=D0=B8=D0=B4=D0=B0=D1=86?= =?UTF-8?q?=D0=B8=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../wwwroot/js/case/case-create.js | 5 +++++ .../wwwroot/js/case/case-update.js | 5 +++++ .../wwwroot/js/hearing/hearing-create.js | 5 +++++ .../wwwroot/js/hearing/hearing-update.js | 11 ++++++++++- 4 files changed, 25 insertions(+), 1 deletion(-) diff --git a/CaseAccounting/CaseAccountingProviderView/wwwroot/js/case/case-create.js b/CaseAccounting/CaseAccountingProviderView/wwwroot/js/case/case-create.js index 761e275..dff80e6 100644 --- a/CaseAccounting/CaseAccountingProviderView/wwwroot/js/case/case-create.js +++ b/CaseAccounting/CaseAccountingProviderView/wwwroot/js/case/case-create.js @@ -57,6 +57,11 @@ const validate = function () { errorP.innerHTML = "Заполните поле 'Примечание'"; return false; } + if (specializationSelect.value === '') { + errorDivShell.style.gridTemplateRows = "1fr"; + errorP.innerHTML = "Выберите 'Специализацию'"; + return false; + } return true; }; diff --git a/CaseAccounting/CaseAccountingProviderView/wwwroot/js/case/case-update.js b/CaseAccounting/CaseAccountingProviderView/wwwroot/js/case/case-update.js index c731be4..bf48191 100644 --- a/CaseAccounting/CaseAccountingProviderView/wwwroot/js/case/case-update.js +++ b/CaseAccounting/CaseAccountingProviderView/wwwroot/js/case/case-update.js @@ -78,6 +78,11 @@ const validate = function () { errorP.innerHTML = "Заполните поле 'Примечание'"; return false; } + if (specializationSelect.value === '') { + errorDivShell.style.gridTemplateRows = "1fr"; + errorP.innerHTML = "Выберите 'Специализацию'"; + return false; + } return true; }; diff --git a/CaseAccounting/CaseAccountingProviderView/wwwroot/js/hearing/hearing-create.js b/CaseAccounting/CaseAccountingProviderView/wwwroot/js/hearing/hearing-create.js index d318c01..6744802 100644 --- a/CaseAccounting/CaseAccountingProviderView/wwwroot/js/hearing/hearing-create.js +++ b/CaseAccounting/CaseAccountingProviderView/wwwroot/js/hearing/hearing-create.js @@ -39,6 +39,11 @@ const validate = function () { errorP.innerHTML = "Заполните поле 'Информация по слушанию'"; return false; } + if (caseSelect.value === '') { + errorDivShell.style.gridTemplateRows = "1fr"; + errorP.innerHTML = "Выберите 'Дело'"; + return false; + } return true; }; diff --git a/CaseAccounting/CaseAccountingProviderView/wwwroot/js/hearing/hearing-update.js b/CaseAccounting/CaseAccountingProviderView/wwwroot/js/hearing/hearing-update.js index 1bf6d5f..9d776b4 100644 --- a/CaseAccounting/CaseAccountingProviderView/wwwroot/js/hearing/hearing-update.js +++ b/CaseAccounting/CaseAccountingProviderView/wwwroot/js/hearing/hearing-update.js @@ -51,7 +51,16 @@ const correctData = function () { }; const validate = function () { - + if (informationInput.value === "") { + errorDivShell.style.gridTemplateRows = "1fr"; + errorP.innerHTML = "Заполните поле 'Информация по слушанию'"; + return false; + } + if (caseSelect.value === '') { + errorDivShell.style.gridTemplateRows = "1fr"; + errorP.innerHTML = "Выберите 'Дело'"; + return false; + } return true; };