File tree Expand file tree Collapse file tree 4 files changed +33
-3
lines changed Expand file tree Collapse file tree 4 files changed +33
-3
lines changed Original file line number Diff line number Diff line change @@ -216,6 +216,9 @@ def login():
216216 if current_user .is_authenticated :
217217 return redirect (target_url )
218218 form = LDAPLoginForm (meta = wft_locales ())
219+ form .logo = config .get ("logo_image_url" , {})
220+ form .background = config .get ("background_image_url" , {})
221+
219222 if form .validate_on_submit ():
220223 user = form .user
221224 # flask_login stores user in session
Original file line number Diff line number Diff line change 55* : focus {
66 outline : none;
77}
8- body {
8+ html , body {
99 font-family : Arial;
1010 background-color : # a0a0a0 ;
1111 padding : 50px ;
12+ margin : 0 ;
13+ padding : 0 ;
14+ height : 100% ;
1215}
16+
17+ .form-background {
18+ position : fixed;
19+ left : 0 ;
20+ right : 0 ;
21+ top : 0 ;
22+ bottom : 0 ;
23+ background-repeat : no-repeat;
24+ background-size : cover;
25+ background-position : center;
26+ }
27+
1328.login {
14- margin : 20 px auto;
29+ margin : 50 px auto;
1530 width : 300px ;
1631}
32+
1733.login-screen {
1834 background-color : # FFF ;
1935 padding : 20px ;
@@ -24,7 +40,12 @@ body {
2440 text-align : center;
2541 color : # 777 ;
2642}
27-
43+
44+ .app-logo {
45+ width : 220px ;
46+ height : 100px ;
47+ }
48+
2849.login-form {
2950 text-align : center;
3051}
Original file line number Diff line number Diff line change 44 < link rel ="stylesheet " href ="{{ url_for('static', filename='style.css') }} " type ="text/css ">
55 </ head >
66 < body >
7+ {% if form.background %}
8+ < div class ="form-background " style ="background-image: url('{{form.background}}'); ">
9+ {% endif %}
710 {% with messages = get_flashed_messages() + form.errors.get('csrf_token', []) %}
811 {% if messages %}
912 < ul >
Original file line number Diff line number Diff line change @@ -7,6 +7,9 @@ <h1>{{ i18n.t('auth.login_page_title') }}</h1>
77 < div class ="login ">
88 < div class ="login-screen ">
99 < div class ="app-title ">
10+ {% if form.logo %}
11+ < img class ="app-logo " src ="{{form.logo}} " alt ="logo " />
12+ {% endif %}
1013 < h1 > {{ i18n.t('auth.login_form_title') }}</ h1 >
1114 </ div >
1215
You can’t perform that action at this time.
0 commit comments