Skip to content

Commit

Permalink
templates/account: remove padding overwrite for form-check and unify …
Browse files Browse the repository at this point in the history
…a4-forms styles
  • Loading branch information
hom3mad3 committed Nov 11, 2024
1 parent 206239d commit 1f42996
Show file tree
Hide file tree
Showing 7 changed files with 34 additions and 20 deletions.
6 changes: 6 additions & 0 deletions changelog/_8425.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
## Added
- `.narrow-wrapper__checkbox` to `narrow-wrapper.scss` to target `form-check` padding handling

### Removed
- a4-select.scss and renamed to a4-forms.scss
- `form-check` padding overwrite in `form.scss`
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@
}
}

.narrow-wrapper__checkbox {
.form-check {
padding-left: 0;
}
}

.narrow-wrapper__footer {
padding: 1em 0 3em;

Expand Down
2 changes: 1 addition & 1 deletion meinberlin/assets/scss/style_user_facing.scss
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@
@import "components_user_facing/adhocracy4/a4-comments";
@import "components_user_facing/adhocracy4/a4-control-bar-search";
@import "components_user_facing/adhocracy4/a4-follow";
@import "components_user_facing/adhocracy4/a4-forms";
@import "components_user_facing/adhocracy4/a4-modal";
@import "components_user_facing/adhocracy4/a4-select";
@import "components_user_facing/adhocracy4/a4-poll";

// ck-editor
Expand Down
1 change: 0 additions & 1 deletion meinberlin/assets/scss/styles_user_facing/_form.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ button {
cursor: pointer;
}

.form-check,
.errorlist {
padding-left: 0;
}
Expand Down
3 changes: 2 additions & 1 deletion meinberlin/templates/account/login.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ <h1>{% translate "Login" %}</h1>

{% include "meinberlin_contrib/includes/form_field.html" with field=form.login %}
{% include "meinberlin_contrib/includes/form_field.html" with field=form.password %}
{% include "meinberlin_contrib/includes/form_checkbox_field.html" with field=form.remember %}

{% include "meinberlin_contrib/includes/form_checkbox_field.html" with field=form.remember add_class="narrow-wrapper__checkbox" %}

{% if redirect_field_value %}
<input type="hidden" name="{{ redirect_field_name }}" value="{{ redirect_field_value }}"/>
Expand Down
36 changes: 19 additions & 17 deletions meinberlin/templates/account/signup.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,24 +26,26 @@ <h1>{% translate "Register" %}</h1>
{% include 'meinberlin_contrib/includes/form_field.html' with field=form.password1 %}
{% include 'meinberlin_contrib/includes/form_field.html' with field=form.password2 %}

{% include 'meinberlin_contrib/includes/form_checkbox_field.html' with field=form.get_notifications %}
{% include 'meinberlin_contrib/includes/form_checkbox_field.html' with field=form.get_newsletters %}
{% include 'meinberlin_contrib/includes/form_checkbox_field.html' with field=form.get_notifications add_class="narrow-wrapper__checkbox" %}
{% include 'meinberlin_contrib/includes/form_checkbox_field.html' with field=form.get_newsletters add_class="narrow-wrapper__checkbox" %}

<div class="form-check">
<label class="form-check-label">
{{ form.terms_of_use|add_error_attr:"aria-invalid:true" }}
{% blocktranslate with terms_of_use_url="/terms-of-use" privacy_policy="/datenschutz" %}I hereby expressly consent to the collection and processing (storage) of my data and expressly consent to the processing and publication of my ideas, comments and contributions as described in the privacy policy. I also confirm that I have read and accept the
<a href="{{ terms_of_use_url }}" target="_blank">terms of use</a>
and the
<a href="{{ privacy_policy }}" target="_blank">privacy policy</a>.{% endblocktranslate %}
</label>
{% if form.terms_of_use.errors %}
<ul class="errorlist" aria-live="assertive" aria-atomic="true">
{% for error in form.terms_of_use.errors %}
<li>{{ error|escape }}</li>
{% endfor %}
</ul>
{% endif %}
<div class="narrow-wrapper__checkbox">
<div class="form-check">
<label class="form-check-label">
{{ form.terms_of_use|add_error_attr:"aria-invalid:true" }}
{% blocktranslate with terms_of_use_url="/terms-of-use" privacy_policy="/datenschutz" %}I hereby expressly consent to the collection and processing (storage) of my data and expressly consent to the processing and publication of my ideas, comments and contributions as described in the privacy policy. I also confirm that I have read and accept the
<a href="{{ terms_of_use_url }}" target="_blank">terms of use</a>
and the
<a href="{{ privacy_policy }}" target="_blank">privacy policy</a>.{% endblocktranslate %}
</label>
{% if form.terms_of_use.errors %}
<ul class="errorlist" aria-live="assertive" aria-atomic="true">
{% for error in form.terms_of_use.errors %}
<li>{{ error|escape }}</li>
{% endfor %}
</ul>
{% endif %}
</div>
</div>

{% if form.captcha %}
Expand Down

0 comments on commit 1f42996

Please sign in to comment.