{% extends '@PlatformSecurity/Login/base2.html.twig' %}
{% set titles = { 0: { title: 'SchoolStatus Sites & Apps', rank: -100 }, 1: { title: 'Login', rank: 100 } } %}
{% set body_attrs = { 0: { action: 'append', arg1: 'class', arg2: 'page-login page-login--main'} } %}
{% block header %}
<p class="login-panel__logo">
<a href="https://www.schoolnow.com" target="_blank">
<img src="/ui2022/images/logo_app_stack_black.png" alt="SchoolStatus Sites & Apps" style="width: 165px;" />
</a>
</p>
<h2 class="login-panel__heading">{{ tenant.name }}</h2>
{% endblock %}
{% block body %}
{% if form is not empty %}
<div class="login-panel__form">
{{ form_start(form, {
attr: {
autocomplete: 'on'
}
}) }}
{% if form.vars.errors|length > 0 %}
<div class="alert alert-danger">
{% for error in form.vars.errors %}
<p>{{ error.message }}</p>
{% endfor %}
</div>
{% endif %}
<div class="form-group">
{{ form_label(form.username) }}
{{ form_widget(form.username, {
attr: {
class: 'form-control',
placeholder: 'Email'
}
}) }}
</div>
<div class="form-group">
{{ form_label(form.password) }}
{{ form_widget(form.password, {
attr: {
class: 'form-control',
placeholder: 'Password'
}
}) }}
</div>
<div class="form-group login-panel__form-actions">
<input type="submit" class="btn btn-lg btn-success btn-block" value="Sign in with email" />
</div>
{{ form_end(form) }}
<p class="login-panel__forgot-password">
<a href="{{ path(routes.reset_password) }}">Forget your password?</a>
</p>
</div>
{% endif %}
{% if form is not empty and providers is not empty %}
<div class="login-panel__separator">or</div>
{% endif %}
{% if providers is not empty %}
<div class="login-panel__sso">
{% if errors|length > 0 %}
<div class="alert alert-danger">
{% for error in errors %}
<p>{{ error }}</p>
{% endfor %}
</div>
{% endif %}
{% for provider in providers %}
<div class="login-panel__sso-grp">
<a class="btn-sso btn-sso-{{ provider.id }}" href="{{- path('app.platform.security.sso.start', {
id: provider.id,
redirect: redirect
}) -}}">Sign in with {{ 'app.platform.security.oauth.providers.%s.nickname'|format(provider.id)|trans }}</a>
</div>
{% endfor %}
</div>
{% endif %}
{% endblock %}