From 2d083f23e6bed8b92c61da6a3f503c23c9366bf7 Mon Sep 17 00:00:00 2001 From: miguelzinh3 Date: Tue, 10 Sep 2024 16:52:50 -0300 Subject: [PATCH 1/4] hotfix(vote): remove link from partners module --- app/contrib/partners/admin.py | 2 +- .../migrations/0004_remove_partner_link.py | 17 +++++++++++++++++ app/contrib/partners/models.py | 3 +-- .../templates/partners/partners_list.html | 4 ++-- .../votepeloclima/static/scss/custom.scss | 4 ++-- .../templates/votepeloclima/base.html | 1 + 6 files changed, 24 insertions(+), 7 deletions(-) create mode 100644 app/contrib/partners/migrations/0004_remove_partner_link.py diff --git a/app/contrib/partners/admin.py b/app/contrib/partners/admin.py index 895e6502..4d34d4ad 100644 --- a/app/contrib/partners/admin.py +++ b/app/contrib/partners/admin.py @@ -6,4 +6,4 @@ @admin.register(Partner) class PartnerAdmin(SortableAdminMixin, admin.ModelAdmin): - list_display = ("name", "link") + list_display = ("name", "logo") diff --git a/app/contrib/partners/migrations/0004_remove_partner_link.py b/app/contrib/partners/migrations/0004_remove_partner_link.py new file mode 100644 index 00000000..57d29767 --- /dev/null +++ b/app/contrib/partners/migrations/0004_remove_partner_link.py @@ -0,0 +1,17 @@ +# Generated by Django 4.2 on 2024-09-10 19:44 + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('partners', '0003_alter_partner_position'), + ] + + operations = [ + migrations.RemoveField( + model_name='partner', + name='link', + ), + ] diff --git a/app/contrib/partners/models.py b/app/contrib/partners/models.py index ffeeba34..27a2dd7e 100644 --- a/app/contrib/partners/models.py +++ b/app/contrib/partners/models.py @@ -7,7 +7,6 @@ class Partner(models.Model): name = models.CharField(max_length=100, verbose_name="Nome da Parceria") logo = FilerFileField(verbose_name=_("Imagem"), on_delete=models.SET_NULL, null=True, blank=True) - link = models.URLField(blank=True, null=True, verbose_name="Link da Parceria") position = models.PositiveIntegerField( default=0, @@ -21,4 +20,4 @@ def __str__(self): class Meta: verbose_name = "Parceiro" - ordering = ["position"] \ No newline at end of file + ordering = ["position"] diff --git a/app/contrib/partners/templates/partners/partners_list.html b/app/contrib/partners/templates/partners/partners_list.html index a8382d82..fae3f278 100644 --- a/app/contrib/partners/templates/partners/partners_list.html +++ b/app/contrib/partners/templates/partners/partners_list.html @@ -1,5 +1,5 @@ {% for partner in partners %} - + {% endfor %} diff --git a/app/org_eleicoes/votepeloclima/static/scss/custom.scss b/app/org_eleicoes/votepeloclima/static/scss/custom.scss index 585aac2b..bb8428fd 100644 --- a/app/org_eleicoes/votepeloclima/static/scss/custom.scss +++ b/app/org_eleicoes/votepeloclima/static/scss/custom.scss @@ -213,7 +213,7 @@ legend.form-label { // Partner Tag .partners-list { - a { + div { display: flex; justify-content: center; align-items: center; @@ -225,4 +225,4 @@ legend.form-label { object-fit: contain; object-position: center; } -} \ No newline at end of file +} diff --git a/app/org_eleicoes/votepeloclima/templates/votepeloclima/base.html b/app/org_eleicoes/votepeloclima/templates/votepeloclima/base.html index afe95d3c..9bcb804d 100644 --- a/app/org_eleicoes/votepeloclima/templates/votepeloclima/base.html +++ b/app/org_eleicoes/votepeloclima/templates/votepeloclima/base.html @@ -67,6 +67,7 @@
  • Cadastre-se
  • Login
  • Contato
  • +
  • Seja Nosso Parceiro
  • From a88da1c4fd4a492f976d97a9cf78c57ee4121be0 Mon Sep 17 00:00:00 2001 From: miguelzinh3 Date: Thu, 12 Sep 2024 04:49:32 -0300 Subject: [PATCH 2/4] hotfix(vote): add text-uppercase to btns at vpc --- .../candidature/candidature_search.html | 6 ++-- .../templates/candidature/captcha.html | 2 +- .../templates/candidature/checkout.html | 4 +-- .../templates/candidature/dashboard.html | 10 +++--- .../templates/candidature/wizard_form.html | 6 ++-- .../static/js/toggle_password.js | 14 ++++++++ .../votepeloclima/static/scss/custom.scss | 18 +++++++++- .../templates/oauth/change_password.html | 15 +++++---- .../votepeloclima/templates/oauth/login.html | 33 ++++++++++++------- .../templates/oauth/password_reset_done.html | 11 ++++--- .../templates/oauth/password_reset_form.html | 17 ++++++---- .../templates/votepeloclima/base.html | 14 ++++---- .../templates/votepeloclima/home.html | 8 ++--- .../templates/votepeloclima/menu_item.html | 4 +-- 14 files changed, 105 insertions(+), 57 deletions(-) create mode 100644 app/org_eleicoes/votepeloclima/static/js/toggle_password.js diff --git a/app/org_eleicoes/votepeloclima/candidature/templates/candidature/candidature_search.html b/app/org_eleicoes/votepeloclima/candidature/templates/candidature/candidature_search.html index cfa12a8f..f8acb4d4 100644 --- a/app/org_eleicoes/votepeloclima/candidature/templates/candidature/candidature_search.html +++ b/app/org_eleicoes/votepeloclima/candidature/templates/candidature/candidature_search.html @@ -22,7 +22,7 @@

    Conheça candidaturas da sua cidade

    {% crispy form.header %} - +
    @@ -68,8 +68,8 @@
    {{ candidature.get_intended_position_display }} | {{ candidature.get_politic
    Infelizmente nenhuma candidatura foi encontrada

    Tente ajustar os filtros para encontrar uma candidatura que se alinhe com suas prioridades climáticas.

    {% endfor %} diff --git a/app/org_eleicoes/votepeloclima/candidature/templates/candidature/captcha.html b/app/org_eleicoes/votepeloclima/candidature/templates/candidature/captcha.html index 7e4022d7..ce139f81 100644 --- a/app/org_eleicoes/votepeloclima/candidature/templates/candidature/captcha.html +++ b/app/org_eleicoes/votepeloclima/candidature/templates/candidature/captcha.html @@ -19,7 +19,7 @@

    Vamos começar?

    {% if wizard.steps.next %} - + {% endif %}
    diff --git a/app/org_eleicoes/votepeloclima/candidature/templates/candidature/checkout.html b/app/org_eleicoes/votepeloclima/candidature/templates/candidature/checkout.html index d405f0db..7e3f18b0 100644 --- a/app/org_eleicoes/votepeloclima/candidature/templates/candidature/checkout.html +++ b/app/org_eleicoes/votepeloclima/candidature/templates/candidature/checkout.html @@ -18,7 +18,7 @@

    Para finalizar, confirme suas informações {{ wizard.form|crispy }} - + {% else %} @@ -26,7 +26,7 @@

    Para finalizar, confirme suas informações

    {{ step.title }}
    {% if step.edit_url %} - Editar + Editar {% endif %} {% if step.form.helper %} diff --git a/app/org_eleicoes/votepeloclima/candidature/templates/candidature/dashboard.html b/app/org_eleicoes/votepeloclima/candidature/templates/candidature/dashboard.html index b9d0c501..078b4954 100644 --- a/app/org_eleicoes/votepeloclima/candidature/templates/candidature/dashboard.html +++ b/app/org_eleicoes/votepeloclima/candidature/templates/candidature/dashboard.html @@ -18,12 +18,12 @@

    Olá, {{ request.user.first_na {% if flow.status == "draft" %}

    Seu cadastro está incompleto e seu perfil não está ativo. Por favor, complete as informações necessárias para ativar seu perfil e torná-lo visível aos eleitores. Clique em "Continuar Cadastro" para finalizar o cadastro.

    - <{% if checkout_is_valid %}a href="{% url 'register_step' step='checkout' %}"{% else %}button type="button" disabled{% endif %} class="btn btn-secondary">Submeter para análise + <{% if checkout_is_valid %}a href="{% url 'register_step' step='checkout' %}"{% else %}button type="button" disabled{% endif %} class="btn btn-secondary text-uppercase">Submeter para análise
    {% elif flow.status == "editing" %}

    Sua edição está incompleta e seu perfil está ativo. Você pode desativar seu perfil para que ele não fique público durante o processo de edição, se preferir.

    - <{% if checkout_is_valid %}a href="{% url 'register_step' step='checkout' %}"{% else %}button type="button" disabled{% endif %} class="btn btn-secondary">Submeter para análise + <{% if checkout_is_valid %}a href="{% url 'register_step' step='checkout' %}"{% else %}button type="button" disabled{% endif %} class="btn btn-secondary text-uppercase">Submeter para análise
    {% elif flow.status == "invalid" %}
    @@ -38,14 +38,14 @@

    Olá, {{ request.user.first_na

    - <{% if is_public %}a href="{% url 'candidate_profile' slug=flow.candidature.slug %}"{% else %}button disabled{% endif %} class="btn btn-secondary">Visualizar perfil + <{% if is_public %}a href="{% url 'candidate_profile' slug=flow.candidature.slug %}"{% else %}button disabled{% endif %} class="btn btn-secondary text-uppercase">Visualizar perfil {% if flow.status == "draft" or flow.status == "editing" %} - Editar informações + Editar informações {% else %}
    {% csrf_token %} - +
    {% endif %}
    diff --git a/app/org_eleicoes/votepeloclima/candidature/templates/candidature/wizard_form.html b/app/org_eleicoes/votepeloclima/candidature/templates/candidature/wizard_form.html index cff6f5a4..a1214620 100644 --- a/app/org_eleicoes/votepeloclima/candidature/templates/candidature/wizard_form.html +++ b/app/org_eleicoes/votepeloclima/candidature/templates/candidature/wizard_form.html @@ -24,12 +24,12 @@

    {{ step_title }}

    {% block form_actions %}
    {% if wizard.steps.prev %} - + {% endif %} {% if wizard.steps.next and not editing %} - + {% elif editing %} - + {% endif %}
    {% endblock %} diff --git a/app/org_eleicoes/votepeloclima/static/js/toggle_password.js b/app/org_eleicoes/votepeloclima/static/js/toggle_password.js new file mode 100644 index 00000000..6f067fe6 --- /dev/null +++ b/app/org_eleicoes/votepeloclima/static/js/toggle_password.js @@ -0,0 +1,14 @@ +document.getElementById('togglePassword').addEventListener('click', function () { + var passwordInput = document.getElementById('id_password'); + var toggleIcon = document.getElementById('toggleIcon'); + + if (passwordInput.type === 'password') { + passwordInput.type = 'text'; + toggleIcon.classList.remove('bi-eye-slash'); + toggleIcon.classList.add('bi-eye'); + } else { + passwordInput.type = 'password'; + toggleIcon.classList.remove('bi-eye'); + toggleIcon.classList.add('bi-eye-slash'); + } +}); diff --git a/app/org_eleicoes/votepeloclima/static/scss/custom.scss b/app/org_eleicoes/votepeloclima/static/scss/custom.scss index bb8428fd..8e23eb2a 100644 --- a/app/org_eleicoes/votepeloclima/static/scss/custom.scss +++ b/app/org_eleicoes/votepeloclima/static/scss/custom.scss @@ -178,9 +178,25 @@ legend.form-label { padding: 6px 12px; } +// Login e Recuperar +.candidate-login, +.candidate-reset-password { + padding: 0 72px; +} + +@media (max-width: 992px) { + .candidate-login, + .candidate-reset-password { + padding: 0 20px; + + h2 { + font-size: 40px; + } + } +} -// Perfil da Candidatura +// Perfil da Candidatura @media (max-width: 992px) { .candidature-profile { h2 { diff --git a/app/org_eleicoes/votepeloclima/templates/oauth/change_password.html b/app/org_eleicoes/votepeloclima/templates/oauth/change_password.html index c4a4aad8..c65e2e07 100644 --- a/app/org_eleicoes/votepeloclima/templates/oauth/change_password.html +++ b/app/org_eleicoes/votepeloclima/templates/oauth/change_password.html @@ -2,17 +2,20 @@ {% load crispy_forms_filters %} {% block content %} -
    -
    +
    +
    +
    -
    -

    CRIE UMA SENHA

    +
    +

    CRIE UMA SENHA

    Acesse a área restrita das candidaturas para verificar, editar e compartilhar suas informações.

    {% csrf_token %} {{ form|crispy }} - +
    + +
    -{% endblock %} \ No newline at end of file +{% endblock %} diff --git a/app/org_eleicoes/votepeloclima/templates/oauth/login.html b/app/org_eleicoes/votepeloclima/templates/oauth/login.html index 8d6242a3..9ebafdc9 100644 --- a/app/org_eleicoes/votepeloclima/templates/oauth/login.html +++ b/app/org_eleicoes/votepeloclima/templates/oauth/login.html @@ -1,12 +1,13 @@ {% extends 'votepeloclima/base.html' %} -{% load crispy_forms_filters %} +{% load static crispy_forms_filters %} {% block content %} -
    -
    -
    -
    -

    Login

    +
    +
    +
    +
    +
    - -
    +
    + + +
    +
    -
    - +
    + Não tem uma conta? Cadastre-se Não finalizou seu cadastro? Crie uma senha e finalize o cadastro
    @@ -32,4 +38,9 @@

    Login

    {% endblock %} -{% block footer %}{% endblock %} \ No newline at end of file +{% block footer %}{% endblock %} + + +{% block footer_js %} + +{% endblock %} diff --git a/app/org_eleicoes/votepeloclima/templates/oauth/password_reset_done.html b/app/org_eleicoes/votepeloclima/templates/oauth/password_reset_done.html index 50ca105c..a332838a 100644 --- a/app/org_eleicoes/votepeloclima/templates/oauth/password_reset_done.html +++ b/app/org_eleicoes/votepeloclima/templates/oauth/password_reset_done.html @@ -2,12 +2,13 @@ {% load crispy_forms_filters %} {% block content %} -
    -
    +
    +
    +
    -
    -

    E-mail enviado

    +
    +

    E-mail enviado

    Confira na sua caixa de mensagem

    -{% endblock %} \ No newline at end of file +{% endblock %} diff --git a/app/org_eleicoes/votepeloclima/templates/oauth/password_reset_form.html b/app/org_eleicoes/votepeloclima/templates/oauth/password_reset_form.html index 9130bb2c..5d3e41f3 100644 --- a/app/org_eleicoes/votepeloclima/templates/oauth/password_reset_form.html +++ b/app/org_eleicoes/votepeloclima/templates/oauth/password_reset_form.html @@ -1,12 +1,13 @@ {% extends 'votepeloclima/base.html' %} -{% load crispy_forms_filters %} +{% load static crispy_forms_filters %} {% block content %} -
    -
    +
    +
    +
    -
    -

    Recuperar acesso

    +
    +

    Recuperar acesso

    Insira seu e-mail abaixo para receber um link que permitirá criar uma nova senha. Este link será enviado para o endereço de e-mail registrado e você poderá usá-lo para finalizar seu cadastro ou redefinir sua senha esquecida.

    {% csrf_token %} @@ -15,8 +16,10 @@

    Recuperar acesso

    {{ form.email.errors }}
    - +
    + +
    -{% endblock %} \ No newline at end of file +{% endblock %} diff --git a/app/org_eleicoes/votepeloclima/templates/votepeloclima/base.html b/app/org_eleicoes/votepeloclima/templates/votepeloclima/base.html index 9bcb804d..9174e676 100644 --- a/app/org_eleicoes/votepeloclima/templates/votepeloclima/base.html +++ b/app/org_eleicoes/votepeloclima/templates/votepeloclima/base.html @@ -23,7 +23,7 @@ From a351d67d32e6b3991658f1b900b7f4ca8a66988f Mon Sep 17 00:00:00 2001 From: miguelzinh3 Date: Thu, 12 Sep 2024 05:48:20 -0300 Subject: [PATCH 4/4] hotfix(vote): add link to texts in captcha --- .../votepeloclima/candidature/templates/candidature/captcha.html | 1 + 1 file changed, 1 insertion(+) diff --git a/app/org_eleicoes/votepeloclima/candidature/templates/candidature/captcha.html b/app/org_eleicoes/votepeloclima/candidature/templates/candidature/captcha.html index ce139f81..7f086a12 100644 --- a/app/org_eleicoes/votepeloclima/candidature/templates/candidature/captcha.html +++ b/app/org_eleicoes/votepeloclima/candidature/templates/candidature/captcha.html @@ -7,6 +7,7 @@

    Vamos começar?

    Inscreva-se e aumente a visibilidade da sua candidatura!

    O processo de cadastro é simples e leva cerca de 15 minutos. Você precisará aceitar alguns compromissos básicos, preencher suas informações pessoais, fornecer detalhes sobre sua candidatura e trajetória, e incluir suas propostas sobre a agenda climática.

    Após finalizar, você terá acesso a uma área exclusiva onde poderá ver e editar seu perfil, além de acessar ferramentas para compartilhar sua campanha. Vamos lá?

    +

    Encontre materiais de apoio para entender o cadastro e fortalecer sua candidatura neste link.

    {% endblock %}