From 73ed3842154894c0bb81adf80247dc3d38acfef1 Mon Sep 17 00:00:00 2001 From: slawkens1 Date: Mon, 25 Dec 2017 23:15:42 +0100 Subject: [PATCH] * don't show error indicators on first time load - createaccount page --- TODO | 1 - system/templates/account.create.html.twig | 8 ++++---- system/templates/account.create.js.html.twig | 11 +++++++++++ 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/TODO b/TODO index b7aeccf6..78ab1db5 100644 --- a/TODO +++ b/TODO @@ -5,7 +5,6 @@ * plugins: option to define custom requirements check in json file, to check if system meets the requirement * add support for defining max myaac version in plugin.json file * cache Menus in templates - * don't show error indicators on first time load - createaccount page * semantic versioning support for plugins (github.com/composer/semver) * add some notice to the user that installing step "Import Schema" will take some time diff --git a/system/templates/account.create.html.twig b/system/templates/account.create.html.twig index fe5f18b9..f2053ea9 100644 --- a/system/templates/account.create.html.twig +++ b/system/templates/account.create.html.twig @@ -27,7 +27,7 @@ Also you have to agree to the terms presented below. If you have done so, your a - + {% if errors.account is defined %}{{ errors.account }}{% endif %} @@ -37,7 +37,7 @@ Also you have to agree to the terms presented below. If you have done so, your a - + {% if errors.email is defined %}{{ errors.email }}{% endif %} @@ -65,7 +65,7 @@ Also you have to agree to the terms presented below. If you have done so, your a - + {% if errors.password is defined %}{{ errors.password }}{% endif %} @@ -75,7 +75,7 @@ Also you have to agree to the terms presented below. If you have done so, your a - + {% if errors.password is defined %}{{ errors.password }}{% endif %} diff --git a/system/templates/account.create.js.html.twig b/system/templates/account.create.js.html.twig index 95484786..6a1b447c 100644 --- a/system/templates/account.create.js.html.twig +++ b/system/templates/account.create.js.html.twig @@ -51,6 +51,7 @@ { $('#account_error').html('Please enter account {% if constant('USE_ACCOUNT_NAME') %}name{% else %}number{% endif %}.'); $('#account_indicator').attr('src', 'images/global/general/nok.gif'); + $('#account_indicator').show(); return; } @@ -78,6 +79,8 @@ $('#account_error').html(data.error); $('#account_indicator').attr('src', 'images/global/general/nok.gif'); } + + $('#account_indicator').show(); } ); @@ -96,6 +99,7 @@ { $('#email_error').html('Please enter e-mail.'); $('#email_indicator').attr('src', 'images/global/general/nok.gif'); + $('#email_indicator').show(); return; } @@ -123,6 +127,8 @@ $('#email_error').html(data.error); $('#email_indicator').attr('src', 'images/global/general/nok.gif'); } + + $('#email_indicator').show(); } ); @@ -141,6 +147,7 @@ { $('#password_error').html('Please enter the password for your new account.'); $('#password_indicator').attr('src', 'images/global/general/nok.gif'); + $('#password_indicator').show(); return; } @@ -148,6 +155,7 @@ { $('#password2_error').html('Please enter the password again!'); $('#password2_indicator').attr('src', 'images/global/general/nok.gif'); + $('#password2_indicator').show(); return; } @@ -180,6 +188,9 @@ $('#password_indicator').attr('src', 'images/global/general/nok.gif'); $('#password2_indicator').attr('src', 'images/global/general/nok.gif'); } + + $('#password_indicator').show(); + $('#password2_indicator').show(); } );