summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--chimere/static/chimere/css/styles.css10
-rw-r--r--chimere/templates/chimere/blocks/inline_formset.html2
-rw-r--r--chimere/templates/chimere/blocks/submited.html28
-rw-r--r--chimere/templatetags/chimere_tags.py3
4 files changed, 36 insertions, 7 deletions
diff --git a/chimere/static/chimere/css/styles.css b/chimere/static/chimere/css/styles.css
index a4ae9b8..c59702d 100644
--- a/chimere/static/chimere/css/styles.css
+++ b/chimere/static/chimere/css/styles.css
@@ -172,6 +172,10 @@ fieldset{
margin-top:8px;
}
+.ui-dialog-buttonset{
+ text-align:center;
+}
+
.edit label{
display:block;
}
@@ -514,7 +518,6 @@ a#welcome_button{
/* forms */
table.inline-table{
- width:100%;
}
table.inline-table td{
@@ -529,6 +532,11 @@ table.inline-table td input[type=checkbox]{
margin-right:auto;
}
+table.inline-table td input[type=text],
+table.inline-table td input[type=file]{
+ width:260px;
+}
+
#live_lonlat p{
display:inline-table;
}
diff --git a/chimere/templates/chimere/blocks/inline_formset.html b/chimere/templates/chimere/blocks/inline_formset.html
index af0a866..139ad70 100644
--- a/chimere/templates/chimere/blocks/inline_formset.html
+++ b/chimere/templates/chimere/blocks/inline_formset.html
@@ -10,7 +10,7 @@
<tr>{% for field in frm.visible_fields %}
<td>{# Include the hidden fields in the form #}
{% if forloop.first %}
- {% for hidden in form.hidden_fields %}
+ {% for hidden in frm.hidden_fields %}
{{ hidden }}
{% endfor %}
{% endif %}
diff --git a/chimere/templates/chimere/blocks/submited.html b/chimere/templates/chimere/blocks/submited.html
index 0def505..4a078e3 100644
--- a/chimere/templates/chimere/blocks/submited.html
+++ b/chimere/templates/chimere/blocks/submited.html
@@ -1,5 +1,25 @@
{% load i18n %}
- <fieldset class='edit'>
- <legend>{% trans "Thank you" %}</legend>
- <p>{% trans "Your proposition has been submited. A moderator will treat your submission shortly. Thanks!" %}</p>
- </fieldset>
+ <div class='edit' id='submited-window'>
+ <p>{% trans "Your new proposition/modification has been submited. A moderator will treat your submission shortly. Thanks!" %}</p>
+ </div>
+ <script type='text/javascript'>
+ $(function(){
+ $("#submited-window").dialog({
+ title:"{% trans "Thank you" %}",
+ buttons:{
+ "{% trans "Add a new item" %}":
+ function() {
+ window.location = "{{edit_url}}";
+ },
+ "{% trans "Continue edition of this item" %}":
+ function() {
+ $(this).dialog("close");
+ },
+ "{% trans "Return to the map" %}":
+ function() {
+ window.location = "{{index_url}}";
+ }
+ }
+ });
+ });
+ </script>
diff --git a/chimere/templatetags/chimere_tags.py b/chimere/templatetags/chimere_tags.py
index 5346cf3..a0ce607 100644
--- a/chimere/templatetags/chimere_tags.py
+++ b/chimere/templatetags/chimere_tags.py
@@ -27,7 +27,8 @@ def submited(context):
"""
Submited message.
"""
- return {}
+ return {"edit_url":reverse('chimere:edit'),
+ "index_url":reverse('chimere:index')}
@register.inclusion_tag('chimere/blocks/welcome.html', takes_context=True)
def display_news(context, display=False):