improve redirect forms
This commit is contained in:
parent
3c72056f64
commit
91c2f10cf2
4 changed files with 7 additions and 14 deletions
|
@ -127,13 +127,3 @@ legend {
|
||||||
#btn_editing_cancel {
|
#btn_editing_cancel {
|
||||||
margin-right:8px;
|
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;
|
|
||||||
}
|
|
||||||
|
|
|
@ -373,9 +373,8 @@ editor = {
|
||||||
$.post(action, data, function (data) {
|
$.post(action, data, function (data) {
|
||||||
var content = $(data);
|
var content = $(data);
|
||||||
if ($('<div>').append(content).find('form').length > 0) {
|
if ($('<div>').append(content).find('form').length > 0) {
|
||||||
$('#mapeditdetail').html(content);
|
|
||||||
$('#mapeditcontrols').addClass('detail');
|
$('#mapeditcontrols').addClass('detail');
|
||||||
$('#mapeditdetail').find('form[name=redirect]').submit();
|
$('#mapeditdetail').html(content).find('form[name=redirect]').submit();
|
||||||
if ($('#id_geometry').length) {
|
if ($('#id_geometry').length) {
|
||||||
editor._editing.enableEdit();
|
editor._editing.enableEdit();
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,8 +1,10 @@
|
||||||
|
{% load static %}
|
||||||
{% if data %}
|
{% if data %}
|
||||||
<form action="{% url 'editor.finalize' %}" method="POST" name="redirect">
|
<form action="{% url 'editor.finalize' %}" method="POST" name="redirect">
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
<input type="hidden" name="data" value="{{ data }}">
|
<input type="hidden" name="data" value="{{ data }}">
|
||||||
<input type="hidden" name="check" value="1">
|
<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>
|
</form>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
|
@ -1,8 +1,10 @@
|
||||||
{% extends 'editor/base.html' %}
|
{% extends 'editor/base.html' %}
|
||||||
|
{% load static %}
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<form action="{% url 'editor.finalize' %}" method="POST" name="redirect">
|
<form action="{% url 'editor.finalize' %}" method="POST" name="redirect">
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
<input type="hidden" name="data" value="{{ data }}">
|
<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>
|
</form>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue