source: telemeta/templates/telemeta_default/mediaitem_edit.html @ 83c03be

cremcrem2crem3devdev2diademsdj1.6feature/breadcrumbsfeature/ts-0.5feature/ts-0.5.4feature/writecacheformagenericinstru_searchlamlam2mapsv3mergenlivemultiprobproductionrelease/1.4.4sabiodsearchsecurityserversocialstoragetelecastertestvideo
Last change on this file since 83c03be was 83c03be, checked in by yomguy <yomguy@…>, 3 years ago

fix delete button in templates

  • Property mode set to 100644
File size: 2.1 KB
Line 
1{% extends "telemeta/mediaitem_detail.html" %}
2{% load i18n %}
3{% load telemeta_utils %}
4
5{% block title %}
6<img src="{% url telemeta-images "item.png" %}" style="vertical-align:middle" /> Item : {{ item }}
7{% endblock %}
8
9{% block title_buttons %}
10<a href="{% url telemeta-item-detail item.public_id %}" class="component_icon button icon_cancel">{% trans "Cancel" %}</a>
11{% endblock %}
12
13{% block infos %}   
14<div class="infos">
15    <form enctype="multipart/form-data" id="_editItemForm" method="post" action="">{% csrf_token %}   
16    <table>
17    <tr><td colspan="2">{% for error in form.non_field_errors %}<li class="error">{{ error }}</li>{% endfor %}</td></tr>
18    {% for field in form %}
19    {% if not field.html_name == "copied_from_item" %}
20    <tr>
21        <tr><td class="error">{{ field.errors }}</td></tr>
22        <td>{{ field.label_tag }}:</td>
23            {% if field.html_name == "file" %}
24            <td> {{ item.file.name }} <br /> {{ field }}</td>
25            {% else %}
26            {% if field.html_name == "collection" %}
27            <td>&nbsp;{% trans "Title" %} : {{ item.collection.title }}<br />
28                &nbsp;{% trans "Code" %} : {{ item.collection.code }}<br />
29                {{ field }}</td>
30            {% else %}
31            <td>{{ field }}</td>
32            {% endif %}
33            {% endif %}
34    </tr>
35    {% else %}
36        <tr><td>{{ field.label_tag.as_hidden }}{{ field.as_hidden }}</td></tr>
37    {% endif %}
38    {% endfor %}
39    </table>
40    <div align="center">
41    <a href="{% url telemeta-item-detail item.public_id %}"
42        class="component_icon button icon_cancel">{% trans "Cancel" %}</a>
43    <a href="#" class="component_icon button icon_save" 
44onclick="var d=document; d.getElementById('wait-img').style.display='inline'; setTimeout(function(){d.getElementById('_editItemForm').submit();},300); return false;">{% trans "Save" %}</a>
45           <img id="wait-img" style="display:none" style="vertical-align:middle" alt="wait" src="{% url telemeta-images  "wait.gif" %}" />
46    </div>
47    </form>
48</div>
49{% endblock infos %}
50
51{% block delete %}
52{% endblock %}
Note: See TracBrowser for help on using the repository browser.