forked from colab/colab
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refatora colab para backend django provisório
- Loading branch information
1 parent
412ccc2
commit 5373d3a
Showing
19 changed files
with
473 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
{% extends "base.html" %} | ||
{% load i18n %} | ||
|
||
{% block title %}Login{% endblock %} | ||
|
||
{% block main-content %} | ||
<div class="container"> | ||
<div class="row"> | ||
<div class="col-md-4 col-md-offset-4"> | ||
<div class="alert alert-danger" role="alert"> | ||
<span class="glyphicon glyphicon-exclamation-sign" aria-hidden="true"></span> | ||
Caros usuários, o provedor de autorização Persona será descontinuado ao final de 2016. | ||
<p>Para poder acessar a sua conta novamente, clique <a href="{% url 'password_reset' %}"><b>aqui</b> </a> | ||
e crie uma nova senha.</p> | ||
<p>A equipe Colab agradece!</p> | ||
</div> | ||
<div class="login-panel panel panel-default"> | ||
<div class="panel-heading"> | ||
<h3 class="panel-title"><center><b>Entrar</b></center></h3> | ||
</div> | ||
<div class="panel-body"> | ||
<form id="login-form" method="post" action="{% url 'novo_login' %}"> | ||
{% csrf_token %} | ||
|
||
<p class="bs-component"> | ||
<table> | ||
{% if form.errors %} | ||
<div class="alert alert-danger">Usuário e/ou Senha inválidos. | ||
</div> | ||
|
||
{% endif %} | ||
<tr> | ||
<td><b>Usuário</b></td> | ||
<td>{{ form.username }}</td> | ||
</tr> | ||
<tr> | ||
<td><b>Senha</b></td> | ||
<td>{{ form.password }}</td> | ||
</tr> | ||
</table> | ||
</p> | ||
<p class="bs-component"> | ||
<center> | ||
<h5><a href="{% url 'password_reset' %}"><center>Esqueceu sua senha?</center></a></h6> | ||
<input class="btn btn-success btn-mm" type="submit" value="LOGIN" /> | ||
</center> | ||
</p> | ||
<input type="hidden" name="next" value="{{ next }}" /> | ||
</form> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
|
||
{% endblock %} |
60 changes: 60 additions & 0 deletions
60
src/accounts/templates/registration/password_change_form_custom.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
{% extends "base.html" %} | ||
{% load i18n %} | ||
{% block main-content %} | ||
|
||
<div class="row"> | ||
{% if form.errors %} | ||
<div class="alert alert-danger"> | ||
<b> | ||
{% if form.errors.items|length == 1 %} | ||
{% trans "Please correct the error below and try again." %} | ||
{% else %} | ||
{% trans "Please correct the errors below and try again." %} | ||
{% endif %} | ||
</b> | ||
</div> | ||
{% endif %} | ||
</div> | ||
|
||
<br> | ||
<form action="" method="post" role="form" class="form-horizontal signup"> | ||
{% csrf_token %} | ||
|
||
<div class="row"> | ||
<div class="col-md-4 col-md-offset-4 col-lg-4 col-lg-offset-4 col-sm-8 col-sm-offset-2 col-xs-12"> | ||
<div class="panel panel-default"> | ||
<div class="panel-heading"><h3 class="panel-title">{% trans 'Change Password' %}</h3></div> | ||
|
||
<div class="panel-body"> | ||
<div class="form-group{% if form.old_password.errors %} alert alert-danger has-error{% endif %}"> | ||
Nova senha | ||
<input class="form-control" id="id_old_password" maxlength="254" name="old_password" type="password"> | ||
{{ form.old_password.errors }} | ||
</div> | ||
|
||
<div class="form-group{% if form.new_password1.errors %} alert alert-danger has-error{% endif %}"> | ||
{{ form.new_password1.label_tag }} | ||
<input class="form-control" id="id_new_password1" maxlength="254" name="new_password1" type="password"> | ||
{{ form.new_password1.errors }} | ||
</div> | ||
|
||
<div class="form-group{% if form.new_password2.errors %} alert alert-danger has-error{% endif %}"> | ||
{{ form.new_password2.label_tag }} | ||
<input class="form-control" id="id_new_password2" maxlength="254" name="new_password2" type="password"> | ||
{{ form.new_password2.errors }} | ||
</div> | ||
|
||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<div class="row"> | ||
<div class="submit"> | ||
<input type="submit" value="{% trans 'Change my password' %}" class="btn btn-primary btn-lg btn-block"> | ||
</div> | ||
<script type="text/javascript">document.getElementById("id_old_password").focus();</script> | ||
</div> | ||
</form> | ||
|
||
{% endblock %} |
8 changes: 8 additions & 0 deletions
8
src/accounts/templates/registration/password_reset_complete_custom.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{% extends "base.html" %} | ||
|
||
{% block pagetitle %}Recuperação de senha concluída{% endblock %} | ||
|
||
{% block main-content %} | ||
<p>Sua senha foi modificada com sucesso. <a href="{{ novo_login }}">Clique aqui</a> para fazer o login.</p> | ||
|
||
{% endblock %} |
63 changes: 63 additions & 0 deletions
63
src/accounts/templates/registration/password_reset_confirm_custom.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
{% extends "base.html" %} | ||
{% load i18n %} | ||
{% block pagetitle %}{% trans "Criar nova senha" %}{% endblock %} | ||
{% block main-content %} | ||
{% if validlink %} | ||
|
||
<div class="row"> | ||
{% if form.errors %} | ||
<div class="alert alert-danger"> | ||
<b> | ||
{% if form.errors.items|length == 1 %} | ||
{% trans "Por favor, corrija o erro e tente novamente." %} | ||
{% else %} | ||
{% trans "Por favor, corrija os erros e tente novamente." %} | ||
{% endif %} | ||
</b> | ||
</div> | ||
{% endif %} | ||
</div> | ||
|
||
<br> | ||
<form action="" method="post" role="form" class="form-horizontal signup"> | ||
{% csrf_token %} | ||
|
||
<div class="row"> | ||
<div class="col-md-4 col-md-offset-4 col-lg-4 col-lg-offset-4 col-sm-8 col-sm-offset-2 col-xs-12"> | ||
<div class="panel panel-default"> | ||
<div class="panel-heading"><h3 class="panel-title">{% trans 'Modificar Senha' %}</h3></div> | ||
|
||
<div class="panel-body"> | ||
|
||
<div class="form-group{% if form.new_password1.errors %} alert alert-danger has-error{% endif %}"> | ||
<b>Senha</b> | ||
<input class="form-control" id="id_new_password1" maxlength="254" name="new_password1" type="password"> | ||
{{ form.new_password1.errors }} | ||
</div> | ||
|
||
<div class="form-group{% if form.new_password2.errors %} alert alert-danger has-error{% endif %}"> | ||
<b>Confirmar Senha</b> | ||
<input class="form-control" id="id_new_password2" maxlength="254" name="new_password2" type="password"> | ||
{{ form.new_password2.errors }} | ||
</div> | ||
|
||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<div class="row"> | ||
<div class="submit"> | ||
<input type="submit" value="{% trans 'Enviar' %}" class="btn btn-primary btn-lg btn-block"> | ||
</div> | ||
<script type="text/javascript">document.getElementById("id_new_password1").focus();</script> | ||
</div> | ||
</form> | ||
{% else %} | ||
<h1>A troca de senha não obteve sucesso.</h1> | ||
<p>O link é inválido, | ||
provavelmente ele já foi utilizado. <br /> | ||
Por favor, solicite uma nova recuperação de senha.</p> | ||
{% endif %} | ||
|
||
{% endblock %} |
8 changes: 8 additions & 0 deletions
8
src/accounts/templates/registration/password_reset_done_custom.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{% extends "base.html" %} | ||
|
||
{% block pagetitle %}Recuperação de senha enviada com sucesso{% endblock %} | ||
|
||
{% block main-content %} | ||
<p>Nós enviamos as instruções de recuperação de senha para o e-mail informado.</p> | ||
<p>Você deve recebê-lo em breve. Caso não receba, verifique sua caixa de spam.</p> | ||
{% endblock %} |
15 changes: 15 additions & 0 deletions
15
src/accounts/templates/registration/password_reset_email_custom.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{% autoescape off %} | ||
Você está recebendo este e-mail porque requisitou uma troca de senha no site {{ site_name }}. | ||
|
||
Por favor, clique no link abaixo e preencha o formulário: | ||
{% block reset_link %} | ||
{{ protocol }}://{{ domain }}{% url 'password_reset_confirm' uidb64=uid token=token %} | ||
{% endblock %} | ||
|
||
Seu nome de usuário, caso tenha esquecido: {{ user.username }} | ||
|
||
Obrigado por usar nosso sistema! | ||
|
||
Equipe Colab. | ||
|
||
{% endautoescape %} |
52 changes: 52 additions & 0 deletions
52
src/accounts/templates/registration/password_reset_form_custom.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
{% extends "base.html" %} | ||
{% load i18n %} | ||
{% block main-content %} | ||
|
||
|
||
<div class="row"> | ||
{% if form.errors %} | ||
<div class="alert alert-danger"> | ||
<b>{% trans "Por favor, corrija os campos destacados e tente novamente." %}</b> | ||
</div> | ||
{% endif %} | ||
</div> | ||
|
||
<br> | ||
<form action="" method="post" role="form" class="form-horizontal signup"> | ||
{% csrf_token %} | ||
|
||
<div class="row"> | ||
<div class="col-md-4 col-md-offset-4 col-lg-6 col-lg-offset-3 col-sm-8 col-sm-offset-2 col-xs-12"> | ||
<div class="panel panel-default"> | ||
<div class="panel-heading"><h3 class="panel-title">{{ title }}</h3></div> | ||
<div class="panel-body"> | ||
<div class= >{% trans "Esqueceu sua senha? Insira seu endereço de e-mail abaixo, e nós iremos enviar uma mensagem com as instruções para gerar uma nova." %}</div> | ||
<br> | ||
<div class="form-group{% if form.email.errors %} alert alert-danger has-error{% endif %}"> | ||
<label>{% trans 'Endereço de e-mail cadastrado:' %}</label> | ||
<input class="form-control" id="id_email" maxlength="254" name="email" type="email"> | ||
{{ form.email.errors }} | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<div class="row"> | ||
<div class="submit"> | ||
<input class="btn btn-primary btn-lg btn-block" type="submit" value="{% trans 'Recuperar senha' %}" /></p> | ||
</div> | ||
</div> | ||
|
||
</form> | ||
|
||
{% endblock %} | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
51 changes: 51 additions & 0 deletions
51
src/accounts/templates/registration/resend_email_verification.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
{% extends "base.html" %} | ||
{% load i18n %} | ||
{% block main-content %} | ||
|
||
<div class="row"> | ||
{% if form.errors %} | ||
<div class="alert alert-danger"> | ||
<b>{% trans "Please correct the errors below and try again." %}</b> | ||
</div> | ||
{% endif %} | ||
</div> | ||
|
||
<br> | ||
<form action="" method="post" role="form" class="form-horizontal signup"> | ||
{% csrf_token %} | ||
|
||
<div class="row"> | ||
<div class="col-md-4 col-md-offset-4 col-lg-6 col-lg-offset-3 col-sm-8 col-sm-offset-2 col-xs-12"> | ||
<div class="panel panel-default"> | ||
<div class="panel-heading"><h3 class="panel-title">{{ title }}</h3></div> | ||
<div class="panel-body"> | ||
<div class= >{% trans "Enter your email address below, and we'll resend an email verification." %}</div> | ||
<br> | ||
<div class="form-group{% if form.email.errors %} alert alert-danger has-error{% endif %}"> | ||
<label>{% trans 'Email address:' %}</label> | ||
<input class="form-control" id="id_email" maxlength="254" name="email" type="email"> | ||
{{ form.email.errors }} | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<div class="row"> | ||
<div class="submit"> | ||
<input class="btn btn-primary btn-lg btn-block" type="submit" value="{% trans 'Resend Email' %}" /></p> | ||
</div> | ||
</div> | ||
|
||
</form> | ||
|
||
{% endblock %} | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
Oops, something went wrong.