kopia lustrzana https://github.com/dgtlmoon/changedetection.io
Usability tweak - [edit] on diff page should go back to diff page
rodzic
2f22d627fa
commit
851142446d
|
@ -427,7 +427,11 @@ def changedetection_app(config=None, datastore_o=None):
|
|||
|
||||
flash('Notifications queued.')
|
||||
|
||||
return redirect(url_for('index'))
|
||||
# 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'))
|
||||
|
||||
else:
|
||||
if request.method == 'POST' and not form.validate():
|
||||
|
|
|
@ -45,7 +45,7 @@
|
|||
</li>
|
||||
{% else %}
|
||||
<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>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
{% block content %}
|
||||
{% from '_helpers.jinja' import render_field %}
|
||||
<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>
|
||||
<div class="pure-control-group">
|
||||
{{ render_field(form.url, placeholder="https://...", size=30, required=true) }}
|
||||
|
|
Ładowanie…
Reference in New Issue