Commit c7df4d9b authored by Robert Czechowski's avatar Robert Czechowski

Template jwinf: Integrate oauth school selector into base template

parent 5ca561e2
......@@ -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);
......
......@@ -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>
......
../default/oauth_school_selector.hbs
\ No newline at end of file
{{#*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 />&nbsp;</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)~}}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment