|
| 1 | +{% extends "template.html" %} |
| 2 | +{% block title %}{{ title }}{% endblock %} |
| 3 | + |
| 4 | +{% block scripthead %} |
| 5 | +<script type="text/javascript" src="/static/jquery-1.5.2.min.js"></script> |
| 6 | +<script type="text/javascript" src="/static/jquery.validate.min.js"></script> |
| 7 | + |
| 8 | +<style type="text/css"> |
| 9 | +* { font-family: Verdana; font-size: 96%; } |
| 10 | +label { width: 10em; float: left; } |
| 11 | +label.error { float: none; color: red; padding-left: .5em; vertical-align: top; } |
| 12 | +p { clear: both; } |
| 13 | +.submit { margin-left: 12em; } |
| 14 | +em { font-weight: bold; padding-right: 1em; vertical-align: top; } |
| 15 | +</style> |
| 16 | + |
| 17 | + |
| 18 | +<script> |
| 19 | + $(document).ready(function(){ |
| 20 | + $("#newUserForm").validate(); |
| 21 | + }); |
| 22 | + |
| 23 | + $("#newUserForm").validate({ |
| 24 | + rules: { |
| 25 | + password: "required", |
| 26 | + password_again: { |
| 27 | + equalTo: "#password" |
| 28 | + } |
| 29 | + } |
| 30 | +}); |
| 31 | + |
| 32 | +</script> |
| 33 | + |
| 34 | +{% endblock %} |
| 35 | + |
| 36 | +{% block content %} |
| 37 | + <h1>Create new user</h1> |
| 38 | + |
| 39 | + <form id="newUserForm" method="post" action="create"> |
| 40 | + <fieldset> |
| 41 | + <legend>Create a new user </legend> |
| 42 | + <p> |
| 43 | + <label for="nick">Nickname</label> |
| 44 | + <em>*</em><input id="nick" name="nick" size="25" class="required" minlength="3" /> |
| 45 | + </p> |
| 46 | + <p> |
| 47 | + <label for="fullname">Full name</label> |
| 48 | + <em>*</em><input id="fullname" name="fullname" size="25" class="required" minlength="5" /> |
| 49 | + </p> |
| 50 | + <p> |
| 51 | + <label for="email">E-Mail</label> |
| 52 | + <em>*</em><input id="email" name="email" size="25" class="required email" /> |
| 53 | + </p> |
| 54 | + <p> |
| 55 | + <label for="jid">Jabber ID</label> |
| 56 | + <em></em><input id="jid" name="jid" size="25" class="optional email" /> |
| 57 | + </p> |
| 58 | + |
| 59 | + <p> |
| 60 | + <label for="password">Your password</label> |
| 61 | + <em>*</em><input type="password" id="password" name="password" size="16" class="required" /> |
| 62 | + </p> |
| 63 | + |
| 64 | + <p> |
| 65 | + <label for="password_again">Again:</label> |
| 66 | + <em>*</em><input type="password" id="password_again" name="password_again" size="16" class="required" /> |
| 67 | + </p> |
| 68 | + |
| 69 | + <p> |
| 70 | + <input class="submit" type="submit" value="Submit"/> |
| 71 | + </p> |
| 72 | + </fieldset> |
| 73 | + </form> |
| 74 | + |
| 75 | + |
| 76 | + |
| 77 | +{% endblock %} |
| 78 | + |
| 79 | + |
0 commit comments