From a91812e3ec52b5a9be4aeaaa9e3dc2ac0a86b30e Mon Sep 17 00:00:00 2001 From: Shahriyar Imanov Date: Fri, 20 Apr 2018 16:58:41 +0200 Subject: [PATCH] Some fixes. --- app/Http/Controllers/Auth/LoginController.php | 7 +- package-lock.json | 56 ++--- resources/assets/javascripts/auth.js | 211 ------------------ resources/assets/javascripts/login.js | 87 -------- resources/assets/javascripts/register.js | 88 -------- storage/build/scripts/dev-env/build.sh | 7 +- .../SauceWebDriver/AuthenticationTest.php | 1 - 7 files changed, 35 insertions(+), 422 deletions(-) diff --git a/app/Http/Controllers/Auth/LoginController.php b/app/Http/Controllers/Auth/LoginController.php index 2049124..04a8d7b 100644 --- a/app/Http/Controllers/Auth/LoginController.php +++ b/app/Http/Controllers/Auth/LoginController.php @@ -47,7 +47,8 @@ public function showLoginForm() * @param \Illuminate\Http\Request $request * * @return \Illuminate\Http\JsonResponse|\Illuminate\Http\RedirectResponse - * @throws \App\Exceptions\Common\ValidationException + * @throws ValidationException + * @throws \Illuminate\Validation\ValidationException */ public function loginViaWeb(Request $request) { @@ -193,7 +194,9 @@ protected function registerViaOAuth(SocialiteUser $oauthUserData, $provider) $ownerAccount->save(); } - ($doLinkOAuthAccount = $this->linkOAuthAccount($oauthUserData, $provider, $ownerAccount)) && app('auth.driver')->login($ownerAccount, true); + if ($doLinkOAuthAccount = $this->linkOAuthAccount($oauthUserData, $provider, $ownerAccount)) { + app('auth.driver')->login($ownerAccount, true); + } event(new LoggedIn($ownerAccount, $provider)); diff --git a/package-lock.json b/package-lock.json index e7e4b50..4ca9e77 100644 --- a/package-lock.json +++ b/package-lock.json @@ -214,7 +214,7 @@ "string_decoder": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", - "integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==", + "integrity": "sha1-D8Z9fBQYJd6UKC3VNr7GubzoYKs=", "dev": true, "requires": { "safe-buffer": "5.1.1" @@ -240,7 +240,7 @@ "arr-flatten": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", - "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==", + "integrity": "sha1-NgSLv/TntH4TZkQxbJlmnqWukfE=", "dev": true }, "arr-union": { @@ -1258,7 +1258,7 @@ "babylon": { "version": "6.18.0", "resolved": "https://registry.npmjs.org/babylon/-/babylon-6.18.0.tgz", - "integrity": "sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ==", + "integrity": "sha1-ry87iPpvXB5MY00aD46sT1WzleM=", "dev": true }, "balanced-match": { @@ -1382,7 +1382,7 @@ "bn.js": { "version": "4.11.8", "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz", - "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==", + "integrity": "sha1-LN4J617jQfSEdGuwMJsyU7GxRC8=", "dev": true }, "boom": { @@ -1803,7 +1803,7 @@ "cipher-base": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz", - "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==", + "integrity": "sha1-h2Dk7MJy9MNjUy+SbYdKriwTl94=", "dev": true, "requires": { "inherits": "2.0.3", @@ -1813,7 +1813,7 @@ "clap": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/clap/-/clap-1.2.3.tgz", - "integrity": "sha512-4CoL/A3hf90V3VIEjeuhSvlGFEHKzOz+Wfc2IVZc+FaUgU0ZQafJTP49fvnULipOPcAfqhyI2duwQyns6xqjYA==", + "integrity": "sha1-TzZ0WzIAhJJVf0ZBLWbVDLmbzlE=", "dev": true, "requires": { "chalk": "1.1.3" @@ -2206,7 +2206,7 @@ "cosmiconfig": { "version": "2.2.2", "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-2.2.2.tgz", - "integrity": "sha512-GiNXLwAFPYHy25XmTPpafYvn3CLAkJ8FLsscq78MQd1Kh0OU6Yzhn4eV2MVF4G9WEQZoWEGltatdR+ntGPMl5A==", + "integrity": "sha1-YXPOvVb6wELB9DkO33r2wHx8uJI=", "dev": true, "requires": { "is-directory": "0.3.1", @@ -4361,7 +4361,7 @@ "function-bind": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", + "integrity": "sha1-pWiZ0+o8m6uHS7l3O3xe3pL0iV0=", "dev": true }, "gauge": { @@ -4515,7 +4515,7 @@ "glob": { "version": "7.1.2", "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", - "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", + "integrity": "sha1-wZyd+aAocC1nhhI4SmVSQExjbRU=", "dev": true, "requires": { "fs.realpath": "1.0.0", @@ -4637,7 +4637,7 @@ "globals": { "version": "9.18.0", "resolved": "https://registry.npmjs.org/globals/-/globals-9.18.0.tgz", - "integrity": "sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ==", + "integrity": "sha1-qjiWs+abSH8X4x7SFD1pqOMMLYo=", "dev": true }, "globby": { @@ -4820,7 +4820,7 @@ "hash.js": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.3.tgz", - "integrity": "sha512-/UETyP0W22QILqS+6HowevwhEFJ3MBJnwTf75Qob9Wz9t0DPuisL8kW8YZMK62dHAKE1c1p+gY1TtOLY+USEHA==", + "integrity": "sha1-NA3tvmKQGHFRweodd3o0SJNd+EY=", "dev": true, "requires": { "inherits": "2.0.3", @@ -5432,7 +5432,7 @@ "is-plain-object": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", - "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "integrity": "sha1-LBY7P6+xtgbZ0Xko8FwqHDjgdnc=", "dev": true, "requires": { "isobject": "3.0.1" @@ -5587,7 +5587,7 @@ "jquery-validation": { "version": "1.17.0", "resolved": "https://registry.npmjs.org/jquery-validation/-/jquery-validation-1.17.0.tgz", - "integrity": "sha512-XddiAwhGdWhcIJ+W3ri3KG8uTPMua4TPYuUIC8/E7lOyqdScG5xHuy9YishlKc0c/lIQai77EX7hxMdTSYCEjA==", + "integrity": "sha1-q2a2tYPXdAubvRSJk+UOisBB81s=", "requires": { "jquery": "3.3.1" } @@ -6570,7 +6570,7 @@ "minimatch": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "integrity": "sha1-UWbihkV/AzBgZL5Ul+jbsMPTIIM=", "dev": true, "requires": { "brace-expansion": "1.1.8" @@ -6733,7 +6733,7 @@ "node-fetch": { "version": "1.7.3", "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-1.7.3.tgz", - "integrity": "sha512-NhZ4CsKx7cYm2vSrBAr2PvFOe6sWDf0UYLRqA6svUYg7+/TSfVAu49jYC4BvQ4Sms9SZgdqGBgroqfDhJdTyKQ==", + "integrity": "sha1-mA9vcthSEaU0fGsrwYxbhMPrR+8=", "requires": { "encoding": "0.1.12", "is-stream": "1.1.0" @@ -6911,7 +6911,7 @@ "normalize-package-data": { "version": "2.4.0", "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.4.0.tgz", - "integrity": "sha512-9jjUFbTPfEy3R/ad/2oNbKtW9Hgovl5O1FvFWKkKblNXoN/Oou6+9+KKohPK13Yc3/TyunyWhJp6gvRNR/PPAw==", + "integrity": "sha1-EvlaMH1YNSB1oEkHuErIvpisAS8=", "dev": true, "requires": { "hosted-git-info": "2.6.0", @@ -6959,7 +6959,7 @@ "npmlog": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz", - "integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==", + "integrity": "sha1-CKfyqL9zRgR3mp76StXMcXq7lUs=", "dev": true, "requires": { "are-we-there-yet": "1.1.4", @@ -10100,7 +10100,7 @@ "promise": { "version": "7.3.1", "resolved": "https://registry.npmjs.org/promise/-/promise-7.3.1.tgz", - "integrity": "sha512-nolQXZ/4L+bP/UGlkfaIujX9BKxGwmQ9OT4mOt5yvy8iK1h3wqTEJCijzGANTCCl9nWjY41juyAn2K3Q1hLLTg==", + "integrity": "sha1-BktyYCsY+Q8pGSuLG8QY/9Hr078=", "requires": { "asap": "2.0.6" } @@ -10210,7 +10210,7 @@ "randomatic": { "version": "1.1.7", "resolved": "https://registry.npmjs.org/randomatic/-/randomatic-1.1.7.tgz", - "integrity": "sha512-D5JUjPyJbaJDkuAazpVnSfVkLlpeO3wDlPROTMLGKG1zMFNFRgrciKo1ltz/AzNTkqE0HzDx655QOL51N06how==", + "integrity": "sha1-x6vpzIuHwLqodrGf3oP9RkeX44w=", "dev": true, "requires": { "is-number": "3.0.0", @@ -10455,13 +10455,13 @@ "regenerator-runtime": { "version": "0.11.0", "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.0.tgz", - "integrity": "sha512-/aA0kLeRb5N9K0d4fw7ooEbI+xDe+DKD499EQqygGqeS8N3xto15p09uY2xj7ixP81sNPXvRLnAQIqdVStgb1A==", + "integrity": "sha1-flT+W1zNXWYk6mJVw0c74JC4AuE=", "dev": true }, "regenerator-transform": { "version": "0.10.1", "resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.10.1.tgz", - "integrity": "sha512-PJepbvDbuK1xgIgnau7Y90cwaAmO/LCLMI2mPvaXq2heGMR3aWW5/BQvYrhJ8jgmQjXewXvBjzfqKcVOmhjZ6Q==", + "integrity": "sha1-HkmWg3Ix2ot/PPQRTXG1aRoGgN0=", "dev": true, "requires": { "babel-runtime": "6.26.0", @@ -10730,7 +10730,7 @@ "safe-buffer": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", - "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==", + "integrity": "sha1-iTMSr2myEj3vcfV4iQAWce6yyFM=", "dev": true }, "safe-regex": { @@ -10775,7 +10775,7 @@ "sax": { "version": "1.2.4", "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", - "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==", + "integrity": "sha1-KBYjTiN4vdxOU1T6tcqold9xANk=", "dev": true }, "schema-utils": { @@ -10832,7 +10832,7 @@ "semver": { "version": "5.4.1", "resolved": "https://registry.npmjs.org/semver/-/semver-5.4.1.tgz", - "integrity": "sha512-WfG/X9+oATh81XtllIo/I8gOiY9EXRdv1cQdyykeXK17YcUW3EXUAi2To4pcH6nZtJPr7ZOpM5OMyWJZm+8Rsg==", + "integrity": "sha1-4FnAnYVx8FQII3M0M1BdOi8AsY4=", "dev": true }, "serialize-javascript": { @@ -11115,7 +11115,7 @@ "source-list-map": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/source-list-map/-/source-list-map-2.0.0.tgz", - "integrity": "sha512-I2UmuJSRr/T8jisiROLU3A3ltr+swpniSmNPI4Ml3ZCX6tVnDsuZzK7F2hl5jTqbZBWCEKlj5HRQiPExXLgE8A==", + "integrity": "sha1-qqR0A/eyRakvvJfqCPJQ1gh+0IU=", "dev": true }, "source-map": { @@ -11286,7 +11286,7 @@ "string_decoder": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", - "integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==", + "integrity": "sha1-D8Z9fBQYJd6UKC3VNr7GubzoYKs=", "dev": true, "requires": { "safe-buffer": "5.1.1" @@ -12626,7 +12626,7 @@ "which": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/which/-/which-1.3.0.tgz", - "integrity": "sha512-xcJpopdamTuY5duC/KnTTNBraPK54YwpenP4lzxU8H91GudWpFv38u0CKjclE1Wi2EH2EDz5LRcHcKbCIzqGyg==", + "integrity": "sha1-/wS9/AEO5UfXgL7DjhrBwnd9JTo=", "dev": true, "requires": { "isexe": "2.0.0" @@ -12641,7 +12641,7 @@ "wide-align": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.2.tgz", - "integrity": "sha512-ijDLlyQ7s6x1JgCLur53osjm/UXUYD9+0PbYKrBsYisYXzCxN+HC3mYDNy/dWdmf3AwqwU3CXwDCvsNgGK1S0w==", + "integrity": "sha1-Vx4PGwYEY268DfwhsDObvjE0FxA=", "dev": true, "requires": { "string-width": "1.0.2" diff --git a/resources/assets/javascripts/auth.js b/resources/assets/javascripts/auth.js index 25051a8..cc094c5 100644 --- a/resources/assets/javascripts/auth.js +++ b/resources/assets/javascripts/auth.js @@ -5,214 +5,3 @@ require('bootstrap-sass/assets/javascripts/bootstrap.js'); require('jquery-validation'); require('js-cookie'); require('bootstrap-switch'); - -var Login = function () { - var $loginForm = jQuery('.login-form'); - var $passwordReminderForm = jQuery('.forget-form'); - var $registrationForm = jQuery('.register-form'); - - var handleLogin = function () { - $loginForm.validate({ - errorElement: 'span', // default input error message container - errorClass: 'help-block', // default input error message class - focusInvalid: false, // do not focus the last invalid input - ignore: "", - rules: { - email: { - required: true - }, - password: { - required: true - }, - remember: { - required: false - } - }, - - messages: { - email: { - required: "Email is required." - }, - password: { - required: "Password is required." - } - }, - - /** - * Displays error alert on form submit - */ - invalidHandler: function (/* event, validator */) { - $('.alert-danger', $loginForm).show(); - }, - - /** - * Hightlight error inputs - * @param element - */ - highlight: function (element) { - $(element).closest('.form-group').addClass('has-error'); // Set error class to the control group - }, - - success: function (label) { - label.closest('.form-group').removeClass('has-error'); - label.remove(); - }, - - errorPlacement: function (error, element) { - error.insertAfter(element.closest('.input-icon')); - }, - - submitHandler: function (form) { - form.submit(); - } - }); - - $('.login-form input').keypress(function (e) { - if (e.which == 13) { - if ($loginForm.validate().form()) { - $loginForm.submit(); - } - return false; - } - }); - }; - - var handleForgetPassword = function () { - $passwordReminderForm.validate({ - errorElement: 'span', //default input error message container - errorClass: 'help-block', // default input error message class - focusInvalid: false, // do not focus the last invalid input - ignore: "", - rules: { - email: { - required: true, - email: true - } - }, - - messages: { - email: { - required: "Email is required." - } - }, - - invalidHandler: function (event, validator) { //display error alert on form submit - - }, - - highlight: function (element) { // hightlight error inputs - $(element) - .closest('.form-group').addClass('has-error'); // set error class to the control group - }, - - success: function (label) { - label.closest('.form-group').removeClass('has-error'); - label.remove(); - }, - - errorPlacement: function (error, element) { - error.insertAfter(element.closest('.input-icon')); - }, - - submitHandler: function (form) { - form.submit(); - } - }); - - $('.forget-form input').keypress(function (e) { - if (e.which == 13) { - if ($passwordReminderForm.validate().form()) { - $passwordReminderForm.submit(); - } - return false; - } - }); - }; - - var handleRegister = function () { - $registrationForm.validate({ - errorElement: 'span', //default input error message container - errorClass: 'help-block', // default input error message class - focusInvalid: false, // do not focus the last invalid input - ignore: "", - rules: { - email: { - required: true, - email: true - }, - password: { - required: true - }, - password_confirmation: { - equalTo: "#register_password" - }, - tnc: { - required: true - } - }, - - messages: { // custom messages for radio buttons and checkboxes - tnc: { - required: "Please accept TNC first." - } - }, - - invalidHandler: function (event, validator) { //display error alert on form submit - - }, - - highlight: function (element) { // hightlight error inputs - $(element) - .closest('.form-group').addClass('has-error'); // set error class to the control group - }, - - success: function (label) { - label.closest('.form-group').removeClass('has-error'); - label.remove(); - }, - - errorPlacement: function (error, element) { - if (element.attr("name") == "tnc") { // insert checkbox errors after the container - error.insertAfter($('#register_tnc_error')); - } else if (element.closest('.input-icon').size() === 1) { - error.insertAfter(element.closest('.input-icon')); - } else { - error.insertAfter(element); - } - }, - - submitHandler: function (form) { - form[0].submit(); - } - }); - - $('.register-form input').keypress(function (e) { - if (e.which == 13) { - if ($registrationForm.validate().form()) { - $registrationForm.submit(); - } - return false; - } - }); - }; - - return { - - /* - |---------------------------------------------- - | Main function to initiate the module - |---------------------------------------------- - */ - - init: function () { - handleLogin(); - handleForgetPassword(); - handleRegister(); - } - }; - -}(); - -jQuery(document).ready(function () { - Login.init(); -}); diff --git a/resources/assets/javascripts/login.js b/resources/assets/javascripts/login.js index f6a6217..cc094c5 100644 --- a/resources/assets/javascripts/login.js +++ b/resources/assets/javascripts/login.js @@ -5,90 +5,3 @@ require('bootstrap-sass/assets/javascripts/bootstrap.js'); require('jquery-validation'); require('js-cookie'); require('bootstrap-switch'); - -var Login = function () { - var handleLogin = function () { - var $loginForm = jQuery('.login-form'); - $loginForm.validate({ - errorElement: 'span', // default input error message container - errorClass: 'help-block', // default input error message class - focusInvalid: false, // do not focus the last invalid input - ignore: "", - rules: { - email: { - required: true - }, - password: { - required: true - }, - remember: { - required: false - } - }, - - messages: { - email: { - required: "Email is required." - }, - password: { - required: "Password is required." - } - }, - - /** - * Displays error alert on form submit - */ - invalidHandler: function (/* event, validator */) { - $('.alert-danger', $loginForm).show(); - }, - - /** - * Hightlight error inputs - * @param element - */ - highlight: function (element) { - $(element).closest('.form-group').addClass('has-error'); // Set error class to the control group - }, - - success: function (label) { - label.closest('.form-group').removeClass('has-error'); - label.remove(); - }, - - errorPlacement: function (error, element) { - error.insertAfter(element.closest('.input-icon')); - }, - - submitHandler: function (form) { - form.submit(); - } - }); - - $('.login-form input').keypress(function (e) { - if (e.which == 13) { - if ($loginForm.validate().form()) { - $loginForm.submit(); - } - return false; - } - }); - }; - - return { - - /* - |---------------------------------------------- - | Main function to initiate the module - |---------------------------------------------- - */ - - init: function () { - handleLogin(); - } - }; - -}(); - -jQuery(document).ready(function () { - Login.init(); -}); diff --git a/resources/assets/javascripts/register.js b/resources/assets/javascripts/register.js index 173581d..cc094c5 100644 --- a/resources/assets/javascripts/register.js +++ b/resources/assets/javascripts/register.js @@ -5,91 +5,3 @@ require('bootstrap-sass/assets/javascripts/bootstrap.js'); require('jquery-validation'); require('js-cookie'); require('bootstrap-switch'); - -var Register = function () { - var handleRegister = function () { - var $registrationForm = jQuery('.register-form'); - $registrationForm.validate({ - errorElement: 'span', //default input error message container - errorClass: 'help-block', // default input error message class - focusInvalid: false, // do not focus the last invalid input - ignore: "", - rules: { - email: { - required: true, - email: true - }, - password: { - required: true - }, - password_confirmation: { - equalTo: "#register_password" - }, - tnc: { - required: true - } - }, - - messages: { // custom messages for radio buttons and checkboxes - tnc: { - required: "Please accept TNC first." - } - }, - - invalidHandler: function (event, validator) { //display error alert on form submit - // - }, - - highlight: function (element) { // hightlight error inputs - $(element) - .closest('.form-group').addClass('has-error'); // set error class to the control group - }, - - success: function (label) { - label.closest('.form-group').removeClass('has-error'); - label.remove(); - }, - - errorPlacement: function (error, element) { - if (element.attr("name") == "tnc") { // insert checkbox errors after the container - error.insertAfter($('#register_tnc_error')); - } else if (element.closest('.input-icon').size() === 1) { - error.insertAfter(element.closest('.input-icon')); - } else { - error.insertAfter(element); - } - }, - - submitHandler: function (form) { - form[0].submit(); - } - }); - - $('.register-form input').keypress(function (e) { - if (e.which == 13) { - if ($registrationForm.validate().form()) { - $registrationForm.submit(); - } - return false; - } - }); - }; - - return { - - /* - |---------------------------------------------- - | Main function to initiate the module - |---------------------------------------------- - */ - - init: function () { - handleRegister(); - } - }; - -}(); - -jQuery(document).ready(function () { - Register.init(); -}); diff --git a/storage/build/scripts/dev-env/build.sh b/storage/build/scripts/dev-env/build.sh index 82d9d4c..d6f7521 100755 --- a/storage/build/scripts/dev-env/build.sh +++ b/storage/build/scripts/dev-env/build.sh @@ -4,8 +4,8 @@ #docker build -f storage/build/scripts/php_7/Dockerfile -t audithsoftworks/basis:php_7 .; #docker build -f storage/build/scripts/php_7-fpm/Dockerfile -t audithsoftworks/basis:php_7-fpm .; -#docker-compose build -#docker-compose pull; +#docker-compose build; +docker-compose pull; docker-compose down; docker-compose up -d; @@ -95,6 +95,3 @@ docker-compose exec dev-env bash -c " ./vendor/bin/phpunit --debug --verbose --no-coverage --testsuite='SauceWebDriver'; "; - -#stty cols 239 rows 61; -#docker-compose down; diff --git a/tests/WebUi/SauceWebDriver/AuthenticationTest.php b/tests/WebUi/SauceWebDriver/AuthenticationTest.php index 1669025..2a4d93f 100644 --- a/tests/WebUi/SauceWebDriver/AuthenticationTest.php +++ b/tests/WebUi/SauceWebDriver/AuthenticationTest.php @@ -1,7 +1,6 @@