summaryrefslogtreecommitdiff
path: root/ishtar_common/templates
diff options
context:
space:
mode:
Diffstat (limited to 'ishtar_common/templates')
-rw-r--r--ishtar_common/templates/ishtar/formset_import_match.html98
1 files changed, 53 insertions, 45 deletions
diff --git a/ishtar_common/templates/ishtar/formset_import_match.html b/ishtar_common/templates/ishtar/formset_import_match.html
index e35195791..acec95a65 100644
--- a/ishtar_common/templates/ishtar/formset_import_match.html
+++ b/ishtar_common/templates/ishtar/formset_import_match.html
@@ -25,58 +25,66 @@
{% for hidden in frm.hidden_fields %} {{ hidden }} {% endfor %}
<div id="{{formset.prefix}}">
+ {% if not formset %}
+ <p><em>{% trans "No more match left." %}</em></p>
+ {% endif %}
{% for frm in formset %}{% ifchanged frm.target.value %}
- {# <table> #}{% if not forloop.first%}</table>{% endif %}
- <h4>{{ frm.target.field.choices.0.1 }}</h4>
- {% if frm.admin_url %}
- <p class="text-center">
- <a href="{{frm.admin_url}}" target="_blank">
- {% trans "Edit choices in admin" %}</a>
- <i class="fa fa-question-circle" aria-hidden="true"
- title="{% trans 'After type edition you may need to wait after cache update. Refresh this page after some time. Be patient.' %}"></i>
- </p>{% endif %}
- <table class='clean-table' id="form-{{forloop.counter0}}">
- <tr>
- <th>{% trans "Key" %}</th>
- <th>{% trans "Value" %}</th>
- <th>{% trans "For" %}</th>
- </tr>
- <tr>
- <td colspan="2">
- </td>
- <td>
- <select id="all-remember-{{forloop.counter0}}"
- name="all-remember-{{forloop.counter0}}">
- <option value="">--</option>
- {% for key, lbl in frm.remember_choices %}
- <option value="{{key}}">{{lbl}}</option>{% endfor %}
- </select>
- </td>
- </tr>
- {% endifchanged %}
- <tr>
- <td>
- {{frm.id}}
- {{frm.target}}
- {{frm.key}}
- </td>
- <td>
- {{frm.value}}
- </td>
- <td class="remember">
- {{frm.remember}}
- </td>
- </tr>
- {% if forloop.last %}
- </table>{% endif %}
+ {# <div><table> #}{% if not forloop.first %}</table></div>{% endif %}
+ <div class="alert">
+ <h4>{{ frm.target.field.choices.0.1 }}</h4>
+ {% if frm.admin_url %}
+ <p class="text-center">
+ <a href="{{frm.admin_url}}" target="_blank">
+ {% trans "Edit choices in admin" %}</a>
+ <i class="fa fa-question-circle" aria-hidden="true"
+ title="{% trans 'After type edition you may need to wait after cache update. Refresh this page after some time. Be patient.' %}"></i>
+ </p>{% endif %}
+ <table class='clean-table' id="form-{{forloop.counter0}}">
+ <tr>
+ <th>{% trans "Key" %}</th>
+ <th>{% trans "Value" %}</th>
+ <th>{% trans "For" %}</th>
+ </tr>
+ <tr>
+ <td colspan="2">
+ </td>
+ <td>
+ <select id="all-remember-{{forloop.counter0}}"
+ name="all-remember-{{forloop.counter0}}">
+ <option value="">--</option>
+ {% for key, lbl in frm.remember_choices %}
+ <option value="{{key}}">{{lbl}}</option>{% endfor %}
+ </select>
+ </td>
+ </tr>
+ {% endifchanged %}
+ <tr>
+ <td>
+ {{frm.id}}
+ {{frm.target}}
+ {{frm.key}}
+ </td>
+ <td>
+ {{frm.value}}
+ </td>
+ <td class="remember">
+ {{frm.remember}}
+ </td>
+ </tr>
+ {% if forloop.last %}
+ </table></div>{% endif %}
+ {% empty %}
+ <div class="alert alert-info">
+ <em>{% trans "No more match left." %}</em>
+ </div>
{% endfor %}
+
{% if frm.errors %}<ul>{% for error in frm.errors.values %}
<li>{{error}}</li>{% endfor%}</ul>{% endif %}
{% for field in frm %}
{{field}}
- {%endfor%}
-
+ {% endfor %}
</div>
</div>
<p class="text-center">