Commit fd683439 authored by Roberto P. Rubio's avatar Roberto P. Rubio
Browse files

Password length error

parent be4b6891
<html>
%= include 'bootstrap/header'
<body id="page-top" data-spy="scroll" data-target=".fixed-top" role="document">
<body id="page-top" data-spy="scroll" data-target=".fixed-top" role="document" ng-app="ravada.app">
<div id="wrapper">
%= include 'bootstrap/navigation'
<div id="page-wrapper">
......
<div class="card">
<div class="card-body">
<form method="post">
<form method="post" name="form">
<label for="password"><%=l 'New password' %></label><br/>
<input type="text" name="password">
<input type="text" name="password" ng-model="password" ng-minlength="6">
<br>
<br>
<input type="checkbox" name="force_change_password" value="1" checked>
<label for="force_change_password"><%=l 'Force change password on first access' %></label><br/>
<input type="submit" class="btn btn-primary" name="set_password" value="<%=l 'Set New Password' %>" onclick="return ((password.value) && (password.value.length >= 6)) ? true : false;">
<div ng-show="form.$submitted || (form.password.$touched && form.password.$dirty)">
<div ng-show="form.password.$error.minlength" class="alert alert-warning">
<strong><%=l 'Oops!' %></strong>&nbsp;<%=l 'New Password must be at least 6 characters' %>.
</div>
</div>
<input type="submit" class="btn btn-primary" name="set_password" value="<%=l 'Set New Password' %>">
</form>
</div>
</div>
......@@ -2,7 +2,7 @@
<form name="form" role="form" method="post" action="/user/change_password" novalidate>
<div class="from-group">
<label for="old_password"><%=l 'Old Password' %></label>
<input class="form-control" ng-model="old_password" ng-model-onblur placeholder="<%=l 'Enter Old Password' %>" type="password" ng-minlength="6" name="old_password" id="old_password" required="true" ng-pattern="/^[a-zA-Z0-9]*$/"><br/>
<input class="form-control" ng-model="old_password" ng-model-onblur placeholder="<%=l 'Enter Old Password' %>" type="password" name="old_password" id="old_password" required="true" ng-pattern="/^[a-zA-Z0-9]*$/"><br/>
</div>
<div class="from-group">
<label for="new_password"><%=l 'New Password' %></label>
......@@ -10,15 +10,12 @@
</div>
<div class="from-group">
<label for="repeated_new_password"><%=l 'Repeat New Password' %></label>
<input class="form-control" ng-model="repeated_new_password" ng-model-onblur placeholder="<%=l 'Re-Enter New Password' %>" type="password" ng-minlength="6" name="repeated_new_password" id="repeated_new_password" required="true" ng-pattern="/^[a-zA-Z0-9]*$/"><br/>
<input class="form-control" ng-model="repeated_new_password" ng-model-onblur placeholder="<%=l 'Re-Enter New Password' %>" type="password" name="repeated_new_password" id="repeated_new_password" required="true" ng-pattern="/^[a-zA-Z0-9]*$/"><br/>
</div>
<div ng-show="form.$submitted || (form.old_password.$touched && form.old_password.$dirty)">
<div ng-show="form.old_password.$error.required" class="alert alert-warning">
<strong><%=l 'Oops!' %></strong>&nbsp;<%=l 'Old Password is required' %>.
</div>
<div ng-show="form.old_password.$error.minlength" class="alert alert-warning">
<strong><%=l 'Oops!' %></strong>&nbsp;<%=l 'Old Password must be at least 6 characters' %>.
</div>
<div ng-show="form.old_password.$error.pattern" class="alert alert-warning">
<strong><%=l 'Oops!' %></strong>&nbsp;<%=l 'Old Password can only contain words and numbers' %>.
</div>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment