Skip to content

Commit

Permalink
sync mobile signups with desktop - institutotim#4
Browse files Browse the repository at this point in the history
  • Loading branch information
moacirmoda committed Oct 13, 2016
1 parent 4960eb8 commit c3c468c
Show file tree
Hide file tree
Showing 2 changed files with 91 additions and 54 deletions.
72 changes: 45 additions & 27 deletions themes/ifs-colors/templates/account/signup.html
Original file line number Diff line number Diff line change
Expand Up @@ -190,72 +190,90 @@ <h1>
</div>
</div>
<form onclick="event.stopPropagation()" method="post" action="{% url 'account_signup' %}" class="form-horizontal">{% csrf_token %}
{% with errors=form.username.errors %}
{% with errors=form.how_you_know.errors %}
<div class="form-group{{ errors|yesno:' has-error,' }}">
<label class="col-xs-12 control-label">{% trans "Username" %}</label>
<div class="col-xs-12">
<input name="username" type="text" value="{{form.username.value}}" class="form-control" placeholder="{% trans 'Username' %}" required>
<label class="col-lg-4 col-sm-4 control-label">Como você conheceu a plataforma TIM Tec?</label>
<div class="col-lg-8 col-sm-8">
<select name="how_you_know" class="form-control" required>
<option>Indicação de amigo</option>
<option>Facebook</option>
<option>Twitter</option>
<option>Através da Imprensa</option>
<option>Pesquisa no Google</option>
<option>Vi em minha escola/empresa</option>
<option>Outro</option>
</select>
{% for error in errors %}<small>{{error}}</small>{% endfor %}
</div>
</div>
{% endwith %}

{% with errors=form.email.errors %}
{% with errors=form.first_name.errors %}
<div class="form-group{{ errors|yesno:' has-error,' }}">
<label class="col-xs-12 control-label">{% trans "E-mail" %}</label>
<div class="col-xs-12">
<input name="email" type="email" value="{{form.email.value}}" class="form-control" placeholder="Your e-mail" required>
<label class="col-lg-4 col-sm-4 control-label">{{ form.first_name.label }}</label>
<div class="col-lg-8 col-sm-8">
<input name="first_name" type="text" value="{{form.first_name.value|default_if_none:""}}" class="form-control" placeholder="{{ form.first_name.label }}" required>
{% for error in errors %}<small>{{error}}</small>{% endfor %}
</div>
</div>
{% endwith %}

{% with errors=form.password1.errors %}
{% with errors=form.last_name.errors %}
<div class="form-group{{ errors|yesno:' has-error,' }}">
<label class="col-xs-12 control-label">{% trans "Password" %}</label>
<div class="col-xs-12">
<p><input name="password1" type="password" class="form-control" placeholder="{% trans 'Really strong password' %}" required></p>
<input name="password2" type="password" class="form-control" placeholder="{% trans 'Password confirmation' %}" required>
<label class="col-lg-4 col-sm-4 control-label">{{ form.last_name.label }}</label>
<div class="col-lg-8 col-sm-8">
<input name="last_name" type="text" value="{{form.last_name.value|default_if_none:""}}" class="form-control" placeholder="{{ form.last_name.label }}" required>
{% for error in errors %}<small>{{error}}</small>{% endfor %}
</div>
</div>
{% endwith %}

{% with errors=form.first_name.errors %}
{% with errors=form.state.errors %}
<div class="form-group{{ errors|yesno:' has-error,' }}">
<label class="col-lg-4 col-sm-4 control-label">{{ form.first_name.label }}</label>
<label class="col-lg-4 col-sm-4 control-label">{{ form.state.label }}</label>
<div class="col-lg-8 col-sm-8">
<input name="first_name" type="text" value="{{form.first_name.value|default_if_none:""}}" class="form-control" placeholder="{{ form.first_name.label }}" required>
{{ form.state }}
{% for error in errors %}<small>{{error}}</small>{% endfor %}
</div>
</div>
{% endwith %}

{% with errors=form.last_name.errors %}
{% with errors=form.city.errors %}
<div class="form-group{{ errors|yesno:' has-error,' }}">
<label class="col-lg-4 col-sm-4 control-label">{{ form.last_name.label }}</label>
<label class="col-lg-4 col-sm-4 control-label">{{ form.city.label }}</label>
<div class="col-lg-8 col-sm-8">
<input name="last_name" type="text" value="{{form.last_name.value|default_if_none:""}}" class="form-control" placeholder="{{ form.last_name.label }}" required>
<input name="city" type="text" value="{{form.city.value|default_if_none:""}}" class="form-control" placeholder="{{ form.city.label }}" required>
{% for error in errors %}<small>{{error}}</small>{% endfor %}
</div>
</div>
{% endwith %}

{% with errors=form.city.errors %}
{% with errors=form.username.errors %}
<div class="form-group{{ errors|yesno:' has-error,' }}">
<label class="col-lg-4 col-sm-4 control-label">{{ form.city.label }}</label>
<div class="col-lg-8 col-sm-8">
<input name="city" type="text" value="{{form.city.value|default_if_none:""}}" class="form-control" placeholder="{{ form.city.label }}" required>
<label class="col-xs-12 control-label">{% trans "Username" %}</label>
<div class="col-xs-12">
<input name="username" type="text" value="{{form.username.value|default_if_none:""}}" class="form-control" placeholder="{% trans 'Username' %}" required>
{% for error in errors %}<small>{{error}}</small>{% endfor %}
</div>
</div>
{% endwith %}

{% with errors=form.state.errors %}
{% with errors=form.email.errors %}
<div class="form-group{{ errors|yesno:' has-error,' }}">
<label class="col-lg-4 col-sm-4 control-label">{{ form.state.label }}</label>
<div class="col-lg-8 col-sm-8">
{{ form.state }}
<label class="col-xs-12 control-label">{% trans "E-mail" %}</label>
<div class="col-xs-12">
<input name="email" type="email" value="{{form.email.value|default_if_none:""}}" class="form-control" placeholder="Your e-mail" required>
{% for error in errors %}<small>{{error}}</small>{% endfor %}
</div>
</div>
{% endwith %}

{% with errors=form.password1.errors %}
<div class="form-group{{ errors|yesno:' has-error,' }}">
<label class="col-xs-12 control-label">{% trans "Password" %}</label>
<div class="col-xs-12">
<p><input name="password1" type="password" class="form-control" placeholder="{% trans 'Really strong password' %}" required></p>
<input name="password2" type="password" class="form-control" placeholder="{% trans 'Password confirmation' %}" required>
{% for error in errors %}<small>{{error}}</small>{% endfor %}
</div>
</div>
Expand Down
73 changes: 46 additions & 27 deletions themes/timtec/templates/account/signup.html
Original file line number Diff line number Diff line change
Expand Up @@ -190,72 +190,91 @@ <h1>
</div>
</div>
<form onclick="event.stopPropagation()" method="post" action="{% url 'account_signup' %}" class="form-horizontal">{% csrf_token %}
{% with errors=form.username.errors %}

{% with errors=form.how_you_know.errors %}
<div class="form-group{{ errors|yesno:' has-error,' }}">
<label class="col-xs-12 control-label">{% trans "Username" %}</label>
<div class="col-xs-12">
<input name="username" type="text" value="{{form.username.value}}" class="form-control" placeholder="{% trans 'Username' %}" required>
<label class="col-lg-4 col-sm-4 control-label">Como você conheceu a plataforma TIM Tec?</label>
<div class="col-lg-8 col-sm-8">
<select name="how_you_know" class="form-control" required>
<option>Indicação de amigo</option>
<option>Facebook</option>
<option>Twitter</option>
<option>Através da Imprensa</option>
<option>Pesquisa no Google</option>
<option>Vi em minha escola/empresa</option>
<option>Outro</option>
</select>
{% for error in errors %}<small>{{error}}</small>{% endfor %}
</div>
</div>
{% endwith %}

{% with errors=form.email.errors %}
{% with errors=form.first_name.errors %}
<div class="form-group{{ errors|yesno:' has-error,' }}">
<label class="col-xs-12 control-label">{% trans "E-mail" %}</label>
<div class="col-xs-12">
<input name="email" type="email" value="{{form.email.value}}" class="form-control" placeholder="Your e-mail" required>
<label class="col-lg-4 col-sm-4 control-label">{{ form.first_name.label }}</label>
<div class="col-lg-8 col-sm-8">
<input name="first_name" type="text" value="{{form.first_name.value|default_if_none:""}}" class="form-control" placeholder="{{ form.first_name.label }}" required>
{% for error in errors %}<small>{{error}}</small>{% endfor %}
</div>
</div>
{% endwith %}

{% with errors=form.password1.errors %}
{% with errors=form.last_name.errors %}
<div class="form-group{{ errors|yesno:' has-error,' }}">
<label class="col-xs-12 control-label">{% trans "Password" %}</label>
<div class="col-xs-12">
<p><input name="password1" type="password" class="form-control" placeholder="{% trans 'Really strong password' %}" required></p>
<input name="password2" type="password" class="form-control" placeholder="{% trans 'Password confirmation' %}" required>
<label class="col-lg-4 col-sm-4 control-label">{{ form.last_name.label }}</label>
<div class="col-lg-8 col-sm-8">
<input name="last_name" type="text" value="{{form.last_name.value|default_if_none:""}}" class="form-control" placeholder="{{ form.last_name.label }}" required>
{% for error in errors %}<small>{{error}}</small>{% endfor %}
</div>
</div>
{% endwith %}

{% with errors=form.first_name.errors %}
{% with errors=form.state.errors %}
<div class="form-group{{ errors|yesno:' has-error,' }}">
<label class="col-lg-4 col-sm-4 control-label">{{ form.first_name.label }}</label>
<label class="col-lg-4 col-sm-4 control-label">{{ form.state.label }}</label>
<div class="col-lg-8 col-sm-8">
<input name="first_name" type="text" value="{{form.first_name.value|default_if_none:""}}" class="form-control" placeholder="{{ form.first_name.label }}" required>
{{ form.state }}
{% for error in errors %}<small>{{error}}</small>{% endfor %}
</div>
</div>
{% endwith %}

{% with errors=form.last_name.errors %}
{% with errors=form.city.errors %}
<div class="form-group{{ errors|yesno:' has-error,' }}">
<label class="col-lg-4 col-sm-4 control-label">{{ form.last_name.label }}</label>
<label class="col-lg-4 col-sm-4 control-label">{{ form.city.label }}</label>
<div class="col-lg-8 col-sm-8">
<input name="last_name" type="text" value="{{form.last_name.value|default_if_none:""}}" class="form-control" placeholder="{{ form.last_name.label }}" required>
<input name="city" type="text" value="{{form.city.value|default_if_none:""}}" class="form-control" placeholder="{{ form.city.label }}" required>
{% for error in errors %}<small>{{error}}</small>{% endfor %}
</div>
</div>
{% endwith %}

{% with errors=form.city.errors %}
{% with errors=form.username.errors %}
<div class="form-group{{ errors|yesno:' has-error,' }}">
<label class="col-lg-4 col-sm-4 control-label">{{ form.city.label }}</label>
<div class="col-lg-8 col-sm-8">
<input name="city" type="text" value="{{form.city.value|default_if_none:""}}" class="form-control" placeholder="{{ form.city.label }}" required>
<label class="col-xs-12 control-label">{% trans "Username" %}</label>
<div class="col-xs-12">
<input name="username" type="text" value="{{form.username.value|default_if_none:""}}" class="form-control" placeholder="{% trans 'Username' %}" required>
{% for error in errors %}<small>{{error}}</small>{% endfor %}
</div>
</div>
{% endwith %}

{% with errors=form.state.errors %}
{% with errors=form.email.errors %}
<div class="form-group{{ errors|yesno:' has-error,' }}">
<label class="col-lg-4 col-sm-4 control-label">{{ form.state.label }}</label>
<div class="col-lg-8 col-sm-8">
{{ form.state }}
<label class="col-xs-12 control-label">{% trans "E-mail" %}</label>
<div class="col-xs-12">
<input name="email" type="email" value="{{form.email.value|default_if_none:""}}" class="form-control" placeholder="Your e-mail" required>
{% for error in errors %}<small>{{error}}</small>{% endfor %}
</div>
</div>
{% endwith %}

{% with errors=form.password1.errors %}
<div class="form-group{{ errors|yesno:' has-error,' }}">
<label class="col-xs-12 control-label">{% trans "Password" %}</label>
<div class="col-xs-12">
<p><input name="password1" type="password" class="form-control" placeholder="{% trans 'Really strong password' %}" required></p>
<input name="password2" type="password" class="form-control" placeholder="{% trans 'Password confirmation' %}" required>
{% for error in errors %}<small>{{error}}</small>{% endfor %}
</div>
</div>
Expand Down

0 comments on commit c3c468c

Please sign in to comment.