|
|
@@ -33,151 +33,132 @@
|
|
|
${ commonheader(_("Welcome to Hue"), "login", user, request, "50px", True, True) | n,unicode }
|
|
|
|
|
|
<link rel="stylesheet" href="${ static('desktop/css/login.css') }">
|
|
|
-<link rel="stylesheet" href="${ static('desktop/css/login4.css') }">
|
|
|
-
|
|
|
-<style type="text/css">
|
|
|
- body {
|
|
|
- background-color: #F8F8F8;
|
|
|
- padding-top: 150px;
|
|
|
- }
|
|
|
-
|
|
|
- .footer {
|
|
|
- position: fixed;
|
|
|
- bottom: 0;
|
|
|
- background-color: #0B7FAD;
|
|
|
- height: 6px;
|
|
|
- width: 100%;
|
|
|
- }
|
|
|
-
|
|
|
- select {
|
|
|
- width: 100%;
|
|
|
- }
|
|
|
-</style>
|
|
|
-
|
|
|
-<div class="login-container">
|
|
|
-
|
|
|
- <form method="POST" action="${action}" autocomplete="off">
|
|
|
- ${ csrf_token(request) | n,unicode }
|
|
|
-
|
|
|
- <div class="logo">
|
|
|
- <a href="https://gethue.com">
|
|
|
- <svg style="height: 80px; width: 200px;"><use xlink:href="#hi-logo"></use></svg>
|
|
|
- </a>
|
|
|
- </div>
|
|
|
|
|
|
- <h3>Query. Explore. Repeat.</h3>
|
|
|
+<div class="login-page">
|
|
|
+ <AppBanner data-reactcomponent='AppBanner'></AppBanner>
|
|
|
+ <div class="login-container">
|
|
|
|
|
|
- % if 'OIDCBackend' in backend_names:
|
|
|
- <button title="${ _('Single Sign-on') }" class="btn btn-primary" onclick="location.href='/oidc/authenticate/'">${ _('Single Sign-on') }</button>
|
|
|
- <hr class="separator-line"/>
|
|
|
- % endif
|
|
|
+ <form method="POST" action="${action}" autocomplete="off">
|
|
|
+ ${ csrf_token(request) | n,unicode }
|
|
|
|
|
|
- % if first_login_ever:
|
|
|
- <div class="alert alert-info center">
|
|
|
- ${ _('Since this is your first time logging in, pick any username and password. Be sure to remember these, as') }
|
|
|
- <strong>${ _('they will become your Hue superuser credentials.') }</strong>
|
|
|
- % if is_password_policy_enabled():
|
|
|
- <p>${ get_password_hint() }</p>
|
|
|
- % endif
|
|
|
+ <div class="logo">
|
|
|
+ <a href="https://gethue.com">
|
|
|
+ <svg style="height: 80px; width: 200px;"><use xlink:href="#hi-logo"></use></svg>
|
|
|
+ </a>
|
|
|
</div>
|
|
|
- % endif
|
|
|
|
|
|
- % if ENABLE_ORGANIZATIONS.get():
|
|
|
- <div class="text-input
|
|
|
- % if form['email'].errors or (not form['email'].errors and not form['email'].errors and login_errors):
|
|
|
- error
|
|
|
+ <h3>Query. Explore. Repeat.</h3>
|
|
|
+
|
|
|
+ % if 'OIDCBackend' in backend_names:
|
|
|
+ <button title="${ _('Single Sign-on') }" class="btn btn-primary" onclick="location.href='/oidc/authenticate/'">${ _('Single Sign-on') }</button>
|
|
|
+ <hr class="separator-line"/>
|
|
|
+ % endif
|
|
|
+
|
|
|
+ % if first_login_ever:
|
|
|
+ <div class="alert alert-info center">
|
|
|
+ ${ _('Since this is your first time logging in, pick any username and password. Be sure to remember these, as') }
|
|
|
+ <strong>${ _('they will become your Hue superuser credentials.') }</strong>
|
|
|
+ % if is_password_policy_enabled():
|
|
|
+ <p>${ get_password_hint() }</p>
|
|
|
+ % endif
|
|
|
+ </div>
|
|
|
+ % endif
|
|
|
+
|
|
|
+ % if ENABLE_ORGANIZATIONS.get():
|
|
|
+ <div class="text-input
|
|
|
+ % if form['email'].errors or (not form['email'].errors and not form['email'].errors and login_errors):
|
|
|
+ error
|
|
|
+ % endif
|
|
|
+ ">
|
|
|
+ ${ form['email'] | n,unicode }
|
|
|
+ </div>
|
|
|
+
|
|
|
+ ${ form['email'].errors | n,unicode }
|
|
|
+ % else:
|
|
|
+ % if 'username' in form.fields:
|
|
|
+ <div class="text-input
|
|
|
+ % if backend_names == ['OAuthBackend']:
|
|
|
+ hide
|
|
|
+ % endif
|
|
|
+ % if form['username'].errors or (login_errors and not form['username'].errors and not form['password'].errors):
|
|
|
+ error
|
|
|
+ % endif
|
|
|
+ ">
|
|
|
+ ${ form['username'] | n,unicode }
|
|
|
+ </div>
|
|
|
+
|
|
|
+ ${ form['username'].errors | n,unicode }
|
|
|
% endif
|
|
|
- ">
|
|
|
- ${ form['email'] | n,unicode }
|
|
|
- </div>
|
|
|
+ % endif
|
|
|
|
|
|
- ${ form['email'].errors | n,unicode }
|
|
|
- % else:
|
|
|
- % if 'username' in form.fields:
|
|
|
+ % if 'password' in form.fields:
|
|
|
<div class="text-input
|
|
|
- % if backend_names == ['OAuthBackend']:
|
|
|
+ % if 'AllowAllBackend' in backend_names or backend_names == ['OAuthBackend']:
|
|
|
hide
|
|
|
% endif
|
|
|
- % if form['username'].errors or (login_errors and not form['username'].errors and not form['password'].errors):
|
|
|
+ % if form['password'].errors or (login_errors and 'username' in form.fields and not form['username'].errors and not form['password'].errors):
|
|
|
error
|
|
|
% endif
|
|
|
">
|
|
|
- ${ form['username'] | n,unicode }
|
|
|
+ ${ form['password'] | n,unicode }
|
|
|
</div>
|
|
|
|
|
|
- ${ form['username'].errors | n,unicode }
|
|
|
+ ${ form['password'].errors | n,unicode }
|
|
|
% endif
|
|
|
- % endif
|
|
|
|
|
|
- % if 'password' in form.fields:
|
|
|
- <div class="text-input
|
|
|
- % if 'AllowAllBackend' in backend_names or backend_names == ['OAuthBackend']:
|
|
|
- hide
|
|
|
+ % if active_directory:
|
|
|
+ <div
|
|
|
+ %if 'server' in form.fields and len(form.fields['server'].choices) == 1:
|
|
|
+ class="hide"
|
|
|
+ %endif
|
|
|
+ >
|
|
|
+ % if 'server' in form.fields:
|
|
|
+ ${ form['server'] | n,unicode }
|
|
|
% endif
|
|
|
- % if form['password'].errors or (login_errors and 'username' in form.fields and not form['username'].errors and not form['password'].errors):
|
|
|
- error
|
|
|
- % endif
|
|
|
- ">
|
|
|
- ${ form['password'] | n,unicode }
|
|
|
</div>
|
|
|
-
|
|
|
- ${ form['password'].errors | n,unicode }
|
|
|
- % endif
|
|
|
-
|
|
|
- % if active_directory:
|
|
|
- <div
|
|
|
- %if 'server' in form.fields and len(form.fields['server'].choices) == 1:
|
|
|
- class="hide"
|
|
|
- %endif
|
|
|
- >
|
|
|
- % if 'server' in form.fields:
|
|
|
- ${ form['server'] | n,unicode }
|
|
|
% endif
|
|
|
- </div>
|
|
|
- % endif
|
|
|
|
|
|
- % if 'ImpersonationBackend' in backend_names:
|
|
|
- <div class="text-input">
|
|
|
- ${ form['login_as'] | n,unicode }
|
|
|
- </div>
|
|
|
- % endif
|
|
|
-
|
|
|
- % if login_errors and 'username' in form.fields and not form['username'].errors and not form['password'].errors:
|
|
|
- % if form.errors:
|
|
|
- % for error in form.errors:
|
|
|
- ${ form.errors[error] | unicode,n }
|
|
|
- % endfor
|
|
|
+ % if 'ImpersonationBackend' in backend_names:
|
|
|
+ <div class="text-input">
|
|
|
+ ${ form['login_as'] | n,unicode }
|
|
|
+ </div>
|
|
|
% endif
|
|
|
- % endif
|
|
|
|
|
|
- % if 'username' in form.fields or 'email' in form.fields:
|
|
|
- % if first_login_ever:
|
|
|
- <input type="submit" class="btn btn-primary" value="${ _('Create Account') }"/>
|
|
|
- % else:
|
|
|
- <input type="submit" class="btn btn-primary" value="${ _('Sign In') }"/>
|
|
|
+ % if login_errors and 'username' in form.fields and not form['username'].errors and not form['password'].errors:
|
|
|
+ % if form.errors:
|
|
|
+ % for error in form.errors:
|
|
|
+ ${ form.errors[error] | unicode,n }
|
|
|
+ % endfor
|
|
|
+ % endif
|
|
|
% endif
|
|
|
- % if ENABLE_ORGANIZATIONS.get():
|
|
|
- <input type="submit" class="btn btn-primary" value="${ _('Create Account') }"/>
|
|
|
+
|
|
|
+ % if 'username' in form.fields or 'email' in form.fields:
|
|
|
+ % if first_login_ever:
|
|
|
+ <input type="submit" class="btn btn-primary" value="${ _('Create Account') }"/>
|
|
|
+ % else:
|
|
|
+ <input type="submit" class="btn btn-primary" value="${ _('Sign In') }"/>
|
|
|
+ % endif
|
|
|
+ % if ENABLE_ORGANIZATIONS.get():
|
|
|
+ <input type="submit" class="btn btn-primary" value="${ _('Create Account') }"/>
|
|
|
+ % endif
|
|
|
% endif
|
|
|
- % endif
|
|
|
|
|
|
- <input type="hidden" name="next" value="${next}"/>
|
|
|
+ <input type="hidden" name="next" value="${next}"/>
|
|
|
|
|
|
- </form>
|
|
|
+ </form>
|
|
|
|
|
|
- % if CUSTOM.LOGIN_SPLASH_HTML.get():
|
|
|
- <div id="login-splash">
|
|
|
- ${ CUSTOM.LOGIN_SPLASH_HTML.get() | n,unicode }
|
|
|
+ % if CUSTOM.LOGIN_SPLASH_HTML.get():
|
|
|
+ <div id="login-splash">
|
|
|
+ ${ CUSTOM.LOGIN_SPLASH_HTML.get() | n,unicode }
|
|
|
+ </div>
|
|
|
+ % endif
|
|
|
</div>
|
|
|
- % endif
|
|
|
-</div>
|
|
|
|
|
|
-<div id="trademark" class="trademark center muted">
|
|
|
- <trademark-banner>
|
|
|
- % if CUSTOM.LOGO_SVG.get():
|
|
|
+ % if CUSTOM.LOGO_SVG.get():
|
|
|
+ <div id="trademark" class="trademark center muted">
|
|
|
${ _('Powered by') } <img src="${ static('desktop/art/hue-login-logo.png') }" width="40" style="vertical-align: middle" alt="${ _('Hue logo') }"> -
|
|
|
- % endif
|
|
|
- </trademark-banner>
|
|
|
+ </div>
|
|
|
+ % endif
|
|
|
</div>
|
|
|
|
|
|
<script>
|