59 lines
1.6 KiB
HTML
59 lines
1.6 KiB
HTML
{% extends "chrono/pricing/manager_agenda_pricing_detail.html" %}
|
|
{% load i18n chrono %}
|
|
|
|
{% block breadcrumb %}
|
|
{{ block.super }}
|
|
{% if matrix.criteria %}
|
|
<a href="{% url 'chrono-manager-agenda-pricing-matrix-slug-edit' agenda.pk object.pk matrix.criteria.slug %}">{% trans "Edit pricing" %}</a>
|
|
{% else %}
|
|
<a href="{% url 'chrono-manager-agenda-pricing-matrix-edit' agenda.pk object.pk %}">{% trans "Edit pricing" %}</a>
|
|
{% endif %}
|
|
{% endblock %}
|
|
|
|
{% block appbar %}
|
|
<h2>{% trans "Edit pricing" %}</h2>
|
|
{% endblock %}
|
|
|
|
{% block content %}
|
|
<div class="section">
|
|
{% if matrix.criteria %}<h3>{{ matrix.criteria.label }}</h3>{% endif %}
|
|
<div>
|
|
<form method="post" enctype="multipart/form-data">
|
|
{% csrf_token %}
|
|
{{ form.management_form }}
|
|
<table class="main">
|
|
{% if matrix.rows.0.cells.0.criteria %}
|
|
<thead>
|
|
<tr>
|
|
<th></th>
|
|
{% for cell in matrix.rows.0.cells %}
|
|
<th>{{ cell.criteria.label }}</th>
|
|
{% endfor %}
|
|
</tr>
|
|
</thead>
|
|
{% endif %}
|
|
<tbody>
|
|
{% for sub_form in form %}
|
|
{% with row=matrix.rows|get:forloop.counter0 %}
|
|
<tr>
|
|
<th>{{ row.criteria.label }}</th>
|
|
{% for field in sub_form %}
|
|
<td>
|
|
{{ field.errors.as_ul }}
|
|
{{ field }}
|
|
</td>
|
|
{% endfor %}
|
|
</tr>
|
|
{% endwith %}
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
<div class="buttons">
|
|
<button class="submit-button">{% trans "Save" %}</button>
|
|
<a class="cancel" href="{% url 'chrono-manager-agenda-pricing-detail' agenda.pk object.pk %}">{% trans 'Cancel' %}</a>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
{% endblock %}
|