improve redirect forms

This commit is contained in:
Laura Klünder 2016-09-29 19:38:08 +02:00
parent 3c72056f64
commit 91c2f10cf2
4 changed files with 7 additions and 14 deletions

View file

@ -127,13 +127,3 @@ legend {
#btn_editing_cancel {
margin-right:8px;
}
form[name=redirect] button {
background-image: url('/static/img/loader.gif');
background-repeat: no-repeat;
background-color: transparent !important;
border: 0 !important;
margin: 0 !important;
padding: 50px 0 0 0;
cursor: wait !important;
}

View file

@ -373,9 +373,8 @@ editor = {
$.post(action, data, function (data) {
var content = $(data);
if ($('<div>').append(content).find('form').length > 0) {
$('#mapeditdetail').html(content);
$('#mapeditcontrols').addClass('detail');
$('#mapeditdetail').find('form[name=redirect]').submit();
$('#mapeditdetail').html(content).find('form[name=redirect]').submit();
if ($('#id_geometry').length) {
editor._editing.enableEdit();
}

View file

@ -1,8 +1,10 @@
{% load static %}
{% if data %}
<form action="{% url 'editor.finalize' %}" method="POST" name="redirect">
{% csrf_token %}
<input type="hidden" name="data" value="{{ data }}">
<input type="hidden" name="check" value="1">
<button type="submit" class="btn btn-default disabled">Redirecting…</button>
<img src="{% static 'img/loader.gif' %}">
Redirecting…
</form>
{% endif %}

View file

@ -1,8 +1,10 @@
{% extends 'editor/base.html' %}
{% load static %}
{% block content %}
<form action="{% url 'editor.finalize' %}" method="POST" name="redirect">
{% csrf_token %}
<input type="hidden" name="data" value="{{ data }}">
<button type="submit" class="btn btn-default disabled">Redirecting…</button>
<img src="{% static 'img/loader.gif' %}">
Redirecting…
</form>
{% endblock %}