-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #404 from forza-mor-rotterdam/django-4.2
Django 4.2
- Loading branch information
Showing
26 changed files
with
337 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
from django.apps import AppConfig | ||
|
||
|
||
class AuthorisatieConfig(AppConfig): | ||
name = "apps.authorisatie" | ||
verbose_name = "Authorisatie" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
from django.apps import AppConfig | ||
|
||
|
||
class MainConfig(AppConfig): | ||
name = "apps.main" | ||
verbose_name = "Main" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
68 changes: 68 additions & 0 deletions
68
app/apps/main/templates/django/forms/widgets/checkbox_select.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
{% load file_exists from main_tags %} | ||
{% load l10n %} | ||
{% with id=widget.attrs.id %} | ||
<div class="form-row {{ classes.label }} {{ classes.value }} {{ classes.single_value }}"> | ||
{% if id and not widget.attrs.hideLabel %} | ||
<h3 class="label {% if widget.attrs.hasMoreInfo and widget.help_text %}has-more-info{% endif %}"> | ||
{{ widget.label }}{{ widget.attrs.hideLabel }} | ||
</h3> | ||
{% endif %} | ||
{% if widget.attrs.hasMoreInfo and widget.help_text %} | ||
<div class="foldout--info" data-controller="utils"> | ||
<h4 class="summary" | ||
data-action="click->utils#foldOut" | ||
aria-label="Meer info">{% include "icons/info-filled.svg" %}</h4> | ||
<p>{{ widget.help_text|safe }}</p> | ||
</div> | ||
{% endif %} | ||
{% if widget.attrs.showSelectAll %} | ||
<div class="container__buttons"> | ||
<button class="btn btn-textlink btn-inline" | ||
data-action="selectAll#selectAll" | ||
data-selectAll-filter-type-param="all">Selecteer alles</button> | ||
| | ||
<button class="btn btn-inline" data-action="selectAll#selectAll">Selecteer niets</button> | ||
</div> | ||
{% endif %} | ||
<div id="{{ id }}"> | ||
<ul class="{% if widget.attrs.classList %}{{ widget.attrs.classList }}{% else %}list--form-check-input{% endif %}"> | ||
{% for group, options, index in widget.optgroups %} | ||
{% if group %} | ||
<li> | ||
{{ group }} | ||
<ul {% if id %}id="{{ id }}_{{ index }}"{% endif %}> | ||
{% endif %} | ||
{% for option in options %} | ||
<li class="{% if widget.required and form.required_css_class %}{{ form.required_css_class }}{% endif %}"> | ||
<div class="form-check"> | ||
{% include "django/forms/widgets/input.html" with widget=option %} | ||
<label class="form-check-label" | ||
for="{{ option.attrs.id }}" | ||
{% if option.selected %}checked{% endif %} | ||
{% if widget.required %}required{% endif %} | ||
{% include "django/forms/widgets/attrs.html" %}> | ||
{% if widget.attrs.hasIcon %} | ||
{% with option.label|slugify as slugged_option_label %} | ||
{% with "icons/afdelingen/"|add:slugged_option_label|add:".svg" as icon_path %} | ||
{% if icon_path|file_exists %} | ||
{% include icon_path %} | ||
{% else %} | ||
{% include "icons/noimage.svg" %} | ||
{% endif %} | ||
{% endwith %} | ||
{% endwith %} | ||
{% endif %} | ||
{{ option.label }} | ||
</label> | ||
</div> | ||
</li> | ||
{% endfor %} | ||
{% if group %} | ||
</ul> | ||
</li> | ||
{% endif %} | ||
{% endfor %} | ||
</ul> | ||
</div> | ||
</div> | ||
{% endwith %} |
26 changes: 26 additions & 0 deletions
26
app/apps/main/templates/django/forms/widgets/checkbox_select_old.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
{% with id=widget.attrs.id %} | ||
<div {% if id %}id="{{ id }}"{% endif %}> | ||
<ul {% if widget.attrs.classList %}class="{{ widget.attrs.classList }}"{% endif %}> | ||
{% for group, options, index in widget.optgroups %} | ||
{% if group %} | ||
<li> | ||
{{ group }} | ||
<ul {% if id %}id="{{ id }}_{{ index }}"{% endif %}> | ||
{% endif %} | ||
{% for option in options %} | ||
<li> | ||
<div class="form-check"> | ||
{% include "django/forms/widgets/input.html" with widget=option %} | ||
<label {% if option.attrs.id %}for="{{ option.attrs.id }}"{% endif %} | ||
class="form-check-label">{{ option.label }}</label> | ||
</div> | ||
</li> | ||
{% endfor %} | ||
{% if group %} | ||
</ul> | ||
</li> | ||
{% endif %} | ||
{% endfor %} | ||
</ul> | ||
</div> | ||
{% endwith %} |
30 changes: 30 additions & 0 deletions
30
app/apps/main/templates/django/forms/widgets/clearable_file_input.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<div data-controller="bijlagen"> | ||
<button type="button" | ||
class="btn btn-secondary btn-files" | ||
id="buttonFile_{{ field.auto_id }}" | ||
data-action="bijlagen#showFileInput"> | ||
<svg width="32" | ||
height="32" | ||
viewBox="0 0 32 32" | ||
fill="none" | ||
xmlns="http://www.w3.org/2000/svg"> | ||
<path fill-rule="evenodd" clip-rule="evenodd" d="M17 6H15V15H6V17H15V26H17V17H26V15H17V6Z" fill="#fff" /> | ||
</svg> | ||
<span> | ||
{% if field.field.widget.attrs.button_text %} | ||
{{ field.field.widget.attrs.button_text }} | ||
{% else %} | ||
Foto toevoegen | ||
{% endif %} | ||
</span> | ||
</button> | ||
{% if field.help_text %}<p class="help-block">{{ field.help_text|safe }}</p>{% endif %} | ||
{% for error in field.errors %} | ||
<span class="help-block invalid-text {{ form.error_css_class }}">{{ error }}</span> | ||
{% endfor %} | ||
<div class="file-upload multiple hidden" tabindex="1"> | ||
<div class="file-upload-mask">Sleep één of meer bestanden hier naartoe, of klik hier om bestanden te uploaden</div> | ||
{% include "django/forms/widgets/input.html" %} | ||
<div id="imagesPreview" class="preview"></div> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<div> | ||
<button type="button" | ||
class="btn btn-secondary btn-files" | ||
id="buttonFile_{{ field.auto_id }}" | ||
data-action="bijlagen#showFileInput"> | ||
<svg width="32" | ||
height="32" | ||
viewBox="0 0 32 32" | ||
fill="none" | ||
xmlns="http://www.w3.org/2000/svg"> | ||
<path fill-rule="evenodd" clip-rule="evenodd" d="M17 6H15V15H6V17H15V26H17V17H26V15H17V6Z" fill="#fff" /> | ||
</svg> | ||
<span> | ||
{% if field.field.widget.attrs.button_text %} | ||
{{ field.field.widget.attrs.button_text }} | ||
{% else %} | ||
Foto toevoegen | ||
{% endif %} | ||
</span> | ||
</button> | ||
{% if field.help_text %}<p class="help-block">{{ field.help_text|safe }}</p>{% endif %} | ||
{% for error in field.errors %} | ||
<span class="help-block invalid-text {{ form.error_css_class }}">{{ error }}</span> | ||
{% endfor %} | ||
<div class="file-upload multiple hidden" tabindex="1"> | ||
<div class="file-upload-mask">Sleep één of meer bestanden hier naartoe, of klik hier om bestanden te uploaden</div> | ||
{% include "django/forms/widgets/input.html" %} | ||
<div id="imagesPreview" class="preview"></div> | ||
</div> | ||
</div> |
19 changes: 19 additions & 0 deletions
19
app/apps/main/templates/django/forms/widgets/multiple_input.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{% with id=widget.attrs.id %} | ||
<ul {% if id %}id="{{ id }}"{% endif %} | ||
{% if widget.attrs.class %}class="{{ widget.attrs.class }}"{% endif %}> | ||
{% for group, options, index in widget.optgroups %} | ||
{% if group %} | ||
<li> | ||
{{ group }} | ||
<ul {% if id %}id="{{ id }}_{{ index }}"{% endif %}> | ||
{% endif %} | ||
{% for option in options %} | ||
<li>{% include option.template_name with widget=option %}</li> | ||
{% endfor %} | ||
{% if group %} | ||
</ul> | ||
</li> | ||
{% endif %} | ||
{% endfor %} | ||
</ul> | ||
{% endwith %} |
Oops, something went wrong.