Skip to content

Commit

Permalink
Fix layout of history deletion modals
Browse files Browse the repository at this point in the history
  • Loading branch information
Baptiste Jonglez committed Jul 17, 2021
1 parent ecdd144 commit 42a0ad0
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 19 deletions.
6 changes: 0 additions & 6 deletions ihatemoney/templates/forms.html
Original file line number Diff line number Diff line change
Expand Up @@ -130,9 +130,6 @@
{% include "display_errors.html" %}
{{ form.hidden_tag() }}
{{ input(form.password, inline=True) }}
<div class="actions">
<button class="btn btn-danger">{{ _("Confirm deletion") }}</button>
</div>

{% endmacro %}

Expand All @@ -141,9 +138,6 @@
{% include "display_errors.html" %}
{{ form.hidden_tag() }}
{{ input(form.password) }}
<div class="actions">
<button class="btn btn-danger">{{ _("Confirm deletion") }}</button>
</div>

{% endmacro %}

Expand Down
24 changes: 11 additions & 13 deletions ihatemoney/templates/history.html
Original file line number Diff line number Diff line change
Expand Up @@ -43,42 +43,40 @@
<!-- Modal -->
<div id="confirm-ip-delete" class="modal fade show" role="dialog">
<div class="modal-dialog" role="document">
<div class="modal-content">
<form class="modal-content" action="{{ url_for(".strip_ip_addresses") }}" method="post">
<div class="modal-header">
<h3 class="modal-title">{{ _('Confirm Remove IP Adresses') }}</h3>
<a href="#" class="close" data-dismiss="modal">&times;</a>
</div>
<div class="modal-body">
<p>{{ _("Are you sure you want to delete all recorded IP addresses from this project?
The rest of the project history will be unaffected. This action cannot be undone.") }}</p>
{{ forms.delete_ip_addresses(delete_form) }}
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">{{ _("Close") }}</button>
<form action="{{ url_for(".strip_ip_addresses") }}" method="post">
{{ forms.delete_ip_addresses(delete_form) }}
</form>
</div>
</div>
<button type="submit" class="btn btn-danger">{{ _("Confirm deletion") }}</button>
<button type="button" class="btn btn-secondary" data-dismiss="modal">{{ _("Close") }}</button>
</div>
</form>
</div>
</div>
<!-- Modal -->
<div id="confirm-erase" class="modal fade show" role="dialog">
<div class="modal-dialog" role="document">
<div class="modal-content">
<form class="modal-content" action="{{ url_for(".erase_history") }}" method="post">
<div class="modal-header">
<h3 class="modal-title">{{ _('Delete Confirmation') }}</h3>
<a href="#" class="close" data-dismiss="modal">&times;</a>
</div>
<div class="modal-body">
<p>{{ _("Are you sure you want to erase all history for this project? This action cannot be undone.") }}</p>
{{ forms.delete_project_history(delete_form) }}
</div>
<div class="modal-footer">
<button type="submit" class="btn btn-danger">{{ _("Confirm deletion") }}</button>
<button type="button" class="btn btn-secondary" data-dismiss="modal">{{ _("Close") }}</button>
<form action="{{ url_for(".erase_history") }}" method="post">
{{ forms.delete_project_history(delete_form) }}
</form>
</div>
</div>
</div>
</form>
</div>
</div>
{% endmacro %}
Expand Down

0 comments on commit 42a0ad0

Please sign in to comment.