cremcrem2devdev2diademsformagenericinstru_searchlamnlivemultiproductionrelease/1.4.4securitysocialstoragetest
| Line | |
|---|
| 1 | {% extends "telemeta/base.html" %} |
|---|
| 2 | {% load telemeta_utils %} |
|---|
| 3 | {% load i18n %} |
|---|
| 4 | |
|---|
| 5 | {% block head_title %}{% trans "Item" %}- {{ block.super }}{% endblock %} |
|---|
| 6 | |
|---|
| 7 | {% if item %} |
|---|
| 8 | {% block title %} |
|---|
| 9 | <img src="{% url telemeta-images "item.png" %}" alt="item" style="vertical-align:middle" /> Item : NEW |
|---|
| 10 | {% endblock %} |
|---|
| 11 | |
|---|
| 12 | {% block title_buttons %} |
|---|
| 13 | {% if perms.telemeta.add_mediaitem %} |
|---|
| 14 | <a href="{% url telemeta-items %}" |
|---|
| 15 | class="component_icon button icon_cancel">{% trans "Cancel" %}</a> |
|---|
| 16 | {% endif %} |
|---|
| 17 | {% endblock %} |
|---|
| 18 | |
|---|
| 19 | {% block content %} |
|---|
| 20 | {% block infos %} |
|---|
| 21 | <div class="infos"> |
|---|
| 22 | <form method="post" id="_addItemForm" action="" enctype="multipart/form-data">{% csrf_token %} |
|---|
| 23 | <ul>{% for error in form.non_field_errors %}<li class="error">{{ error }}</li>{% endfor %}</ul> |
|---|
| 24 | <table> |
|---|
| 25 | {% for field in form %} |
|---|
| 26 | <tr> |
|---|
| 27 | {% if field.html_name == "copied_from_item" %} |
|---|
| 28 | <td>{{ field.label_tag.as_hidden }}{{ field.as_hidden }}</td> |
|---|
| 29 | {% else %} |
|---|
| 30 | <tr><td class="error">{{ field.errors }}</td></tr> |
|---|
| 31 | <td>{{ field.label_tag }}:</td> |
|---|
| 32 | {% if field.html_name == "collection" %} |
|---|
| 33 | <td> {% trans "Title" %} : {{ item.collection.title }}<br /> |
|---|
| 34 | {% trans "Code" %} : {{ item.collection.code }}<br /> |
|---|
| 35 | {{ field }}</td> |
|---|
| 36 | {% else %} |
|---|
| 37 | <td>{{ field }}</td> |
|---|
| 38 | {% endif %} |
|---|
| 39 | {% endif %} |
|---|
| 40 | </tr> |
|---|
| 41 | {% endfor %} |
|---|
| 42 | </table> |
|---|
| 43 | <div align="center" style="margin-top:3ex;"> |
|---|
| 44 | <a href="{% url telemeta-items %}" |
|---|
| 45 | class="component_icon button icon_cancel">{% trans "Cancel" %}</a> |
|---|
| 46 | <a href="#" class="component_icon button icon_save" |
|---|
| 47 | onclick="var d=document; d.getElementById('wait-img').style.display='inline'; setTimeout(function(){d.getElementById('_addItemForm').submit();},300); return false;">{% trans "Save" %}</a> |
|---|
| 48 | <img id="wait-img" style="display:none" style="vertical-align:middle" alt="wait" src="{% url telemeta-images "wait.gif" %}" /> |
|---|
| 49 | </div> |
|---|
| 50 | </form> |
|---|
| 51 | </div> |
|---|
| 52 | {% endblock infos %} |
|---|
| 53 | </div> <!-- with-rightcol --> |
|---|
| 54 | {% endblock %} |
|---|
| 55 | |
|---|
| 56 | {% block delete %} |
|---|
| 57 | {% endblock %} |
|---|
| 58 | |
|---|
| 59 | {% else %} |
|---|
| 60 | <p>No such item</p> |
|---|
| 61 | {% endif %} |
|---|
Note: See
TracBrowser
for help on using the repository browser.