-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
a4-polls: create info box for unregistered users
- Loading branch information
Showing
7 changed files
with
60 additions
and
16 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
.info-box { | ||
background-color: $brand-primary-tint; | ||
padding: $spacer; | ||
margin: $spacer 0; | ||
display: flex; | ||
flex-direction: column; | ||
|
||
&__content { | ||
display: flex; | ||
align-items: first baseline; | ||
gap: $spacer; // Space between icon and text | ||
|
||
p { | ||
margin-bottom: 0; | ||
} | ||
} | ||
|
||
&__text { | ||
flex-grow: 1; | ||
} | ||
} |
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
13 changes: 13 additions & 0 deletions
13
adhocracy-plus/templates/a4modules/includes/module_description.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,13 @@ | ||
{% block module_description %} | ||
{% if module.phases.first.type != 'a4_candy_interactive_events:issue' %} | ||
<section class="row"> | ||
<div class="col-md-8 offset-md-2 mb-3"> | ||
<header> | ||
<h2>{{ module.name }}</h2> | ||
</header> | ||
{% include "a4polls/includes/unregistered-users-info-box.html" %} | ||
<p>{{ module.description }}</p> | ||
</div> | ||
</section> | ||
{% endif %} | ||
{% endblock module_description %} |
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
20 changes: 20 additions & 0 deletions
20
adhocracy-plus/templates/a4polls/includes/unregistered-users-info-box.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,20 @@ | ||
{% load i18n static settings %} | ||
{% settings_value "APLUS_MANUAL_URL" as manual_url %} | ||
|
||
{% if poll.allow_unregistered_users %} | ||
<aside class="info-box" aria-labelledby="info-box-title"> | ||
<h3 class="visually-hidden" id="info-box-title">{% translate "Poll Participation Info" %}</h3> | ||
<div class="info-box__content"> | ||
<i class="far fa-lightbulb" aria-hidden="true"></i> | ||
<div class="info-box__text"> | ||
{% blocktrans %} | ||
<p>You can now participate in this poll even if you're not logged in.</p> | ||
<p><strong>Unregistered users can't edit their votes once submitted.</strong></p> | ||
{% endblocktrans %} | ||
{% if manual_url %} | ||
<a href="{{ manual_url }}/{{ LANGUAGE_CODE }}:quickstart:faq:registration:poll" rel="nofollow noopener noreferrer external" target="_blank" class="info-box__link" aria-label="Learn more about the voting options and rules">{% translate "Learn more about voting options." %}</a> | ||
{% endif %} | ||
</div> | ||
</div> | ||
</aside> | ||
{% endif %} |
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,3 @@ | ||
### Added | ||
- info-box on poll for unregistered users | ||
- module_description snippet with fixed semantics |