1
0
mirror of https://github.com/kakwa/ldapcherry synced 2024-11-11 12:08:51 +01:00

modifying the templates to include custom ppolicy error message

This commit is contained in:
kakwa 2015-11-02 23:25:01 +01:00
parent 27e05ac7f2
commit 7a1fb0dc8c
4 changed files with 7 additions and 4 deletions

View File

@ -6,7 +6,7 @@
</div> </div>
<div class="col-md-12 column"> <div class="col-md-12 column">
<div class="well well-sm"> <div class="well well-sm">
<form method='POST' action='/adduser' role="form" class="form-signin" data-toggle="validator"> <form method='POST' action='/adduser' role="form" class="form-signin" id=form>
<fieldset> <fieldset>
<legend>Fill new user's attributes:</legend> <legend>Fill new user's attributes:</legend>
${form} ${form}
@ -22,6 +22,7 @@
</div> </div>
</div> </div>
</form> </form>
<script type="text/javascript" src="/static/js/ppolicy.js"></script>
</div> </div>
</div> </div>
<div class="col-md-2 column"> <div class="col-md-2 column">

View File

@ -57,7 +57,7 @@ for a in sorted(attributes.keys(), key=lambda attr: attributes[attr]['weight']):
%endfor %endfor
</select> </select>
% elif attr['type'] == 'password': % elif attr['type'] == 'password':
<input type="password" class="form-control" data-error="Don't meet password policy" data-remote="/checkppolicy" name="attr.${a}1" id="${a}1" placeholder="${attr['description']}" ${required}> <input type="password" class="form-control" data-ppolicy="ppolicy" name="attr.${a}1" id="${a}1" placeholder="${attr['description']}" ${required}>
<span class="input-group-addon" id="basic-addon-${a}2">Retype ${attr['display_name']}</span> <span class="input-group-addon" id="basic-addon-${a}2">Retype ${attr['display_name']}</span>
<input type="password" class="form-control" data-match="#${a}1" data-match-error="Passwords don't match" name="attr.${a}2" id="#${a}2" placeholder="Confirm" ${required}> <input type="password" class="form-control" data-match="#${a}1" data-match-error="Passwords don't match" name="attr.${a}2" id="#${a}2" placeholder="Confirm" ${required}>
% endif % endif

View File

@ -6,7 +6,7 @@
</div> </div>
<div class="col-md-12 column"> <div class="col-md-12 column">
<div class="well well-sm"> <div class="well well-sm">
<form method='POST' action='/modify' role="form" class="form-signin" data-toggle="validator"> <form method='POST' action='/modify' role="form" class="form-signin" id="form">
<fieldset> <fieldset>
<legend>Modify user's attributes:</legend> <legend>Modify user's attributes:</legend>
${form} ${form}
@ -62,6 +62,7 @@
</div> </div>
</div> </div>
</form> </form>
<script type="text/javascript" src="/static/js/ppolicy.js"></script>
</div> </div>
</div> </div>
<div class="col-md-2 column"> <div class="col-md-2 column">

View File

@ -6,7 +6,7 @@
</div> </div>
<div class="col-md-12 column"> <div class="col-md-12 column">
<div class="well well-sm"> <div class="well well-sm">
<form method='POST' action='/selfmodify' role="form" class="form-signin" data-toggle="validator"> <form method='POST' action='/selfmodify' role="form" class="form-signin" id="form">
<legend>Modify your attributes:</legend> <legend>Modify your attributes:</legend>
${form} ${form}
</fieldset> </fieldset>
@ -17,6 +17,7 @@
</div> </div>
</div> </div>
</form> </form>
<script type="text/javascript" src="/static/js/ppolicy.js"></script>
</div> </div>
</div> </div>
<div class="col-md-2 column"> <div class="col-md-2 column">