Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UX/UI: Ajout d'un bouton de retour à la page d'accès aux APIs [GEN-1964] #4678

Merged
merged 2 commits into from
Sep 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions itou/templates/dashboard/api_token.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@

{% block title %}Accès aux APIs {{ block.super }}{% endblock %}

{% block title_prevstep %}
{% include "layout/previous_step.html" with back_url=back_url only %}
{% endblock %}

{% block title_content %}<h1>Accès aux APIs</h1>{% endblock %}

{% block content %}
Expand Down
2 changes: 1 addition & 1 deletion itou/templates/dashboard/edit_user_info.html
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ <h2>Informations personnelles</h2>
{% bootstrap_field form.phone %}

{% comment "prev_url may be not useful anymore, remove it from the view" %}{% endcomment %}
{% itou_buttons_form primary_label="Enregistrer et quitter" secondary_url=prev_url %}
{% itou_buttons_form primary_label="Enregistrer et quitter" reset_url=prev_url %}
</form>
{% endif %}
</div>
Expand Down
2 changes: 1 addition & 1 deletion itou/templates/dashboard/edit_user_notifications.html
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ <h2>Gestion des notifications</h2>
</div>

{% comment "back_url may be not useful anymore, remove it from the view" %}{% endcomment %}
{% itou_buttons_form primary_label="Enregistrer" secondary_url=back_url show_mandatory_fields_mention=False %}
{% itou_buttons_form primary_label="Enregistrer" reset_url=back_url show_mandatory_fields_mention=False %}
</form>
</div>
</div>
Expand Down
1 change: 1 addition & 0 deletions itou/www/dashboard/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -384,6 +384,7 @@ def api_token(request, template_name="dashboard/api_token.html"):
token = Token.objects.filter(user=request.user).first() # May be None if no token

context = {
"back_url": reverse("dashboard:index"),
"login_string": TOKEN_ID_STR,
"token": token,
"companies": request.user.companymembership_set.active_admin().values(
Expand Down