2019-12-02 03:32:03 +00:00
<!DOCTYPE html>
< html >
2023-02-20 17:08:32 +00:00
< head >
2023-02-18 16:04:14 +00:00
< meta charset = "utf-8" >
< meta http-equiv = "X-UA-Compatible" content = "IE=edge" >
< title > Log In - {{ SITE_NAME }}< / title >
< link rel = "icon" href = "{{ url_for('static', filename='img/favicon.png') }}" >
<!-- Tell the browser to be responsive to screen width -->
< meta content = "width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name = "viewport" >
< META HTTP-EQUIV = "REFRESH" CONTENT = "{{ 60 * SETTING.get('session_timeout') }}" >
{% assets "css_login" -%}
2023-02-20 17:08:32 +00:00
< link rel = "stylesheet" href = "{{ ASSET_URL }}" >
2023-02-18 16:04:14 +00:00
{%- endassets %}
{% if SETTING.get('custom_css') %}
2023-02-20 17:08:32 +00:00
< link rel = "stylesheet" href = "/static/custom/{{ SETTING.get('custom_css') }}" >
2023-02-18 16:04:14 +00:00
{% endif %}
2023-02-20 17:08:32 +00:00
< / head >
< body class = "hold-transition login-page" >
< div class = "login-box" >
< div class = "card card-outline card-primary shadow" >
2023-02-18 16:04:14 +00:00
< div class = "card-header text-center" >
2023-02-20 17:08:32 +00:00
< a href = "{{ url_for('index.index') }}" class = "h3" >
{% if SETTING.get('site_name') %}
{{ SITE_NAME }}
{% else %}
< b > PowerDNS< / b > -Admin
{% endif %}
< / a >
2023-02-18 14:04:37 +00:00
< / div >
2023-02-18 16:04:14 +00:00
< div class = "card-body login-card-body" >
2023-02-20 17:08:32 +00:00
{% if error %}
< div class = "alert alert-danger alert-dismissible" >
< button type = "button" class = "close" data-dismiss = "alert" aria-hidden = "true" > × < / button >
{{ error }}
2023-02-18 16:04:14 +00:00
< / div >
2023-02-20 17:08:32 +00:00
{% endif %}
{% if SETTING.get('ldap_enabled') or SETTING.get('local_db_enabled') %}
< form action = "" method = "post" data-toggle = "validator" >
< input type = "hidden" name = "_csrf_token" value = "{{ csrf_token() }}" >
< div class = "form-group" >
< input type = "text" class = "form-control" placeholder = "Username" name = "username"
data-error="Please input your username" required
{% if username %}value="{{ username }}" {% endif %}>
< span class = "help-block with-errors" > < / span >
< / div >
< div class = "form-group" >
< input type = "password" class = "form-control" placeholder = "Password" name = "password"
data-error="Please input your password" required
{% if password %}value="{{ password }}" {% endif %}>
< span class = "help-block with-errors" > < / span >
< / div >
{% if SETTING.get('otp_field_enabled') %}
< div class = "form-group" >
< input type = "otptoken" class = "form-control" placeholder = "OTP Token" name = "otptoken"
autocomplete="off">
< / div >
{% endif %}
{% if SETTING.get('ldap_enabled') and SETTING.get('local_db_enabled') %}
< div class = "form-group" >
< select class = "form-control" name = "auth_method" >
< option value = "LOCAL" >
LOCAL Authentication
< / option >
{% if SETTING.get('login_ldap_first') %}
< option value = "LDAP" selected = "selected" >
LDAP Authentication
< / option >
{% else %}
< option value = "LDAP" >
LDAP Authentication
< / option >
{% endif %}
< / select >
< / div >
{% elif SETTING.get('ldap_enabled') and not SETTING.get('local_db_enabled') %}
< div class = "form-group" >
< input type = "hidden" name = "auth_method" value = "LDAP" >
< / div >
{% elif SETTING.get('local_db_enabled') and not SETTING.get('ldap_enabled') %}
< div class = "form-group" >
< input type = "hidden" name = "auth_method" value = "LOCAL" >
< / div >
2023-02-18 16:04:14 +00:00
{% else %}
2023-02-20 17:08:32 +00:00
< div class = "form-group" >
< input type = "hidden" name = "auth_method" value = "LOCAL" >
< / div >
{% endif %}
< div class = "row" >
< div class = "col-8" >
< div class = "icheck-primary" >
< input type = "checkbox" id = "remember" >
< label for = "remember" >
Remember Me
< / label >
< / div >
< / div >
< div class = "col-4" >
< button type = "submit" class = "btn btn-primary btn-block" > Sign In< / button >
< / div >
< / div >
< / form >
{% endif %}
{% if SETTING.get('google_oauth_enabled') or SETTING.get('github_oauth_enabled') or SETTING.get('oidc_oauth_enabled') or SETTING.get('azure_oauth_enabled') %}
< div class = "social-auth-links text-center" >
{% if SETTING.get('ldap_enabled') or SETTING.get('local_db_enabled') %}
< p > - OR -< / p >
{% endif %}
{% if SETTING.get('oidc_oauth_enabled') %}
< a href = "{{ url_for('index.oidc_login') }}"
class="btn btn-block btn-social btn-openid btn-flat">
< i class = "fa-brands fa-openid" > < / i >
Sign in using OpenID Connect
< / a >
{% endif %}
{% if SETTING.get('github_oauth_enabled') %}
< a href = "{{ url_for('index.github_login') }}"
class="btn btn-block btn-social btn-github btn-flat">
< i class = "fa-brands fa-github" > < / i >
Sign in using Github
< / a >
{% endif %}
{% if SETTING.get('google_oauth_enabled') %}
< a href = "{{ url_for('index.google_login') }}"
class="btn btn-block btn-social btn-google btn-flat">
< i class = "fa-brands fa-google" > < / i >
Sign in using Google
< / a >
{% endif %}
{% if SETTING.get('azure_oauth_enabled') %}
< a href = "{{ url_for('index.azure_login') }}"
class="btn btn-block btn-social btn-microsoft btn-flat">
< i class = "fa-brands fa-windows" > < / i >
Sign in using Microsoft Azure
< / a >
2023-02-18 16:04:14 +00:00
{% endif %}
< / div >
2023-02-20 17:08:32 +00:00
{% endif %}
{% if saml_enabled %}
< a href = "{{ url_for('index.saml_login') }}" >
SAML login
2023-02-18 16:04:14 +00:00
< / a >
2023-02-20 17:08:32 +00:00
{% endif %}
{% if SETTING.get('signup_enabled') %}
< br >
< a href = "{{ url_for('index.register') }}" class = "text-center" >
Create an account
2023-02-18 16:04:14 +00:00
< / a >
2023-02-20 17:08:32 +00:00
{% if SETTING.get('verify_user_email') %}
< br / >
< a href = "{{ url_for('index.resend_confirmation_email') }}" class = "text-center" >
Resend confirmation email
< / a >
{% endif %}
2023-02-18 16:04:14 +00:00
{% endif %}
2019-12-02 03:32:03 +00:00
< / div >
2023-02-20 17:08:32 +00:00
<!-- /.card - body -->
2019-12-02 03:32:03 +00:00
< / div >
2023-02-20 17:08:32 +00:00
<!-- /.card -->
< / div >
<!-- /.login - box -->
< div class = "text-center pt-3" >
< p > Powered by < a href = "https://powerdnsadmin.org" target = "_blank" > PowerDNS-Admin< / a > < / p >
< / div >
{% assets "js_login" -%}
< script type = "text/javascript" src = "{{ ASSET_URL }}" > < / script >
{%- endassets %}
{% assets "js_validation" -%}
< script type = "text/javascript" src = "{{ ASSET_URL }}" > < / script >
{%- endassets %}
< script >
$(function () {
2023-02-18 16:04:14 +00:00
$('input').iCheck({
2023-02-20 17:08:32 +00:00
checkboxClass: 'icheckbox_square-blue',
radioClass: 'iradio_square-blue',
increaseArea: '20%' // optional
2023-02-18 16:04:14 +00:00
});
2023-02-20 17:08:32 +00:00
});
< / script >
< / body >
2019-12-02 03:32:03 +00:00
< / html >