-
Notifications
You must be signed in to change notification settings - Fork 21
/
base_create_update.html
executable file
·76 lines (70 loc) · 3 KB
/
base_create_update.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
{% extends request.is_ajax|yesno:"arctic/base_dialog.html,arctic/base.html" %}
{% load i18n arctic_tags staticfiles %}
{% block body_class %}
{{ block.super }}
{% endblock %}
{% block content %}
<div class="row">
<div class="col">
<div class="form-size">
{% block form_validation %}
{% include "arctic/partials/form_validation.html" with form=form %}
{% endblock %}
</div>
</div>
</div>
<form action="" method="POST" enctype="multipart/form-data" class="dirty-check {{ form_display }}" novalidate>
<fieldset type="post" class="fieldset-default arctic-card">
<div class="{% block form_size_class %}form-size{% endblock %}">
{% csrf_token %}
{% block form %}
{% block form_fields %}
{% include "arctic/partials/form_fields.html" with form=form %}
{% endblock %}
{% endblock %}
{% block inlines %}
{% if inlines %}
{% for formset in inlines %}
{% block inlines_title %}
{% if formset.verbose_name %}
<div class="arctic-card__form-header">
<h4 class="arctic-card__title">{{ formset.verbose_name }}</h4>
</div>
<div class="arctic-card__placeholder arctic-card__placeholder--small"></div>
{% endif %}
{% endblock %}
{{ formset.management_form }}
{{ formset.non_form_errors }}
{% for form in formset %}
{% block inlines_form_fields %}
{% include "arctic/partials/form_field_inline.html" with form=form %}
{% endblock %}
{% endfor %}
{% endfor %}
{% endif %}
{% endblock inlines %}
{% block extra_forms %} {% endblock %}
{# TODO move form-actions to it's own section #}
{% block form_actions %}
<div class="row justify-content-center">
<div class="col-sm-6 col">
{% if links %}
{% for link in links %}
<a class="btn btn-secondary" href="{{ link.url }}">
{{ link.label }}
</a>
{% endfor %}
{% endif %}
</div>
<div class="col-sm-6 col text-right">
{% block form_actions_buttons %}
<input type="submit" name="save" value="Submit" class="btn btn-primary" id="submit-id-save" />
{% endblock %}
</div>
</div>
{% endblock form_actions %}
</div>
</fieldset>
</form>
{% block extra_content %}{% endblock %}
{% endblock %}