pyc-website
main website for pyc inc.
git clone https://9o.is/git/pyc-website.git
commit b29daff2fc4b2f1d35a02f28e550c1c9ce8f7a27 parent aec062e9d669bf8f2b705bc23c0f93f2011b60fc Author: Jul <jul@9o.is> Date: Tue, 24 Jun 2014 12:39:56 -0400 forms displays error in text Diffstat:
7 files changed, 36 insertions(+), 8 deletions(-)
diff --git a/src/main/webapp/less/overrides.less b/src/main/webapp/less/overrides.less @@ -203,7 +203,7 @@ body { &:focus { border-color: @brand-success !important; color: @gray-darkest !important; - background: none; + background: @white; } } } @@ -222,7 +222,7 @@ body { &:focus { border-color: @brand-danger !important; color: @gray-darkest !important; - background: none; + background: @white; } } } diff --git a/src/main/webapp/templates-hidden/parts/apply-atm-form.html b/src/main/webapp/templates-hidden/parts/apply-atm-form.html @@ -1,4 +1,4 @@ -<div data-lift="AtmApplication" ng-controller="AtmApplicationCtrl"> +<div data-lift="AtmApplication" ng-controller="AtmApplicationCtrl" ng-cloak> <form name="form" class="smart-form client-form" ng-submit="save()" novalidate> <fieldset> <section> @@ -14,6 +14,9 @@ <i class="icon-append fa fa-envelope-o"></i> <input name="email" ng-model="model.email" placeholder="E-Mail" type="email" required> <b class="tooltip tooltip-top-left">Please provide your business email for further information.</b> + <span ng-show="form.email.$invalid && form.email.$dirty" class="text-danger small"> + Invalid email address + </span> </label> </section> @@ -22,6 +25,9 @@ <i class="icon-append fa fa-phone"></i> <input name="phone" ng-model="model.phone" ui-mask="(999) 999-9999" placeholder="(xxx) xxx-xxxx" type="text" required> <b class="tooltip tooltip-top-left">Please provide phone number for this contact.</b> + <span ng-show="form.phone.$invalid && form.phone.$dirty" class="text-danger small"> + Incomplete phone number + </span> </label> </section> @@ -53,6 +59,9 @@ <i class="icon-append fa fa-globe"></i> <input name="website" ng-model="model.website" placeholder="Website URL" type="text" ng-pattern="url_regex"> <b class="tooltip tooltip-top-left">The website URL of your business.</b> + <span ng-show="form.website.$error.pattern" class="text-danger small"> + Invalid website url + </span> </label> </section> diff --git a/src/main/webapp/templates-hidden/parts/change-password-form.html b/src/main/webapp/templates-hidden/parts/change-password-form.html @@ -3,18 +3,24 @@ <fieldset> <section> <label>New Password</label> - <label class="input"> + <label class="input" ng-class="{{ stateSuccessError('password') }}"> <i class="icon-append fa fa-key"></i> <input name="password" ng-model="model.password" type="password" ng-pattern="password_regex" required> <b class="tooltip tooltip-top-left">Enter your new password.</b> + <span ng-show="form.password.$error.pattern" class="text-danger small"> + At least 8 alphanumeric characters are required + </span> </label> </section> <section> <label>Confirm Password</label> - <label class="input"> + <label class="input" ng-class="{{ stateSuccessError('passwordconfirm') }}"> <i class="icon-append fa fa-key"></i> <input name="passwordconfirm" ng-model="model.passwordconfirm" type="password" data-match="model.password" required> <b class="tooltip tooltip-top-left">Enter your new password again to confirm.</b> + <span ng-show="model.password != model.passwordconfirm" class="text-danger small"> + Passwords do not match + </span> </label> </section> </fieldset> diff --git a/src/main/webapp/templates-hidden/parts/find-atm-form.html b/src/main/webapp/templates-hidden/parts/find-atm-form.html @@ -6,6 +6,9 @@ <label class="input"> <input name="postal" ng-model="model.postal" type="text" placeholder="zip code" ng-pattern="zip_code_regex" required> <b class="tooltip tooltip-top-left">Enter zip code.</b> + <span class="ng-hide help-block text-white small" ng-show="form.postal.$error.pattern"> + Invalid zip code + </span> </label> </section> </div> @@ -15,7 +18,6 @@ </div> <div class="row" style="margin:0"> <div class="col-xs-12" style="margin-top:-10px;"> - <span class="ng-hide help-block text-white" ng-show="form.postal.$error.pattern">Zip code is not valid</span> <span class="help-block text-white">Find nearby ATMs by searching with your zip code.</span> </div> </div> diff --git a/src/main/webapp/templates-hidden/parts/notify-atm-form.html b/src/main/webapp/templates-hidden/parts/notify-atm-form.html @@ -1,4 +1,4 @@ -<div data-lift="NearAtmNotify" ng-controller="NearAtmNotifyCtrl"> +<div data-lift="NearAtmNotify" ng-controller="NearAtmNotifyCtrl" ng-cloak> <form name="form" class="smart-form client-form" ng-submit="save()" novalidate> <header>Notify me when there is a nearby ATM</header> <fieldset> @@ -25,6 +25,9 @@ <i class="icon-append fa fa-envelope-o"></i> <input name="email" ng-model="model.email" placeholder="E-mail" type="email" required> <b class="tooltip tooltip-top-left">Enter your email address so we can notify you.</b> + <span ng-show="form.email.$invalid && form.email.$dirty" class="text-danger small"> + Invalid email address + </span> </label> </section> @@ -32,7 +35,9 @@ <label class="input" ng-class="{{ stateSuccessError('postal') }}"> <input name="postal" ng-model="model.postal" placeholder="Post code" type="text" ng-pattern="zip_code_regex" required/> <b class="tooltip tooltip-top-left">Enter the zip code you want the ATM to be located.</b> - <em class="ng-hide" ng-show="form.postal.$error.pattern">Postal code is not valid</em> + <span ng-show="form.postal.$error.pattern" class="text-danger small"> + Invalid postal code + </span> </label> </section> </div> diff --git a/src/main/webapp/templates-hidden/parts/user-registration-form.html b/src/main/webapp/templates-hidden/parts/user-registration-form.html @@ -21,6 +21,9 @@ <i class="icon-append fa fa-envelope-o"></i> <input name="email" ng-model="model.email" placeholder="E-Mail" type="email" required> <b class="tooltip tooltip-top-left">You'll use this email when you log in and if you ever need to reset your password.</b> + <span ng-show="form.email.$invalid && form.email.$dirty" class="text-danger small"> + Invalid email address + </span> </label> </section> diff --git a/src/main/webapp/templates-hidden/parts/user-settings-email-form.html b/src/main/webapp/templates-hidden/parts/user-settings-email-form.html @@ -6,6 +6,9 @@ <label class="input" ng-class="{{ stateSuccessError('email') }}"> <i class="icon-append fa fa-envelope-o"></i> <input name="email" ng-model="model.email" type="email"> + <span ng-show="form.email.$invalid" class="text-danger small"> + Invalid email address + </span> </label> </section> </fieldset>