You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by ma...@apache.org on 2017/06/16 20:36:43 UTC

[40/50] [abbrv] airavata-php-gateway git commit: AIRAVATA-2342 Displaying password validation msg on reset password

AIRAVATA-2342 Displaying password validation msg on reset password


Project: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/commit/d0216687
Tree: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/tree/d0216687
Diff: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/diff/d0216687

Branch: refs/heads/develop
Commit: d021668776df0dce970a469bbd1be17cf28be935
Parents: 12bcfca
Author: Marcus Christie <ma...@iu.edu>
Authored: Wed May 24 17:48:07 2017 -0400
Committer: Marcus Christie <ma...@iu.edu>
Committed: Wed May 24 17:48:07 2017 -0400

----------------------------------------------------------------------
 app/controllers/AccountController.php      |  4 ++--
 app/views/account/reset-password.blade.php | 18 +++++++++++++++---
 2 files changed, 17 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/d0216687/app/controllers/AccountController.php
----------------------------------------------------------------------
diff --git a/app/controllers/AccountController.php b/app/controllers/AccountController.php
index a3a6194..d8d4a4e 100644
--- a/app/controllers/AccountController.php
+++ b/app/controllers/AccountController.php
@@ -319,7 +319,7 @@ class AccountController extends BaseController
         if(empty($username) || empty($code)){
             return Redirect::to("forgot-password")->with("password-reset-error", "Reset password link failed. Please request to reset user password again.");
         }else{
-            return View::make("account/reset-password", array("code" => $code, "username"=>$username));
+            return View::make("account/reset-password", array("code" => $code, "username"=>$username, "password_regex_tooltip"=>self::PASSWORD_VALIDATION_MESSAGE));
         }
     }
 
@@ -411,7 +411,7 @@ class AccountController extends BaseController
             "confirm_new_password" => "required|same:new_password",
         );
         $messages = array(
-            'password.regex' => self::PASSWORD_VALIDATION_MESSAGE,
+            'new_password.regex' => self::PASSWORD_VALIDATION_MESSAGE,
         );
 
         $validator = Validator::make(Input::all(), $rules, $messages);

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/d0216687/app/views/account/reset-password.blade.php
----------------------------------------------------------------------
diff --git a/app/views/account/reset-password.blade.php b/app/views/account/reset-password.blade.php
index 6254415..6edf3a4 100644
--- a/app/views/account/reset-password.blade.php
+++ b/app/views/account/reset-password.blade.php
@@ -23,10 +23,13 @@
         <div class="form-group form-horizontal">
             <input name="username" type="hidden" value="{{$username}}" class="form-control"/>
             <input name="code" type="hidden" value="{{{$code}}}" class="form-control"/>
-            <div class="form-group required"><label class="control-label">Password</label>
+            <div class="form-group required"><label class="control-label">New Password</label>
 
                 <div><input class="form-control" id="new_password" minlength="6" name="new_password" placeholder="New Password"
-                            required="required" title="" type="password"/></div>
+                            required="required" title="" type="password"
+                            data-container="body" data-toggle="popover" data-placement="left"
+                            data-content="{{{ $password_regex_tooltip }}}"/>
+                </div>
             </div>
             <div class="form-group required"><label class="control-label">New Password (again)</label>
                 <div><input class="form-control" id="confirm_new_password" name="confirm_new_password"
@@ -42,4 +45,13 @@
         </div>
     </form>
 </div>
-@stop
\ No newline at end of file
+@stop
+
+@section('scripts')
+@parent
+<script>
+    $("#new_password").popover({
+        'trigger':'focus'
+    });
+</script>
+@stop