Skip to content

Commit

Permalink
allowed skautis login for Navigamus event
Browse files Browse the repository at this point in the history
  • Loading branch information
Lung committed Nov 9, 2024
1 parent caf17bc commit efc283f
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 2 deletions.
26 changes: 26 additions & 0 deletions public/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -456,3 +456,29 @@ tr:nth-child(even) {
.m-0 {
margin: 0;
}

.text-inside-line {
overflow: hidden;
text-align: center;
}

.text-inside-line::before,
.text-inside-line::after {
background-color: var(--color-main);
content: "";
display: inline-block;
height: 1px;
position: relative;
vertical-align: middle;
width: 40%;
}

.text-inside-line::before {
right: 0.5em;
margin-left: -50%;
}

.text-inside-line::after {
left: 0.5em;
margin-right: -50%;
}
5 changes: 5 additions & 0 deletions src/Event/EventType/Navigamus/EventTypeNavigamus.php
Original file line number Diff line number Diff line change
Expand Up @@ -100,4 +100,9 @@ public function getLanguages(): array
'cs' => '🇨🇿 Česky',
];
}

public function isLoginSkautisAllowed(): bool
{
return true;
}
}
3 changes: 2 additions & 1 deletion src/Templates/cs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,7 @@ chooseRole:
login:
registrationFor: "Registrace pro "
email: "E-mail"
or: "nebo"
sendMeEmail: "Odešli přihlašovací mail"
howItWorks: "Jak přihlašování funguje?"
submitEmail: "Zadej svůj e-mail"
Expand All @@ -227,7 +228,7 @@ login:
waitForApproval: "Počkej na schválení a informace k platbě"
pay: "Zaplať a jeď!"
more: "Více informací o registraci"
skautis: "Přihlásit se přes skautIS"
skautis: "Přihlásit se přes skautIS ⚜️"
email:
layout:
welcome: "Ahoj!"
Expand Down
1 change: 1 addition & 0 deletions src/Templates/en.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,7 @@ chooseRole:
login:
registrationFor: "Registration for "
email: "email"
or: "or"
sendMeEmail: "Send me an email to register"
howItWorks: "How does the registration system work?"
submitEmail: "Submit your email"
Expand Down
1 change: 1 addition & 0 deletions src/Templates/sk.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,7 @@ chooseRole:
login:
registrationFor: "Registrácia na "
email: "E-mail"
or: "nebo"
sendMeEmail: "Pošli mi prihlasovací link"
howItWorks: "Ako funguje registračný systém?"
submitEmail: "Zadaj svoj mail"
Expand Down
6 changes: 5 additions & 1 deletion src/Templates/translatable/kissj/login.twig
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@
<div class="card registration-theme">
<h2>{% trans %}login.registrationFor{% endtrans %}{{ event.readableName }}</h2>
{% if event.eventType.isLoginSkautisAllowed %}
<a href="{{ skautisLoginUri }}" class="btn">{% trans %}login.skautis{% endtrans %}</a><br>
<a href="{{ skautisLoginUri }}" class="btn">{% trans %}login.skautis{% endtrans %}</a>
{% endif %}
{% if event.eventType.isLoginEmailAllowed and event.eventType.isLoginSkautisAllowed %}
<p class="text-inside-line">{% trans %}login.or{% endtrans %}</p>
{% endif %}
{% if event.eventType.isLoginEmailAllowed %}
<form action="{{ url_for('sendLoginEmail', {'eventSlug': event.slug}) }}" method="post">
Expand All @@ -22,6 +25,7 @@
<input type="submit" value="{% trans %}login.sendMeEmail{% endtrans %}" class="btn form-wide"/>
</form>
{% endif %}
<br/>
</div>
<div class="card approved-theme text-muted">
<h2>{% trans %}login.howItWorks{% endtrans %}</h2>
Expand Down

0 comments on commit efc283f

Please sign in to comment.