Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
bwinf
medal
Commits
c7df4d9b
Commit
c7df4d9b
authored
Oct 09, 2020
by
Robert Czechowski
Browse files
Template jwinf: Integrate oauth school selector into base template
parent
5ca561e2
Changes
4
Hide whitespace changes
Inline
Side-by-side
src/webfw_iron.rs
View file @
c7df4d9b
...
...
@@ -1238,6 +1238,9 @@ fn oauth_pms(req: &mut Request, oauth_provider: OauthProvider, school_id: Option
let
mut
data
=
json_val
::
Map
::
new
();
data
.insert
(
"schools"
.to_string
(),
to_json
(
&
school_infos
));
data
.insert
(
"query"
.to_string
(),
to_json
(
&
req
.url
.query
()
.unwrap_or
(
""
)));
data
.insert
(
"parent"
.to_string
(),
to_json
(
&
"base"
));
data
.insert
(
"no_login"
.to_string
(),
to_json
(
&
true
));
let
mut
resp
=
Response
::
new
();
resp
.set_mut
(
Template
::
new
(
&
"oauth_school_selector"
,
data
))
.set_mut
(
status
::
Ok
);
...
...
templates/jwinf/base.hbs
View file @
c7df4d9b
...
...
@@ -59,6 +59,8 @@
</div>
{{/if}}
{{else}}
{{#if
no_login
}}
{{else}}
{{#if
password_login
}}
<form
action=
"/login"
method=
"post"
class=
"columns blogin"
>
<div
class=
"column is-8"
><input
class=
"input is-small"
type=
"text"
name=
"username"
autofocus
placeholder=
"Benutzername"
style=
"width:50%"
><input
class=
"input is-small"
type=
"password"
name=
"password"
placeholder=
"Passwort"
style=
"width:50%"
></div>
...
...
@@ -81,6 +83,7 @@
</div>
{{/
each
}}
{{/if}}
{{/if}}
{{/if}}
</div>
</div>
...
...
templates/jwinf/oauth_school_selector.hbs
deleted
120000 → 0
View file @
5ca561e2
../default/oauth_school_selector.hbs
\ No newline at end of file
templates/jwinf/oauth_school_selector.hbs
0 → 100644
View file @
c7df4d9b
{{#
*
inline
"page"
}}
<div
class=
"columns"
>
<div
class=
"column"
>
<h1
class=
"title is-4"
>
Bitte zum Einloggen Schule auswählen
</h1>
<p>
<ul>
{{#
each
schools
}}
<li>
•
<a
href=
"
{{
this
.
0
}}
?
{{
..
/
query
}}
"
>
{{
this
.
1
}}
</a><br
/>
</li>
{{/
each
}}
<ul>
</p>
</div>
</div>
<div
class=
"columns"
>
<div
class=
"column"
>
<p>
Wenn die gewünschte Schule hier nicht aufgeführt ist, bitte die Schule unter
<a
href=
"https://login.bwinf.de"
>
login.bwinf.de
</a>
eintragen und ein Dokument hochladen, das die Zugehörigkeit zu Ihrer Schule bestätigt.
<p>
</div>
</div>
{{/
inline
}}
{{~>
(
parent
)
~}}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment