From 0576e69ad5a73f9ba09fb266b6fa46b7f36cd00d Mon Sep 17 00:00:00 2001 From: Alex Tselegidis Date: Tue, 21 Jun 2022 12:59:24 +0300 Subject: [PATCH] Change the private field id attribute for consistency --- application/views/pages/services.php | 42 ++++++++++++++++------------ assets/js/pages/services.js | 9 +++--- 2 files changed, 29 insertions(+), 22 deletions(-) diff --git a/application/views/pages/services.php b/application/views/pages/services.php index 1bdb012b..f9bdf47a 100755 --- a/application/views/pages/services.php +++ b/application/views/pages/services.php @@ -8,7 +8,7 @@
- +
-
-
-
-
-
-
- +
'id="color"']) ?>
+ + +
+ +
+ +
- -
@@ -142,13 +155,6 @@
- -
- - -
diff --git a/assets/js/pages/services.js b/assets/js/pages/services.js index 4c38e7fa..3a5a2589 100644 --- a/assets/js/pages/services.js +++ b/assets/js/pages/services.js @@ -24,7 +24,7 @@ App.Pages.Services = (function () { const $category = $('#category'); const $availabilitiesType = $('#availabilities-type'); const $attendantsNumber = $('#attendants-number'); - const $private = $('#private'); + const $isPrivate = $('#is-private'); const $location = $('#location'); const $description = $('#description'); const $filterServices = $('#filter-services'); @@ -140,7 +140,7 @@ App.Pages.Services = (function () { color: App.Components.ColorSelection.getColor($color), availabilities_type: $availabilitiesType.val(), attendants_number: $attendantsNumber.val(), - is_private: Number($private.prop('checked')), + is_private: Number($isPrivate.prop('checked')), id_categories: $category.val() || null }; @@ -295,7 +295,7 @@ App.Pages.Services = (function () { $location.val(service.location); $availabilitiesType.val(service.availabilities_type); $attendantsNumber.val(service.attendants_number); - $private.prop('checked', service.is_private); + $isPrivate.prop('checked', service.is_private); App.Components.ColorSelection.setColor($color, service.color); const categoryId = service.id_categories !== null ? service.id_categories : ''; @@ -303,7 +303,7 @@ App.Pages.Services = (function () { } /** - * Filters service records depending a string keyword. + * Filters service records depending on a string keyword. * * @param {String} keyword This is used to filter the service records of the database. * @param {Number} selectId Optional, if set then after the filter operation the record with this @@ -339,6 +339,7 @@ App.Pages.Services = (function () { } if (selectId) { + debugger select(selectId, show); } });