Usability tweak - [edit] on diff page should go back to diff page

pull/128/head
dgtlmoon 4 years ago
parent 2f22d627fa
commit 851142446d

@ -427,6 +427,10 @@ def changedetection_app(config=None, datastore_o=None):
flash('Notifications queued.') flash('Notifications queued.')
# Diff page [edit] link should go back to diff page
if request.args.get("next") and request.args.get("next") == 'diff':
return redirect(url_for('diff_history_page', uuid=uuid))
else:
return redirect(url_for('index')) return redirect(url_for('index'))
else: else:

@ -45,7 +45,7 @@
</li> </li>
{% else %} {% else %}
<li class="pure-menu-item"> <li class="pure-menu-item">
<a href="{{ url_for('edit_page', uuid=uuid) }}" class="pure-menu-link">EDIT</a> <a href="{{ url_for('edit_page', uuid=uuid, next='diff') }}" class="pure-menu-link">EDIT</a>
</li> </li>
{% endif %} {% endif %}
{% else %} {% else %}

@ -2,7 +2,7 @@
{% block content %} {% block content %}
{% from '_helpers.jinja' import render_field %} {% from '_helpers.jinja' import render_field %}
<div class="edit-form monospaced-textarea"> <div class="edit-form monospaced-textarea">
<form class="pure-form pure-form-stacked" action="/edit/{{uuid}}" method="POST"> <form class="pure-form pure-form-stacked" action="{{ url_for('edit_page', uuid=uuid, next = request.args.get('next') ) }}" method="POST">
<fieldset> <fieldset>
<div class="pure-control-group"> <div class="pure-control-group">
{{ render_field(form.url, placeholder="https://...", size=30, required=true) }} {{ render_field(form.url, placeholder="https://...", size=30, required=true) }}

Loading…
Cancel
Save