-
Notifications
You must be signed in to change notification settings - Fork 6
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 #716 from maykinmedia/fix/1617-fix-labels-html-syntax
🎨 [#1617] Fixing labels for correct HTML syntax
- Loading branch information
Showing
20 changed files
with
168 additions
and
42 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
27 changes: 0 additions & 27 deletions
27
src/open_inwoner/components/templates/components/Form/Label.html
This file was deleted.
Oops, something went wrong.
15 changes: 15 additions & 0 deletions
15
src/open_inwoner/components/templates/components/Header/WarningHeader.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,15 @@ | ||
{% load i18n icon_tags link_tags static %} | ||
|
||
<style nonce="{{ request.csp_nonce }}"> | ||
.warning-header { | ||
background-color: {{ warning_banner_background_color }}; | ||
color: {{ warning_banner_font_color }}; | ||
} | ||
</style> | ||
|
||
<div class="warning-header"> | ||
<div class="warning-header__container"> | ||
<span class="warning-header__icon">{% icon icon="error_outlined" icon_position="after" outlined=True %}</span> | ||
<span class="warning-header__text">{{ warning_banner_text }}</span> | ||
</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
53 changes: 53 additions & 0 deletions
53
src/open_inwoner/configurations/migrations/0047_auto_20230809_0833.py
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,53 @@ | ||
# Generated by Django 3.2.15 on 2023-08-09 06:33 | ||
|
||
from django.db import migrations, models | ||
|
||
import colorfield.fields | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
("configurations", "0046_siteconfiguration_cookie_consent"), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name="siteconfiguration", | ||
name="warning_banner_background_color", | ||
field=colorfield.fields.ColorField( | ||
default="#FFDBAD", | ||
help_text="The background color for the warning banner", | ||
max_length=18, | ||
verbose_name="Warning banner background", | ||
), | ||
), | ||
migrations.AddField( | ||
model_name="siteconfiguration", | ||
name="warning_banner_enabled", | ||
field=models.BooleanField( | ||
default=False, | ||
help_text="Whether the warning banner should be displayed", | ||
verbose_name="Show warning banner", | ||
), | ||
), | ||
migrations.AddField( | ||
model_name="siteconfiguration", | ||
name="warning_banner_font_color", | ||
field=colorfield.fields.ColorField( | ||
default="#000000", | ||
help_text="The font color for the warning banner", | ||
max_length=18, | ||
verbose_name="Warning banner font", | ||
), | ||
), | ||
migrations.AddField( | ||
model_name="siteconfiguration", | ||
name="warning_banner_text", | ||
field=models.TextField( | ||
blank=True, | ||
help_text="Text will be displayed on the warning banner", | ||
verbose_name="Warning banner text", | ||
), | ||
), | ||
] |
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
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 |
---|---|---|
|
@@ -10,7 +10,8 @@ | |
margin: 0; | ||
gap: 18px; | ||
|
||
label { | ||
label, | ||
.label { | ||
display: flex; | ||
flex-direction: row; | ||
gap: 10px; | ||
|
24 changes: 24 additions & 0 deletions
24
src/open_inwoner/scss/components/WarningHeader/WarningHeader.scss
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,24 @@ | ||
.warning-header { | ||
display: flex; | ||
box-sizing: border-box; | ||
padding: var(--spacing-large); | ||
|
||
.warning-header__container { | ||
display: flex; | ||
align-items: center; | ||
padding: 0; | ||
margin: 0 auto; | ||
|
||
@media (min-width: 768px) { | ||
max-width: 90%; | ||
} | ||
|
||
.warning-header__icon, | ||
.warning-header__text { | ||
padding: var(--spacing-small); | ||
} | ||
.warning-header__icon { | ||
width: 20px; | ||
} | ||
} | ||
} |
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
4 changes: 2 additions & 2 deletions
4
src/open_inwoner/templates/utils/widgets/message_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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
<input type="{{ widget.type }}" name="{{ widget.name }}" data-init="{{ widget.value|default:'' }}"{% include "django/forms/widgets/attrs.html" %}> | ||
<label> | ||
<span> | ||
<input type="text" name="{{ widget.init_name }}" id="{{ widget.init_id }}" {% if widget.value %} value="{{ widget.value.instance.uuid }}"{% endif %} class="message-file__init"> | ||
</label> | ||
</span> | ||
|
2 changes: 1 addition & 1 deletion
2
src/open_inwoner/templates/utils/widgets/private_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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
{% if widget.is_initial %}{{ widget.initial_text }}: <a href="{{ url }}">{{ widget.value }}</a>{% if not widget.required %} | ||
<input type="checkbox" name="{{ widget.checkbox_name }}" id="{{ widget.checkbox_id }}"{% if widget.attrs.disabled %} disabled{% endif %}> | ||
<label for="{{ widget.checkbox_id }}">{{ widget.clear_checkbox_label }}</label>{% endif %}<br> | ||
<span for="{{ widget.checkbox_id }}">{{ widget.clear_checkbox_label }}</span>{% endif %}<br> | ||
{{ widget.input_text }}:{% endif %} | ||
<input type="{{ widget.type }}" name="{{ widget.name }}"{% include "django/forms/widgets/attrs.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
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