Commit 26f4947d5d0289019ca470461d2608ee2084865e
1 parent
f4890c57
Exists in
master
and in
5 other branches
modifying register user #205
Showing
3 changed files
with
70 additions
and
63 deletions
Show diff stats
core/static/css/base/amadeus.css
@@ -352,4 +352,11 @@ ul, li { | @@ -352,4 +352,11 @@ ul, li { | ||
352 | } | 352 | } |
353 | .form-group{ | 353 | .form-group{ |
354 | margin-top: 10px; | 354 | margin-top: 10px; |
355 | +} | ||
356 | + | ||
357 | +/* core/register_user.html classes*/ | ||
358 | + | ||
359 | +.block-register-inline{ | ||
360 | + float: left; | ||
361 | + display: inline-block; | ||
355 | } | 362 | } |
356 | \ No newline at end of file | 363 | \ No newline at end of file |
core/templates/index.html
@@ -11,12 +11,9 @@ | @@ -11,12 +11,9 @@ | ||
11 | 11 | ||
12 | {% block content %} | 12 | {% block content %} |
13 | <div class="row"> | 13 | <div class="row"> |
14 | - <div class="col-sm-6 col-sm-offset-4 col-md-6 col-md-offset-4 | ||
15 | - col-xs-6 col-xs-offset-4 col-lg-6 col-lg-offset-4 col-xl-6 col-xl-offset-4 "> | 14 | + <div class="col-sm-6 col-sm-offset-4 col-md-6 col-md-offset-4 col-xs-6 col-xs-offset-4 col-lg-6 col-lg-offset-4 col-xl-6 col-xl-offset-4 "> |
16 | <div class="col-sm-8 col-sm-offset-2 col-md-8 col-md-offset-2 col-xs-8 col-xs-offset-2 col-lg-8 col-lg-offset-2 col-xl-8 col-xl-offset-2"> | 15 | <div class="col-sm-8 col-sm-offset-2 col-md-8 col-md-offset-2 col-xs-8 col-xs-offset-2 col-lg-8 col-lg-offset-2 col-xl-8 col-xl-offset-2"> |
17 | - | ||
18 | <img src="{% static 'img/amadeus.png' %}" class="img-responsive center-block logo-login " alt="logo amadeus"> | 16 | <img src="{% static 'img/amadeus.png' %}" class="img-responsive center-block logo-login " alt="logo amadeus"> |
19 | - | ||
20 | </div> | 17 | </div> |
21 | </div> | 18 | </div> |
22 | </div> | 19 | </div> |
core/templates/register_user.html
@@ -19,81 +19,84 @@ | @@ -19,81 +19,84 @@ | ||
19 | {% endfor %} | 19 | {% endfor %} |
20 | {% endif %} | 20 | {% endif %} |
21 | <div class="row"> | 21 | <div class="row"> |
22 | - <div class="col-lg-offset-2 col-lg-8 col-md-offset-2 col-md-8 col-xs-offset-2 col-xs-8 col-sm-offset-2 col-sm-8"> | ||
23 | - <div class="col-lg-8 col-md-8 col-xs-8 col-sm-8"> | ||
24 | - <img src="{% static 'img/amadeus.png' %}" class="img-responsive center-block " alt="logo amadeus" id="logo"> | ||
25 | - </div> | ||
26 | - </div> | 22 | + <div class="col-sm-6 col-sm-offset-4 col-md-6 col-md-offset-4 col-xs-6 col-xs-offset-4 col-lg-6 col-lg-offset-4 col-xl-6 col-xl-offset-4 "> |
23 | + <div class="col-sm-8 col-sm-offset-2 col-md-8 col-md-offset-2 col-xs-8 col-xs-offset-2 col-lg-8 col-lg-offset-2 col-xl-8 col-xl-offset-2"> | ||
24 | + <img src="{% static 'img/amadeus.png' %}" class="img-responsive center-block logo-login " alt="logo amadeus"> | ||
25 | + </div> | ||
26 | + </div> | ||
27 | </div> | 27 | </div> |
28 | 28 | ||
29 | <div class="row"> | 29 | <div class="row"> |
30 | - <div class="col-lg-8 col-lg-offset-1 col-md-8 col-md-offset-1 col-sm-8 col-sm-offset-1 col-xs-8 col-xs-offset-1"> | 30 | + <div class="col-md-8 col-md-offset-3 col-sm-10 col-sm-offset-2 col-xs-12 col-xs-offset-1 col-lg-10 col-lg-offset-2 col-xl-8 col-xl-offset-3"> |
31 | <div class="card"> | 31 | <div class="card"> |
32 | <div class="card-content"> | 32 | <div class="card-content"> |
33 | <div class="card-body"> | 33 | <div class="card-body"> |
34 | - <form class="form-horizontal" name="registerForm" method="post" action="" enctype="multipart/form-data"> | 34 | + <form class="form-horizontal" name="registerForm" method="post" id="register-user" enctype="multipart/form-data"> |
35 | {% csrf_token %} | 35 | {% csrf_token %} |
36 | - <legend>{% trans 'User Register' %}</legend> | ||
37 | - {% for field in form %} | ||
38 | - <div class="form-group is-empy{% if form.has_error %} has-error {% endif %} is-fileinput"> | ||
39 | - {% if field.field.required %} | ||
40 | - <label for="{{ field.auto_id }}" class="col-md-4 control-label">{{ field.label }}<span>*</span></label> | ||
41 | - {% else %} | ||
42 | - <label for="{{ field.auto_id }}" class="col-md-4 control-label">{{ field.label }}</label> | ||
43 | - {% endif %} | ||
44 | - <div class="col-md-8"> | ||
45 | - {% if field.auto_id == 'id_birth_date' %} | ||
46 | - {% render_field field class='form-control input-sm date-picker' %} | ||
47 | - | ||
48 | - <span id="helpBlock" class="help-block">{{ field.help_text }}</span> | ||
49 | - {% elif field.auto_id == 'id_image' %} | ||
50 | - {% render_field field class='form-control input-sm' %} | ||
51 | - <div class="input-group"> | ||
52 | - <input type="text" readonly="" class="form-control" placeholder="Choose your photo..."> | ||
53 | - <span class="input-group-btn input-group-sm"> | ||
54 | - <button type="button" class="btn btn-fab btn-fab-mini"> | ||
55 | - <i class="material-icons">attach_file</i> | ||
56 | - </button> | ||
57 | - </span> | ||
58 | - </div> | ||
59 | - {% elif field.auto_id == 'id_cpf' %} | ||
60 | - {% render_field field class='form-control' onkeypress='campoNumerico(this,event); formatarCpf(this,event);' %} | 36 | + <h2>{% trans 'User Register' %}</h2> |
37 | + <hr> | ||
38 | + <div class="row"> | ||
39 | + <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12"> | ||
40 | + {% for field in form %} | ||
41 | + <div class="form-group {% if form.has_error %} has-error {% endif %} is-fileinput block-register-inline"> | ||
42 | + {% if field.field.required %} | ||
43 | + <label for="{{ field.auto_id }}" class="col-md-4 control-label">{{ field.label }}<span>*</span></label> | ||
44 | + {% else %} | ||
45 | + <label for="{{ field.auto_id }}" class="col-md-4 control-label">{{ field.label }}</label> | ||
46 | + {% endif %} | ||
47 | + <div class="col-md-8 col-lg-10 col-lg-offset-2"> | ||
48 | + {% if field.auto_id == 'id_birth_date' %} | ||
49 | + {% render_field field class='form-control input-sm date-picker' %} | ||
50 | + <span id="helpBlock" class="help-block">{{ field.help_text }}</span> | ||
51 | + {% elif field.auto_id == 'id_image' %} | ||
52 | + {% render_field field class='form-control input-sm' %} | ||
53 | + <div class="input-group"> | ||
54 | + <input type="text" readonly="" class="form-control" placeholder="Choose your photo..."> | ||
55 | + <span class="input-group-btn input-group-sm"> | ||
56 | + <button type="button" class="btn btn-fab btn-fab-mini"> | ||
57 | + <i class="material-icons">attach_file</i> | ||
58 | + </button> | ||
59 | + </span> | ||
60 | + </div> | ||
61 | + {% elif field.auto_id == 'id_cpf' %} | ||
62 | + {% render_field field class='form-control' onkeypress='campoNumerico(this,event); formatarCpf(this,event);' %} | ||
61 | 63 | ||
62 | - {% elif field.auto_id == 'id_phone' %} | ||
63 | - {% render_field field class='form-control' onkeypress='campoNumerico(this,event); formatarTelefone(this,event);' %} | ||
64 | - {% else %} | ||
65 | - {% render_field field class='form-control' %} | ||
66 | - <span id="helpBlock" class="help-block">{{ field.help_text }}</span> | ||
67 | - {% endif %} | ||
68 | - </div> | ||
69 | - | ||
70 | - {% if field.errors %} | ||
71 | - <div class="alert alert-danger alert-dismissible col-md-offset-4 col-md-8" role="alert"> | ||
72 | - <button type="button" class="close" data-dismiss="alert" aria-label="Close"> | ||
73 | - <span aria-hidden="true">×</span> | ||
74 | - </button> | ||
75 | - <ul> | ||
76 | - {% for error in field.errors %} | ||
77 | - <li>{{ error }}</li> | 64 | + {% elif field.auto_id == 'id_phone' %} |
65 | + {% render_field field class='form-control' onkeypress='campoNumerico(this,event); formatarTelefone(this,event);' %} | ||
66 | + {% else %} | ||
67 | + {% render_field field class='form-control' %} | ||
68 | + <span id="helpBlock" class="help-block">{{ field.help_text }}</span> | ||
69 | + {% endif %} | ||
70 | + </div> | ||
71 | + | ||
72 | + {% if field.errors %} | ||
73 | + <div class="alert alert-danger alert-dismissible col-md-offset-4 col-md-8" role="alert"> | ||
74 | + <button type="button" class="close" data-dismiss="alert" aria-label="Close"> | ||
75 | + <span aria-hidden="true">×</span> | ||
76 | + </button> | ||
77 | + <ul> | ||
78 | + {% for error in field.errors %} | ||
79 | + <li>{{ error }}</li> | ||
80 | + {% endfor %} | ||
81 | + </ul> | ||
82 | + </div> | ||
83 | + {% endif %} | ||
84 | + </div> | ||
78 | {% endfor %} | 85 | {% endfor %} |
79 | - </ul> | 86 | + <div class="col-md-6 col-xs-6 col-sm-6 col-lg-5 col-lg-offset-1 text-center"> |
87 | + <input type="submit" value="{% trans 'Save' %}" class="btn btn-success btn-raised" /> | ||
88 | + </div> | ||
89 | + <div class="col-md-6 col-xs-6 col-sm-6 col-lg-5 text-center"> | ||
90 | + <a href="{% url 'core:home' %}" class="btn btn-default btn-raised" >{% trans 'Cancel' %}</a> | ||
91 | + </div> | ||
80 | </div> | 92 | </div> |
81 | - {% endif %} | ||
82 | - </div> | ||
83 | - {% endfor %} | ||
84 | - <div class="col-md-offset-4 col-md-2 col-sm-2 col-xs-2"> | ||
85 | - <input type="submit" value="{% trans 'Save' %}" class="btn btn-sm btn-success" /> | ||
86 | </div> | 93 | </div> |
87 | - <div class="col-md-offset-3 col-md-2 col-sm-2 col-xs-2"> | ||
88 | - <a href="{% url 'core:home' %}" class="btn btn-sm btn-success" >{% trans 'Cancel' %}</a> | ||
89 | - </div> | ||
90 | - | ||
91 | </form> | 94 | </form> |
92 | </div> | 95 | </div> |
93 | </div> | 96 | </div> |
94 | </div> | 97 | </div> |
95 | </div> | 98 | </div> |
96 | </div> | 99 | </div> |
97 | - | 100 | + |
98 | <br clear="all" /> | 101 | <br clear="all" /> |
99 | {% endblock %} | 102 | {% endblock %} |