diff --git a/themes/standard_pages/js/standard_pages.js b/themes/standard_pages/js/standard_pages.js index 4b833e520..57522bc14 100644 --- a/themes/standard_pages/js/standard_pages.js +++ b/themes/standard_pages/js/standard_pages.js @@ -19,10 +19,16 @@ jQuery( document ).ready(function() { jQuery("#selected-language").textContent = selected_language; //Override empty input message - jQuery("form").on("submit", function (e) { - let isValid = true; - - jQuery(".column-flex").each(function () { + jQuery("form").on("submit", function (e) { + let isValid = true; + + jQuery(".column-flex").each(function (i) { + // Because we overid the default browser error message + // we need to distinguish which fields are now required + // To do this we use data-required="true" on the input + let input = $(this).find("input"); + if($(input).data("required") == true) + { let input = jQuery(this).find("input"); let errorMessage = jQuery(this).find(".error-message"); if (!input.val().trim()) { @@ -35,11 +41,12 @@ jQuery( document ).ready(function() { input[0].setCustomValidity(""); errorMessage.hide(); } - }); - - return isValid; + } }); + return isValid; + }); + // Hide error message and reset validation on input jQuery(".column-flex input").on("input", function () { let errorMessage = jQuery(this).closest(".column-flex").find(".error-message"); diff --git a/themes/standard_pages/template/identification.tpl b/themes/standard_pages/template/identification.tpl index 8b3d7ac02..4c7c60c74 100644 --- a/themes/standard_pages/template/identification.tpl +++ b/themes/standard_pages/template/identification.tpl @@ -45,8 +45,8 @@
- - + +

{'must not be empty'|translate}

diff --git a/themes/standard_pages/template/password.tpl b/themes/standard_pages/template/password.tpl index 9d135e7b4..33f46b8b5 100644 --- a/themes/standard_pages/template/password.tpl +++ b/themes/standard_pages/template/password.tpl @@ -50,7 +50,7 @@
- +

{'must not be empty'|translate}

diff --git a/themes/standard_pages/template/register.tpl b/themes/standard_pages/template/register.tpl index 632aeaa50..5541f368c 100644 --- a/themes/standard_pages/template/register.tpl +++ b/themes/standard_pages/template/register.tpl @@ -43,10 +43,10 @@
- +
- +

{'must not be empty'|translate}

@@ -55,7 +55,7 @@
- +

{'must not be empty'|translate}

@@ -64,7 +64,7 @@
- +

{'must not be empty'|translate}

@@ -74,7 +74,7 @@
- +

{'must not be empty'|translate}

diff --git a/themes/standard_pages/theme.css b/themes/standard_pages/theme.css index b26875f74..2c5ee16b6 100644 --- a/themes/standard_pages/theme.css +++ b/themes/standard_pages/theme.css @@ -388,6 +388,7 @@ a.btn-main{ display: block; padding: 15px; margin-bottom:15px; + font-weight:700; } .error-message{ @@ -951,6 +952,10 @@ input:checked + .slider:before, input:checked + .slider::after { border-left: 4px solid #6DCE5E; } +.light .success-message i{ + color:#6DCE5E; +} + .light .infos-message{ background-color: #bde5f8; color: #00529b !important; @@ -1084,6 +1089,10 @@ input:checked + .slider:before, input:checked + .slider::after { border-left: 4px solid #AAF6E4; } +.dark .success-message i{ + color: #AAF6E4; +} + .dark .infos-message{ background-color: #4f71a4; color: #bad6ff !important;