forked from TagesschuleElementa/www.tagesschule-elementa.ch
install app files for aldryn-forms==2.2.8
This commit is contained in:
0
templates/admin/aldryn_forms/display/.aldryn-folder
Normal file
0
templates/admin/aldryn_forms/display/.aldryn-folder
Normal file
9
templates/admin/aldryn_forms/display/recipients.html
Normal file
9
templates/admin/aldryn_forms/display/recipients.html
Normal file
@@ -0,0 +1,9 @@
|
||||
{% spaceless %}
|
||||
{% if people %}
|
||||
<ul>
|
||||
{% for person in people %}
|
||||
<li>{{ person|escape }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
{% endspaceless %}
|
||||
@@ -0,0 +1,7 @@
|
||||
{% load i18n %}
|
||||
{% filter linebreaksbr %}{% spaceless %}{% for field in data %}
|
||||
{% trans "Field" %}: {{ field.name }}
|
||||
{% trans "Label" %}: {{ field.label }}
|
||||
{% trans "Value" %}: {{ field.value }}
|
||||
{% endfor %}{% endspaceless %}
|
||||
{% endfilter %}
|
||||
34
templates/admin/aldryn_forms/export.html
Normal file
34
templates/admin/aldryn_forms/export.html
Normal file
@@ -0,0 +1,34 @@
|
||||
{% extends "admin/change_form.html" %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block content %}
|
||||
<h1>{% trans "Export form submissions" %}</h1>
|
||||
{% if errors %}
|
||||
<p class="errornote">
|
||||
{% blocktrans count errors|length as counter %}Please correct the error below.{% plural %}Please correct the errors below.{% endblocktrans %}
|
||||
</p>
|
||||
{{ adminform.non_field_errors }}
|
||||
{% endif %}
|
||||
<form action="." method="post">
|
||||
{% csrf_token %}
|
||||
{% block aldryn_form_hidden %}{% endblock %}
|
||||
<div>
|
||||
<fieldset class="module aligned">
|
||||
{% for field in adminform %}
|
||||
<div class="form-row">
|
||||
<div{% if field.errors %} class="errors"{% endif %}>
|
||||
{% if field.errors %}{{ field.errors }}{% endif %}
|
||||
{{ field.label_tag }}
|
||||
{{ field }}
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</fieldset>
|
||||
</div>
|
||||
<div class="submit-row">
|
||||
{% block aldryn_form_buttons %}
|
||||
<input type="submit" value="{% trans "Export" %}" class="default" name="export">
|
||||
{% endblock %}
|
||||
</div>
|
||||
</form>
|
||||
{% endblock %}
|
||||
15
templates/admin/aldryn_forms/export_wizard.html
Normal file
15
templates/admin/aldryn_forms/export_wizard.html
Normal file
@@ -0,0 +1,15 @@
|
||||
{% extends "admin/aldryn_forms/export.html" %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block aldryn_form_hidden %}
|
||||
{{ wizard.management_form }}
|
||||
{{ form.non_field_errors }}
|
||||
{% endblock %}
|
||||
|
||||
{% block aldryn_form_buttons %}
|
||||
{% if wizard.steps.current == wizard.steps.last %}
|
||||
<input type="submit" class="default" value="{% trans 'Export' %}" />
|
||||
{% else %}
|
||||
<input type="submit" class="default" value="{% trans 'Continue' %}" />
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
16
templates/admin/aldryn_forms/formsubmission/change_list.html
Normal file
16
templates/admin/aldryn_forms/formsubmission/change_list.html
Normal file
@@ -0,0 +1,16 @@
|
||||
{% extends "admin/change_list.html" %}
|
||||
{% load i18n admin_urls %}
|
||||
|
||||
{% block object-tools %}
|
||||
<ul class="object-tools">
|
||||
{% block object-tools-items %}
|
||||
<li>
|
||||
{% url cl.opts|admin_urlname:'export' as export_url %}
|
||||
<a href="{{ export_url }}" class="addlink">{% trans "Export Form Entries" %}</a>
|
||||
</li>
|
||||
{% if has_add_permission %}
|
||||
{{ block.super }}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
</ul>
|
||||
{% endblock %}
|
||||
0
templates/aldryn_forms/.aldryn-folder
Normal file
0
templates/aldryn_forms/.aldryn-folder
Normal file
5
templates/aldryn_forms/base.html
Normal file
5
templates/aldryn_forms/base.html
Normal file
@@ -0,0 +1,5 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block content %}
|
||||
{% block form_content %}{% endblock %}
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,12 @@
|
||||
{% extends email_html_theme %}
|
||||
{% load aldryn_forms_tags i18n %}
|
||||
|
||||
{% block email_content %}
|
||||
{% render_notification_text email_notification 'body_html' as html_message %}
|
||||
{% if html_message %}
|
||||
{{ html_message|safe }}
|
||||
{% else %}
|
||||
<p>{% blocktrans %}Form name: {{ form_name }}{% endblocktrans %}</p>
|
||||
{% include "aldryn_forms/emails/includes/form_data.html" %}
|
||||
{% endif %}
|
||||
{% endblock email_content %}
|
||||
@@ -0,0 +1,11 @@
|
||||
{% extends email_txt_theme %}
|
||||
{% load aldryn_forms_tags i18n %}
|
||||
{% block email_content %}
|
||||
{% render_notification_text email_notification 'body_text' as text_message %}
|
||||
{% if text_message %}
|
||||
{{ text_message|safe }}
|
||||
{% else %}
|
||||
{% blocktrans %}Form name: {{ form_name }}{% endblocktrans %}
|
||||
{% include "aldryn_forms/emails/includes/form_data.txt" %}
|
||||
{% endif %}
|
||||
{% endblock email_content %}
|
||||
@@ -0,0 +1 @@
|
||||
{% load aldryn_forms_tags i18n %}{% render_notification_text email_notification 'subject' as subject %}{% if subject %}{{ subject }}{% else %}{% blocktrans %}[Form submission] {{ form_name }}{% endblocktrans %}{% endif %}
|
||||
@@ -0,0 +1 @@
|
||||
{% block email_content %}{% endblock email_content %}
|
||||
@@ -0,0 +1 @@
|
||||
{% block email_content %}{% endblock email_content %}
|
||||
3
templates/aldryn_forms/emails/includes/form_data.html
Normal file
3
templates/aldryn_forms/emails/includes/form_data.html
Normal file
@@ -0,0 +1,3 @@
|
||||
{% for name, value in form_data %}
|
||||
<p>{{ name }}: {{ value|default_if_none:"—" }}</p>
|
||||
{% endfor %}
|
||||
2
templates/aldryn_forms/emails/includes/form_data.txt
Normal file
2
templates/aldryn_forms/emails/includes/form_data.txt
Normal file
@@ -0,0 +1,2 @@
|
||||
{% for name, value in form_data %}{{ name }}: {{ value|default_if_none:"—" }}
|
||||
{% endfor %}
|
||||
4
templates/aldryn_forms/emails/notification.body.html
Normal file
4
templates/aldryn_forms/emails/notification.body.html
Normal file
@@ -0,0 +1,4 @@
|
||||
{% load i18n %}
|
||||
|
||||
<p>{% blocktrans %}Form name: {{ form_name }}{% endblocktrans %}</p>
|
||||
{% include "aldryn_forms/emails/includes/form_data.html" %}
|
||||
3
templates/aldryn_forms/emails/notification.body.txt
Normal file
3
templates/aldryn_forms/emails/notification.body.txt
Normal file
@@ -0,0 +1,3 @@
|
||||
{% load i18n %}
|
||||
{% blocktrans %}Form name: {{ form_name }}{% endblocktrans %}
|
||||
{% include "aldryn_forms/emails/includes/form_data.txt" %}
|
||||
1
templates/aldryn_forms/emails/notification.subject.txt
Normal file
1
templates/aldryn_forms/emails/notification.subject.txt
Normal file
@@ -0,0 +1 @@
|
||||
{% load i18n %}{% blocktrans %}[Form submission] {{ form_name }}{% endblocktrans %}
|
||||
0
templates/aldryn_forms/emails/user/.aldryn-folder
Normal file
0
templates/aldryn_forms/emails/user/.aldryn-folder
Normal file
7
templates/aldryn_forms/emails/user/notification.body.txt
Normal file
7
templates/aldryn_forms/emails/user/notification.body.txt
Normal file
@@ -0,0 +1,7 @@
|
||||
{% load i18n %}
|
||||
{% if body_text %}
|
||||
{{ body_text }}
|
||||
{% else %}
|
||||
{% blocktrans %}Form name: {{ form_name }}{% endblocktrans %}
|
||||
{% include "aldryn_forms/emails/includes/form_data.txt" %}
|
||||
{% endif %}
|
||||
@@ -0,0 +1 @@
|
||||
{% load i18n %}{% if subject %}{{ subject }}{% else %}{% blocktrans %}[Form submission] {{ form_name }}{% endblocktrans %}{% endif %}
|
||||
28
templates/aldryn_forms/field.html
Normal file
28
templates/aldryn_forms/field.html
Normal file
@@ -0,0 +1,28 @@
|
||||
{% load i18n aldryn_forms_tags %}
|
||||
|
||||
{% if field %}
|
||||
{% comment %}
|
||||
{# available conditions #}
|
||||
{# if field.field.required %} required{% endif %}
|
||||
{% if field.errors %} error{% endif %}
|
||||
{% endcomment %}
|
||||
|
||||
<label for="{{ field.id_for_label }}">
|
||||
{{ field.label }}
|
||||
{% if field.field.required %}
|
||||
<abbr title="{% trans "Required field" %}">*</abbr>
|
||||
{% endif %}
|
||||
</label>
|
||||
|
||||
{% render_form_widget field class=instance.custom_classes %}
|
||||
|
||||
{% if field.errors %}
|
||||
{% for error in field.errors %}
|
||||
<p>{{ error }}</p>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
||||
{% if field.help_text %}
|
||||
<p>{{ field.help_text }}</p>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
0
templates/aldryn_forms/fields/.aldryn-folder
Normal file
0
templates/aldryn_forms/fields/.aldryn-folder
Normal file
1
templates/aldryn_forms/fields/booleanfield.html
Normal file
1
templates/aldryn_forms/fields/booleanfield.html
Normal file
@@ -0,0 +1 @@
|
||||
{% extends "aldryn_forms/field.html" %}
|
||||
1
templates/aldryn_forms/fields/emailfield.html
Normal file
1
templates/aldryn_forms/fields/emailfield.html
Normal file
@@ -0,0 +1 @@
|
||||
{% extends "aldryn_forms/field.html" %}
|
||||
1
templates/aldryn_forms/fields/filefield.html
Normal file
1
templates/aldryn_forms/fields/filefield.html
Normal file
@@ -0,0 +1 @@
|
||||
{% extends "aldryn_forms/field.html" %}
|
||||
1
templates/aldryn_forms/fields/imagefield.html
Normal file
1
templates/aldryn_forms/fields/imagefield.html
Normal file
@@ -0,0 +1 @@
|
||||
{% extends "aldryn_forms/field.html" %}
|
||||
@@ -0,0 +1,35 @@
|
||||
{% load aldryn_forms_tags i18n %}
|
||||
|
||||
{% if field %}
|
||||
<div class="checkbox{% if field.field.required %} form-required{% endif %}{% if field.errors %} has-error{% endif %}">
|
||||
{% block form_field_label %}
|
||||
<p>
|
||||
{{ field.label }}
|
||||
{% if field.field.required %}
|
||||
<abbr title="{% trans "Required field" %}">*</abbr>
|
||||
{% endif %}
|
||||
</p>
|
||||
{% endblock form_field_label %}
|
||||
{% block form_field %}
|
||||
{% for choice in field.field.choices %}
|
||||
<label>
|
||||
<input type="checkbox" value="{{ choice.0 }}" name="{{ field.name }}" id="field-{{ choice.0 }}"
|
||||
{% if choice.0|force_text in field.value|force_text_list %} checked="checked"{% endif %}>
|
||||
{{ choice.1 }}
|
||||
</label>
|
||||
{% endfor %}
|
||||
{% endblock form_field %}
|
||||
{% block form_field_errors %}
|
||||
{% if field.errors %}
|
||||
{% for error in field.errors %}
|
||||
<span class="text-danger">{{ error }}</span>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% endblock form_field_errors %}
|
||||
{% block form_field_help_text %}
|
||||
{% if field.help_text %}
|
||||
<p class="help-block">{{ field.help_text }}</p>
|
||||
{% endif %}
|
||||
{% endblock form_field_help_text %}
|
||||
</div>
|
||||
{% endif %}
|
||||
1
templates/aldryn_forms/fields/multipleselectfield.html
Normal file
1
templates/aldryn_forms/fields/multipleselectfield.html
Normal file
@@ -0,0 +1 @@
|
||||
{% extends "aldryn_forms/field.html" %}
|
||||
1
templates/aldryn_forms/fields/radioselectfield.html
Normal file
1
templates/aldryn_forms/fields/radioselectfield.html
Normal file
@@ -0,0 +1 @@
|
||||
{% extends "aldryn_forms/field.html" %}
|
||||
1
templates/aldryn_forms/fields/selectfield.html
Normal file
1
templates/aldryn_forms/fields/selectfield.html
Normal file
@@ -0,0 +1 @@
|
||||
{% extends "aldryn_forms/field.html" %}
|
||||
1
templates/aldryn_forms/fields/textareafield.html
Normal file
1
templates/aldryn_forms/fields/textareafield.html
Normal file
@@ -0,0 +1 @@
|
||||
{% extends "aldryn_forms/field.html" %}
|
||||
1
templates/aldryn_forms/fields/textfield.html
Normal file
1
templates/aldryn_forms/fields/textfield.html
Normal file
@@ -0,0 +1 @@
|
||||
{% extends "aldryn_forms/field.html" %}
|
||||
11
templates/aldryn_forms/fieldset.html
Normal file
11
templates/aldryn_forms/fieldset.html
Normal file
@@ -0,0 +1,11 @@
|
||||
{% load cms_tags %}
|
||||
|
||||
<fieldset{% if instance.custom_classes %} class="{{ instance.custom_classes }}"{% endif %}>
|
||||
{% if instance.legend %}
|
||||
<legend>{{ instance.legend }}</legend>
|
||||
{% endif %}
|
||||
|
||||
{% for plugin in instance.child_plugin_instances %}
|
||||
{% render_plugin plugin %}
|
||||
{% endfor %}
|
||||
</fieldset>
|
||||
43
templates/aldryn_forms/form.html
Normal file
43
templates/aldryn_forms/form.html
Normal file
@@ -0,0 +1,43 @@
|
||||
{% load i18n cms_tags sekizai_tags %}
|
||||
|
||||
<form method="post"
|
||||
{% if form.is_multipart %}enctype="multipart/form-data"{% endif %}
|
||||
{% if instance.custom_classes %} class="{{ instance.custom_classes }}"{% endif %}>
|
||||
|
||||
{% if form.non_field_errors %}
|
||||
{% for error in form.non_field_errors %}
|
||||
<p>{{ error }}</p>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
||||
{% if form_success_url %}
|
||||
<p>
|
||||
{% blocktrans %}
|
||||
Thank you for submitting your information, you will be
|
||||
<a href="{{ form_success_url }}">redirected shortly</a>.
|
||||
{% endblocktrans %}
|
||||
</p>
|
||||
{% endif %}
|
||||
|
||||
{% if not form_success_url %}
|
||||
{% for plugin in instance.child_plugin_instances %}
|
||||
{% render_plugin plugin %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
||||
{% csrf_token %}
|
||||
{% for field in form.hidden_fields %}
|
||||
{{ field }}
|
||||
{% endfor %}
|
||||
</form>
|
||||
|
||||
{# INFO: this solution is currently required because we can't redirect from a plugin. #}
|
||||
{% if form_success_url %}
|
||||
{% addtoblock "js" %}
|
||||
<script>
|
||||
setTimeout(function () {
|
||||
window.location.href = '{{ form_success_url }}';
|
||||
}, 2000);
|
||||
</script>
|
||||
{% endaddtoblock %}
|
||||
{% endif %}
|
||||
6
templates/aldryn_forms/send.html
Normal file
6
templates/aldryn_forms/send.html
Normal file
@@ -0,0 +1,6 @@
|
||||
{% extends "aldryn_forms/base.html" %}
|
||||
{% load cms_tags %}
|
||||
|
||||
{% block form_content %}
|
||||
{% render_plugin object %}
|
||||
{% endblock %}
|
||||
3
templates/aldryn_forms/submit_button.html
Normal file
3
templates/aldryn_forms/submit_button.html
Normal file
@@ -0,0 +1,3 @@
|
||||
<button type="submit" {% if instance.custom_classes %} class="{{ instance.custom_classes}}"{% endif %}>
|
||||
{{ instance.label }}
|
||||
</button>
|
||||
Reference in New Issue
Block a user