From fbb9baec504731945f389edf6719c8c447cfd8a9 Mon Sep 17 00:00:00 2001 From: Alex Tselegidis Date: Wed, 19 Jan 2022 09:39:13 +0100 Subject: [PATCH] Change display of read only field (remove border). --- application/views/pages/admins.php | 50 ++++++++++++------------- application/views/pages/categories.php | 6 +-- application/views/pages/customers.php | 40 ++++++++++---------- application/views/pages/providers.php | 50 ++++++++++++------------- application/views/pages/secretaries.php | 50 ++++++++++++------------- application/views/pages/services.php | 26 ++++++------- assets/css/layouts/backend_layout.scss | 10 +++++ assets/js/pages/admins.js | 9 +++-- assets/js/pages/categories.js | 3 ++ assets/js/pages/customers.js | 3 ++ assets/js/pages/providers.js | 3 ++ assets/js/pages/secretaries.js | 9 +++-- assets/js/pages/services.js | 5 ++- 13 files changed, 144 insertions(+), 120 deletions(-) diff --git a/application/views/pages/admins.php b/application/views/pages/admins.php index 3e755350..7a5327fb 100755 --- a/application/views/pages/admins.php +++ b/application/views/pages/admins.php @@ -61,33 +61,33 @@
- +
- +
- +
- +
@@ -95,14 +95,14 @@ - +
- +
@@ -110,63 +110,63 @@ - +
- +
- +
- +
- +
+ autocomplete="new-password" disabled>
+ maxlength="512" autocomplete="new-password" disabled>
- @@ -175,10 +175,10 @@
'id="timezone" class="form-control required"', + 'attributes' => 'id="timezone" class="form-control required" disabled', 'timezones' => vars('timezones') ]) ?>
@@ -186,7 +186,7 @@
- + diff --git a/application/views/pages/categories.php b/application/views/pages/categories.php index b66077e8..aa38665f 100755 --- a/application/views/pages/categories.php +++ b/application/views/pages/categories.php @@ -59,9 +59,9 @@
- +
@@ -69,7 +69,7 @@ - +
diff --git a/application/views/pages/customers.php b/application/views/pages/customers.php index d9ba31d7..e7b381a6 100755 --- a/application/views/pages/customers.php +++ b/application/views/pages/customers.php @@ -69,88 +69,88 @@ + class=" form-control" maxlength="100" disabled/>
+ class=" form-control" maxlength="120" disabled/>
+ class=" form-control" maxlength="120" disabled/>
+ class=" form-control" disabled/>
+ maxlength="120" disabled/>
+ maxlength="120" disabled/>
+ maxlength="120" disabled/>
- @@ -159,10 +159,10 @@
'id="timezone" class="form-control required"', + 'attributes' => 'id="timezone" class="form-control required" disabled', 'timezones' => vars('timezones') ]) ?>
@@ -171,7 +171,7 @@ - +
diff --git a/application/views/pages/providers.php b/application/views/pages/providers.php index 11cbdafb..6ac43618 100755 --- a/application/views/pages/providers.php +++ b/application/views/pages/providers.php @@ -80,33 +80,33 @@
- +
- +
- +
- +
@@ -114,14 +114,14 @@ - +
- +
@@ -129,14 +129,14 @@ - +
- +
@@ -144,50 +144,50 @@ - +
- +
- +
+ maxlength="512" autocomplete="new-password" disabled>
+ autocomplete="new-password" disabled>
- @@ -196,10 +196,10 @@
'id="timezone" class="form-control required"', + 'attributes' => 'id="timezone" class="form-control required" disabled', 'timezones' => vars('timezones') ]) ?>
@@ -207,7 +207,7 @@
- + diff --git a/application/views/pages/secretaries.php b/application/views/pages/secretaries.php index 430f40ad..70cf66fe 100755 --- a/application/views/pages/secretaries.php +++ b/application/views/pages/secretaries.php @@ -61,33 +61,33 @@
- +
- +
- +
- +
@@ -95,77 +95,77 @@ - +
- +
- +
- +
- +
- +
- +
+ maxlength="512" autocomplete="new-password" disabled>
+ maxlength="512" autocomplete="new-password" disabled>
- @@ -174,10 +174,10 @@
'id="timezone" class="form-control required"', + 'attributes' => 'id="timezone" class="form-control required" disabled', 'timezones' => vars('timezones') ]) ?>
@@ -185,7 +185,7 @@
- + diff --git a/application/views/pages/services.php b/application/views/pages/services.php index 34eeb3c6..361f594b 100755 --- a/application/views/pages/services.php +++ b/application/views/pages/services.php @@ -58,25 +58,25 @@
- +
- +
- +
@@ -84,14 +84,14 @@ - +
- +
@@ -99,7 +99,7 @@ - @@ -110,9 +110,9 @@
-
@@ -122,7 +122,7 @@ - +
@@ -133,7 +133,7 @@ - +
diff --git a/assets/css/layouts/backend_layout.scss b/assets/css/layouts/backend_layout.scss index c5fb608e..61fc9f83 100644 --- a/assets/css/layouts/backend_layout.scss +++ b/assets/css/layouts/backend_layout.scss @@ -194,6 +194,16 @@ body legend { color: #666; } +.backend-page .form-control:disabled, +.backend-page .form-control[readonly] { + background-color: #fff; + color: #9a9a9a; + border-color: #fff; + opacity: 1; + padding-left: 0; + padding-right: 0; +} + /* BACKEND COMPONENTS -------------------------------------------------------------------- */ diff --git a/assets/js/pages/admins.js b/assets/js/pages/admins.js index 8052b804..82656989 100644 --- a/assets/js/pages/admins.js +++ b/assets/js/pages/admins.js @@ -123,8 +123,8 @@ App.Pages.Admins = (function () { resetForm(); $admins.find('.add-edit-delete-group').hide(); $admins.find('.save-cancel-group').show(); - $admins.find('.record-details').find('input, textarea').prop('disabled', false); - $admins.find('.record-details').find('select').prop('disabled', false); + $admins.find('.record-details').find('input, select, textarea').prop('disabled', false); + $admins.find('.record-details .form-label span').prop('hidden', false); $('#password, #password-confirm').addClass('required'); $('#filter-admins button').prop('disabled', true); $('#filter-admins .results').css('color', '#AAA'); @@ -136,8 +136,8 @@ App.Pages.Admins = (function () { $admins.on('click', '#edit-admin', () => { $admins.find('.add-edit-delete-group').hide(); $admins.find('.save-cancel-group').show(); - $admins.find('.record-details').find('input, textarea').prop('disabled', false); - $admins.find('.record-details').find('select').prop('disabled', false); + $admins.find('.record-details').find('input, select, textarea').prop('disabled', false); + $admins.find('.record-details .form-label span').prop('hidden', false); $('#password, #password-confirm').removeClass('required'); $('#filter-admins button').prop('disabled', true); $('#filter-admins .results').css('color', '#AAA'); @@ -316,6 +316,7 @@ App.Pages.Admins = (function () { $admins.find('.add-edit-delete-group').show(); $admins.find('.save-cancel-group').hide(); $admins.find('.record-details').find('input, select, textarea').val('').prop('disabled', true); + $admins.find('.record-details .form-label span').prop('hidden', true); $admins.find('.record-details #calendar-view').val('default'); $admins.find('.record-details #timezone').val('UTC'); $('#edit-admin, #delete-admin').prop('disabled', true); diff --git a/assets/js/pages/categories.js b/assets/js/pages/categories.js index 122662f7..fb75fa3e 100644 --- a/assets/js/pages/categories.js +++ b/assets/js/pages/categories.js @@ -71,6 +71,7 @@ App.Pages.Categories = (function () { $categories.find('.add-edit-delete-group').hide(); $categories.find('.save-cancel-group').show(); $categories.find('.record-details').find('input, select, textarea').prop('disabled', false); + $categories.find('.record-details .form-label span').prop('hidden', false); $filterCategories.find('button').prop('disabled', true); $filterCategories.find('.results').css('color', '#AAA'); }); @@ -82,6 +83,7 @@ App.Pages.Categories = (function () { $categories.find('.add-edit-delete-group').hide(); $categories.find('.save-cancel-group').show(); $categories.find('.record-details').find('input, select, textarea').prop('disabled', false); + $categories.find('.record-details .form-label span').prop('hidden', false); $filterCategories.find('button').prop('disabled', true); $filterCategories.find('.results').css('color', '#AAA'); }); @@ -264,6 +266,7 @@ App.Pages.Categories = (function () { $categories.find('.add-edit-delete-group').show(); $categories.find('.save-cancel-group').hide(); $categories.find('.record-details').find('input, select, textarea').val('').prop('disabled', true); + $categories.find('.record-details .form-label span').prop('hidden', true); $('#edit-category, #delete-category').prop('disabled', true); $categories.find('.record-details .is-invalid').removeClass('is-invalid'); diff --git a/assets/js/pages/customers.js b/assets/js/pages/customers.js index 15b88091..6a9421a0 100644 --- a/assets/js/pages/customers.js +++ b/assets/js/pages/customers.js @@ -80,6 +80,7 @@ App.Pages.Customers = (function () { $customers.find('#add-edit-delete-group').hide(); $customers.find('#save-cancel-group').show(); $customers.find('.record-details').find('input, select, textarea').prop('disabled', false); + $customers.find('.record-details .form-label span').prop('hidden', false); $filterCustomers.find('button').prop('disabled', true); $filterCustomers.find('.results').css('color', '#AAA'); }); @@ -89,6 +90,7 @@ App.Pages.Customers = (function () { */ $customers.on('click', '#edit-customer', () => { $customers.find('.record-details').find('input, select, textarea').prop('disabled', false); + $customers.find('.record-details .form-label span').prop('hidden', false); $customers.find('#add-edit-delete-group').hide(); $customers.find('#save-cancel-group').show(); $filterCustomers.find('button').prop('disabled', true); @@ -228,6 +230,7 @@ App.Pages.Customers = (function () { */ function resetForm() { $customers.find('.record-details').find('input, select, textarea').val('').prop('disabled', true); + $customers.find('.record-details .form-label span').prop('hidden', true); $customers.find('.record-details #timezone').val('UTC'); $language.val('english'); diff --git a/assets/js/pages/providers.js b/assets/js/pages/providers.js index f95442a0..b6acf445 100755 --- a/assets/js/pages/providers.js +++ b/assets/js/pages/providers.js @@ -87,6 +87,7 @@ App.Pages.Providers = (function () { $providers.find('.add-edit-delete-group').hide(); $providers.find('.save-cancel-group').show(); $providers.find('.record-details').find('input, select, textarea').prop('disabled', false); + $providers.find('.record-details .form-label span').prop('hidden', false); $('#password, #password-confirm').addClass('required'); $providers .find( @@ -110,6 +111,7 @@ App.Pages.Providers = (function () { $filterProviders.find('button').prop('disabled', true); $filterProviders.find('.results').css('color', '#AAA'); $providers.find('.record-details').find('input, select, textarea').prop('disabled', false); + $providers.find('.record-details .form-label span').prop('hidden', false); $('#password, #password-confirm').removeClass('required'); $('#provider-services input:checkbox').prop('disabled', false); $providers @@ -323,6 +325,7 @@ App.Pages.Providers = (function () { $providers.find('.save-cancel-group').hide(); $providers.find('.record-details h3 a').remove(); $providers.find('.record-details').find('input, select, textarea').val('').prop('disabled', true); + $providers.find('.record-details .form-label span').prop('hidden', true); $providers.find('.record-details #calendar-view').val('default'); $providers.find('.record-details #timezone').val('UTC'); $providers.find('.add-break, .add-working-plan-exception, #reset-working-plan').prop('disabled', true); diff --git a/assets/js/pages/secretaries.js b/assets/js/pages/secretaries.js index 40a4f6e9..d4928900 100644 --- a/assets/js/pages/secretaries.js +++ b/assets/js/pages/secretaries.js @@ -127,8 +127,8 @@ App.Pages.Secretaries = (function () { $secretaries.find('.add-edit-delete-group').hide(); $secretaries.find('.save-cancel-group').show(); - $secretaries.find('.record-details').find('input, textarea').prop('disabled', false); - $secretaries.find('.record-details').find('select').prop('disabled', false); + $secretaries.find('.record-details').find('input, select, textarea').prop('disabled', false); + $secretaries.find('.record-details .form-label span').prop('hidden', false); $('#password, #password-confirm').addClass('required'); $('#secretary-providers input:checkbox').prop('disabled', false); }); @@ -141,8 +141,8 @@ App.Pages.Secretaries = (function () { $filterSecretaries.find('.results').css('color', '#AAA'); $secretaries.find('.add-edit-delete-group').hide(); $secretaries.find('.save-cancel-group').show(); - $secretaries.find('.record-details').find('input, textarea').prop('disabled', false); - $secretaries.find('.record-details').find('select').prop('disabled', false); + $secretaries.find('.record-details').find('input, select, textarea').prop('disabled', false); + $secretaries.find('.record-details .form-label span').prop('hidden', false); $('#password, #password-confirm').removeClass('required'); $('#secretary-providers input:checkbox').prop('disabled', false); }); @@ -326,6 +326,7 @@ App.Pages.Secretaries = (function () { $filterSecretaries.find('button').prop('disabled', false); $filterSecretaries.find('.results').css('color', ''); $secretaries.find('.record-details').find('input, select, textarea').val('').prop('disabled', true); + $secretaries.find('.record-details .form-label span').prop('hidden', true); $secretaries.find('.record-details #calendar-view').val('default'); $secretaries.find('.record-details #timezone').val('UTC'); $secretaries.find('.add-edit-delete-group').show(); diff --git a/assets/js/pages/services.js b/assets/js/pages/services.js index a679f0ac..5e278fd6 100644 --- a/assets/js/pages/services.js +++ b/assets/js/pages/services.js @@ -91,6 +91,7 @@ App.Pages.Services = (function () { $services.find('.add-edit-delete-group').hide(); $services.find('.save-cancel-group').show(); $services.find('.record-details').find('input, select, textarea').prop('disabled', false); + $services.find('.record-details .form-label span').prop('hidden', false); $filterServices.find('button').prop('disabled', true); $filterServices.find('.results').css('color', '#AAA'); @@ -154,6 +155,7 @@ App.Pages.Services = (function () { $services.find('.add-edit-delete-group').hide(); $services.find('.save-cancel-group').show(); $services.find('.record-details').find('input, select, textarea').prop('disabled', false); + $services.find('.record-details .form-label span').prop('hidden', false); $filterServices.find('button').prop('disabled', true); $filterServices.find('.results').css('color', '#AAA'); App.Components.ColorSelection.enable($color); @@ -258,6 +260,7 @@ App.Pages.Services = (function () { $filterServices.find('.results').css('color', ''); $services.find('.record-details').find('input, select, textarea').val('').prop('disabled', true); + $services.find('.record-details .form-label span').prop('hidden', true); $services.find('.record-details h3 a').remove(); $services.find('.add-edit-delete-group').show(); @@ -397,7 +400,7 @@ App.Pages.Services = (function () { $category.append(new Option(category.name, category.id)); }); - $category.append(new Option('- ' + lang('no_category') + ' -', '')).val(''); + $category.append(new Option('', '')).val(''); }); }