login page

This commit is contained in:
Alicja Cięciwa
2020-10-27 12:57:58 +01:00
commit cb8886666c
8545 changed files with 1082463 additions and 0 deletions

View File

@@ -0,0 +1,4 @@
<div{% if alert.css_id %} id="{{ alert.css_id }}"{% endif %}{% if alert.css_class %} class="{{ alert.css_class }}"{% endif %}>
{% if dismiss %}<button type="button" class="close" data-dismiss="alert">&times;</button>{% endif %}
{{ content|safe }}
</div>

View File

@@ -0,0 +1,9 @@
<input type="{{ input.input_type }}"
name="{% if input.name|wordcount > 1 %}{{ input.name|slugify }}{% else %}{{ input.name }}{% endif %}"
value="{{ input.value }}"
{% if input.input_type != "hidden" %}
class="{{ input.field_classes }}"
id="{% if input.id %}{{ input.id }}{% else %}{{ input.input_type }}-id-{{ input.name|slugify }}{% endif %}"
{% endif %}
{{ input.flat_attrs|safe }}
/>

View File

@@ -0,0 +1 @@
<button {{ button.flat_attrs|safe }}>{{ button.content|safe }}</button>

View File

@@ -0,0 +1,4 @@
<div {% if buttonholder.css_id %}id="{{ buttonholder.css_id }}"{% endif %}
class="buttonHolder{% if buttonholder.css_class %} {{ buttonholder.css_class }}{% endif %}">
{{ fields_output|safe }}
</div>

View File

@@ -0,0 +1,26 @@
{% load crispy_forms_filters %}
{% load l10n %}
<div class="{% if field_class %} {{ field_class }}{% endif %}"{% if flat_attrs %} {{ flat_attrs|safe }}{% endif %}>
{% for choice in field.field.choices %}
<div class="{%if use_custom_control%}custom-control custom-checkbox{% if inline_class %} custom-control-inline{% endif %}{% else %}form-check{% if inline_class %} form-check-inline{% endif %}{% endif %}">
<input type="checkbox" class="{%if use_custom_control%}custom-control-input{% else %}form-check-input{% endif %}{% if field.errors %} is-invalid{% endif %}"{% if choice.0 in field.value or choice.0|stringformat:"s" in field.value or choice.0|stringformat:"s" == field.value|default_if_none:""|stringformat:"s" %} checked="checked"{% endif %} name="{{ field.html_name }}" id="id_{{ field.html_name }}_{{ forloop.counter }}" value="{{ choice.0|unlocalize }}" {{ field.field.widget.attrs|flatatt }}>
<label class="{%if use_custom_control%}custom-control-label{% else %}form-check-label{% endif %}" for="id_{{ field.html_name }}_{{ forloop.counter }}">
{{ choice.1|unlocalize }}
</label>
{% if field.errors and forloop.last and not inline_class %}
{% include 'bootstrap4/layout/field_errors_block.html' %}
{% endif %}
</div>
{% endfor %}
{% if field.errors and inline_class %}
<div class="w-100 {%if use_custom_control%}custom-control custom-checkbox{% if inline_class %} custom-control-inline{% endif %}{% else %}form-check{% if inline_class %} form-check-inline{% endif %}{% endif %}">
{# the following input is only meant to allow boostrap to render the error message as it has to be after an invalid input. As the input has no name, no data will be sent. #}
<input type="checkbox" class="custom-control-input {% if field.errors %}is-invalid{%endif%}">
{% include 'bootstrap4/layout/field_errors_block.html' %}
</div>
{% endif %}
{% include 'bootstrap4/layout/help_text.html' %}
</div>

View File

@@ -0,0 +1,14 @@
{% if field.is_hidden %}
{{ field }}
{% else %}
<div id="div_{{ field.auto_id }}" class="form-group{% if 'form-horizontal' in form_class %} row{% endif %}{% if wrapper_class %} {{ wrapper_class }}{% endif %}{% if form_show_errors and field.errors %} has-danger{% endif %}{% if field.css_classes %} {{ field.css_classes }}{% endif %}">
{% if field.label %}
<label for="{{ field.id_for_label }}" class="{{ label_class }}{% if not inline_class %} col-form-label{% endif %}{% if field.field.required %} requiredField{% endif %}">
{{ field.label|safe }}{% if field.field.required %}<span class="asteriskField">*</span>{% endif %}
</label>
{% endif %}
{% include 'bootstrap4/layout/checkboxselectmultiple.html' %}
</div>
{% endif %}

View File

@@ -0,0 +1,6 @@
<div {% if div.css_id %}id="{{ div.css_id }}"{% endif %}
class="{% if 'col' in div.css_class %}{{ div.css_class|default:'' }}{% else %}col-md {{ div.css_class|default:'' }}{% endif %}" {{ div.flat_attrs|safe }}>
{{ fields|safe }}
</div>

View File

@@ -0,0 +1,4 @@
<div {% if div.css_id %}id="{{ div.css_id }}"{% endif %}
{% if div.css_class %}class="{{ div.css_class }}"{% endif %} {{ div.flat_attrs|safe }}>
{{ fields|safe }}
</div>

View File

@@ -0,0 +1,5 @@
{% if form_show_errors and field.errors %}
{% for error in field.errors %}
<span id="error_{{ forloop.counter }}_{{ field.auto_id }}" class="invalid-feedback"><strong>{{ error }}</strong></span>
{% endfor %}
{% endif %}

View File

@@ -0,0 +1,5 @@
{% if form_show_errors and field.errors %}
{% for error in field.errors %}
<p id="error_{{ forloop.counter }}_{{ field.auto_id }}" class="invalid-feedback"><strong>{{ error }}</strong></p>
{% endfor %}
{% endif %}

View File

@@ -0,0 +1,52 @@
{% load crispy_forms_field %}
<div class="{{ field_class }} mb-2">
{% for widget in field.subwidgets %}
{% if widget.data.is_initial %}
<div class="input-group mb-2">
<div class="input-group-prepend">
<span class="input-group-text">{{ widget.data.initial_text }}</span>
</div>
<div class="form-control d-flex h-auto">
<span class="text-break" style="flex-grow:1;min-width:0">
<a href="{{ field.value.url }}">{{ field.value }}</a>
</span>
{% if not widget.data.required %}
<span class="align-self-center ml-2">
<span class="custom-control custom-checkbox">
<input type="checkbox" name="{{ widget.data.checkbox_name }}" id="{{ widget.data.checkbox_id }}" class="custom-control-input"{% if field.field.disabled %} disabled{% endif %} >
<label class="custom-control-label mb-0" for="{{ widget.data.checkbox_id }}">{{ widget.data.clear_checkbox_label }}</label>
</span>
</span>
{% endif %}
</div>
</div>
<div class="input-group mb-0">
<div class="input-group-prepend">
<span class="input-group-text">{{ widget.data.input_text }}</span>
</div>
{% endif %}
<div class="form-control custom-file{% if field.errors %} is-invalid{%endif%}" style="border:0">
<input type="{{ widget.data.type }}" name="{{ widget.data.name }}" class="custom-file-input{% if field.errors %} is-invalid{%endif%}" {% if field.field.disabled %}disabled{% endif %} {% for name, value in field.field.widget.attrs.items %}{% if value is not False %} {{ name }}{% if value is not True %}="{{ value|stringformat:'s' }}"{% endif %}{% endif %}{% endfor %}>
<label class="custom-file-label text-truncate" for="{{ field.id_for_label }}">---</label>
<script type="text/javascript" id="script-{{ field.id_for_label }}">
document.getElementById("script-{{ field.id_for_label }}").parentNode.querySelector('.custom-file-input').onchange = function (e){
var filenames = "";
for (let i=0;i<e.target.files.length;i++){
filenames+=(i>0?", ":"")+e.target.files[i].name;
}
e.target.parentNode.querySelector('.custom-file-label').textContent=filenames;
}
</script>
</div>
{% if not widget.data.is_initial %}
{% include 'bootstrap4/layout/help_text_and_errors.html' %}
{% endif %}
{% if widget.data.is_initial %}
</div>
<div class="input-group mb-0">
{% include 'bootstrap4/layout/help_text_and_errors.html' %}
</div>
{% endif %}
{% endfor %}
</div>

View File

@@ -0,0 +1,17 @@
{% load crispy_forms_field %}
<div{% if div.css_id %} id="{{ div.css_id }}"{% endif %} class="form-group{% if 'form-horizontal' in form_class %} row{% endif %}{% if wrapper_class %} {{ wrapper_class }}{% endif %}{% if form_show_errors and field.errors %} has-danger{% endif %}{% if field.css_classes %} {{ field.css_classes }}{% endif %}{% if div.css_class %} {{ div.css_class }}{% endif %}" {{ div.flat_attrs|safe }}>
{% if field.label and form_show_labels %}
<label for="{{ field.id_for_label }}" class="{% if 'form-horizontal' in form_class %}col-form-label {% endif %}{{ label_class }}{% if field.field.required %} requiredField{% endif %}">
{{ field.label|safe }}{% if field.field.required %}<span class="asteriskField">*</span>{% endif %}
</label>
{% endif %}
<div class="{{ field_class }}">
<div class="input-group">
{% crispy_field field %}
<span class="input-group-append{% if active %} active{% endif %}{% if input_size %} {{ input_size }}{% endif %}">{{ buttons|safe }}</span>
</div>
{% include 'bootstrap4/layout/help_text_and_errors.html' %}
</div>
</div>

View File

@@ -0,0 +1,6 @@
<fieldset {% if fieldset.css_id %}id="{{ fieldset.css_id }}"{% endif %}
{% if fieldset.css_class or form_style %}class="{{ fieldset.css_class }} {{ form_style }}"{% endif %}
{{ fieldset.flat_attrs|safe }}>
{% if legend %}<legend>{{ legend|safe }}</legend>{% endif %}
{{ fields|safe }}
</fieldset>

View File

@@ -0,0 +1,9 @@
<div{% if formactions.attrs %} {{ formactions.flat_attrs|safe }}{% endif %} class="form-group{% if 'form-horizontal' in form_class %} row{% endif %}">
{% if label_class %}
<div class="aab {{ label_class }}"></div>
{% endif %}
<div class="{{ field_class }}">
{{ fields_output|safe }}
</div>
</div>

View File

@@ -0,0 +1,7 @@
{% if field.help_text %}
{% if help_text_inline %}
<span id="hint_{{ field.auto_id }}" class="text-muted">{{ field.help_text|safe }}</span>
{% else %}
<small id="hint_{{ field.auto_id }}" class="form-text text-muted">{{ field.help_text|safe }}</small>
{% endif %}
{% endif %}

View File

@@ -0,0 +1,13 @@
{% if help_text_inline and not error_text_inline %}
{% include 'bootstrap4/layout/help_text.html' %}
{% endif %}
{% if error_text_inline %}
{% include 'bootstrap4/layout/field_errors.html' %}
{% else %}
{% include 'bootstrap4/layout/field_errors_block.html' %}
{% endif %}
{% if not help_text_inline %}
{% include 'bootstrap4/layout/help_text.html' %}
{% endif %}

View File

@@ -0,0 +1,21 @@
{% load crispy_forms_field %}
{% if field.is_hidden %}
{{ field }}
{% else %}
{% if field|is_checkbox %}
<div id="div_{{ field.auto_id }}" class="form-check form-check-inline{% if wrapper_class %} {{ wrapper_class }}{% endif %}">
<label for="{{ field.id_for_label }}" class="form-check-label{% if field.field.required %} requiredField{% endif %}">
{% crispy_field field 'class' 'form-check-input' %}
{{ field.label|safe }}
</label>
</div>
{% else %}
<div id="div_{{ field.auto_id }}" class="input-group{% if wrapper_class %} {{ wrapper_class }}{% endif %}">
<label for="{{ field.id_for_label }}" class="sr-only{% if field.field.required %} requiredField{% endif %}">
{{ field.label|safe }}
</label>
{% crispy_field field 'placeholder' field.label %}
</div>
{% endif %}
{% endif %}

View File

@@ -0,0 +1,27 @@
{% load crispy_forms_field %}
{% if field.is_hidden %}
{{ field }}
{% else %}
{% if field.label %}
<label for="{{ field.id_for_label }}"{% if labelclass %} class="{{ labelclass }}"{% endif %}>
{% endif %}
{% if field|is_checkbox %}
{% crispy_field field %}
{% endif %}
{% if field.label %}
{{ field.label }}
{% endif %}
{% if not field|is_checkbox %}
{% crispy_field field %}
{% endif %}
{% if field.label %}
</label>
{% endif %}
{% endif %}

View File

@@ -0,0 +1,39 @@
{% load crispy_forms_field %}
{% if field.is_hidden %}
{{ field }}
{% else %}
<div id="div_{{ field.auto_id }}" class="form-group{% if wrapper_class %} {{ wrapper_class }}{% endif %}{% if 'form-horizontal' in form_class %} row{% endif %}{% if form_group_wrapper_class %} {{ form_group_wrapper_class }}{% endif %}{% if form_show_errors and field.errors %} has-danger{% endif %}{% if field.css_classes %} {{ field.css_classes }}{% endif %}">
{% if field.label and form_show_labels %}
<label for="{{ field.id_for_label }}" class="{% if 'form-horizontal' in form_class %}col-form-label {% endif %}{{ label_class }}{% if field.field.required %} requiredField{% endif %}">
{{ field.label|safe }}{% if field.field.required %}<span class="asteriskField">*</span>{% endif %}
</label>
{% endif %}
<div class="{{ field_class }}">
<div class="input-group">
{% if crispy_prepended_text %}
<div class="input-group-prepend{% if active %} active{% endif %}{% if input_size %} {{ input_size }}{% endif %}">
<span class="input-group-text">{{ crispy_prepended_text|safe }}</span>
</div>
{% endif %}
{% crispy_field field %}
{% if crispy_appended_text %}
<div class="input-group-append{% if active %} active{% endif %}{% if input_size %} {{ input_size }}{% endif %}">
<span class="input-group-text">{{ crispy_appended_text|safe }}</span>
</div>
{% endif %}
{% if error_text_inline %}
{% include 'bootstrap4/layout/field_errors.html' %}
{% else %}
{% include 'bootstrap4/layout/field_errors_block.html' %}
{% endif %}
</div>
{% if not help_text_inline %}
{% include 'bootstrap4/layout/help_text.html' %}
{% endif %}
</div>
</div>
{% endif %}

View File

@@ -0,0 +1,26 @@
{% load crispy_forms_filters %}
{% load l10n %}
<div class="{% if field_class %} {{ field_class }}{% endif %}"{% if flat_attrs %} {{ flat_attrs|safe }}{% endif %}>
{% for choice in field.field.choices %}
<div class="{%if use_custom_control%}custom-control custom-radio{% if inline_class %} custom-control-inline{% endif %}{% else %}form-check{% if inline_class %} form-check-inline{% endif %}{% endif %}">
<input type="radio" class="{%if use_custom_control%}custom-control-input{% else %}form-check-input{% endif %}{% if field.errors %} is-invalid{% endif %}"{% if choice.0|stringformat:"s" == field.value|default_if_none:""|stringformat:"s" %} checked="checked"{% endif %} name="{{ field.html_name }}" id="id_{{ field.html_name }}_{{ forloop.counter }}" value="{{ choice.0|unlocalize }}" {{ field.field.widget.attrs|flatatt }}>
<label for="id_{{ field.html_name }}_{{ forloop.counter }}" class="{%if use_custom_control%}custom-control-label{% else %}form-check-label{% endif %}">
{{ choice.1|unlocalize }}
</label>
{% if field.errors and forloop.last and not inline_class %}
{% include 'bootstrap4/layout/field_errors_block.html' %}
{% endif %}
</div>
{% endfor %}
{% if field.errors and inline_class %}
<div class="w-100 {%if use_custom_control%}custom-control custom-radio{% if inline_class %} custom-control-inline{% endif %}{% else %}form-check{% if inline_class %} form-check-inline{% endif %}{% endif %}">
{# the following input is only meant to allow boostrap to render the error message as it has to be after an invalid input. As the input has no name, no data will be sent. #}
<input type="checkbox" class="custom-control-input {% if field.errors %}is-invalid{%endif%}">
{% include 'bootstrap4/layout/field_errors_block.html' %}
</div>
{% endif %}
{% include 'bootstrap4/layout/help_text.html' %}
</div>

View File

@@ -0,0 +1,14 @@
{% if field.is_hidden %}
{{ field }}
{% else %}
<div id="div_{{ field.auto_id }}" class="form-group{% if 'form-horizontal' in form_class %} row{% endif %}{% if wrapper_class %} {{ wrapper_class }}{% endif %}{% if form_show_errors and field.errors %} has-danger{% endif %}{% if field.css_classes %} {{ field.css_classes }}{% endif %}">
{% if field.label %}
<label for="{{ field.id_for_label }}" class="{{ label_class }}{% if not inline_class %} col-form-label{% endif %}{% if field.field.required %} requiredField{% endif %}">
{{ field.label|safe }}{% if field.field.required %}<span class="asteriskField">*</span>{% endif %}
</label>
{% endif %}
{% include 'bootstrap4/layout/radioselect.html' %}
</div>
{% endif %}

View File

@@ -0,0 +1,3 @@
<div {% if div.css_id %}id="{{ div.css_id }}"{% endif %} class="form-row {{ div.css_class|default:'' }}" {{ div.flat_attrs|safe }}>
{{ fields|safe }}
</div>

View File

@@ -0,0 +1 @@
<li class="nav-item"><a class="nav-link{% if 'active' in link.css_class %} active{% endif %}" href="#{{ link.css_id }}" data-toggle="tab">{{ link.name|capfirst }}{% if tab.errors %}!{% endif %}</a></li>

View File

@@ -0,0 +1,6 @@
<ul{% if tabs.css_id %} id="{{ tabs.css_id }}"{% endif %} class="nav nav-tabs">
{{ links|safe }}
</ul>
<div class="tab-content card-body">
{{ content|safe }}
</div>

View File

@@ -0,0 +1,10 @@
{% load crispy_forms_field %}
<div id="div_{{ field.auto_id }}" class="form-group{% if 'form-horizontal' in form_class %} row{% endif %}{% if form_show_errors and field.errors %} error{% endif %}{% if field.css_classes %} {{ field.css_classes }}{% endif %}">
<label class="{% if 'form-horizontal' in form_class %}col-form-label {% endif %}{{ label_class }}{% if field.field.required %} requiredField{% endif %}">{{ field.label|safe }}{% if field.field.required %}<span class="asteriskField">*</span>{% endif %}</label>
<div class="{{ field_class }}">
{% crispy_field field 'disabled' 'disabled' %}
{% include 'bootstrap4/layout/help_text.html' %}
</div>
</div>