|
24 | 24 | * canloginasguest - Is guest login allowed?,
|
25 | 25 | * canloginbyemail - Is login by email allowed?,
|
26 | 26 | * cansignup - Signup allowed?,
|
| 27 | + * showloginform - Hide the standard login form if it not necessary (only OAuth2 for example) |
27 | 28 | * cookieshelpicon - cookies help icon details
|
28 | 29 | * error - Any errors in the form?,
|
29 | 30 | * info - Info notification to display,
|
|
47 | 48 | "canloginasguest": "1",
|
48 | 49 | "canloginbyemail": false,
|
49 | 50 | "cansignup": true,
|
| 51 | + "showloginform": true, |
50 | 52 | "cookieshelpicon": {
|
51 | 53 | "heading": "Cookies must be enabled in your browser",
|
52 | 54 | "text": "<div class=\"no-overflow\">Two cookies are used on this site. Both died..</div>",
|
|
123 | 125 | {{#cansignup}}
|
124 | 126 | <a href="{{signupurl}}" class="sr-only">{{#str}} tocreatenewaccount {{/str}}</a>
|
125 | 127 | {{/cansignup}}
|
126 |
| - <form class="login-form" action="{{loginurl}}" method="post" id="login"> |
127 |
| - <input id="anchor" type="hidden" name="anchor" value=""> |
128 |
| - <script>document.getElementById('anchor').value = location.hash;</script> |
129 |
| - <input type="hidden" name="logintoken" value="{{logintoken}}"> |
130 |
| - <div class="login-form-username mb-3"> |
131 |
| - <label for="username" class="sr-only"> |
132 |
| - {{^canloginbyemail}} |
133 |
| - {{#str}} username {{/str}} |
134 |
| - {{/canloginbyemail}} |
135 |
| - {{#canloginbyemail}} |
136 |
| - {{#str}} usernameemail {{/str}} |
137 |
| - {{/canloginbyemail}} |
138 |
| - </label> |
139 |
| - <input type="text" name="username" id="username" {{! |
140 |
| - !}}class="form-control form-control-lg" {{! |
141 |
| - !}}value="{{username}}" {{! |
142 |
| - !}}placeholder="{{^canloginbyemail}}{{#cleanstr}}username{{/cleanstr}}{{/canloginbyemail}}{{! |
143 |
| - !}}{{#canloginbyemail}}{{#cleanstr}}usernameemail{{/cleanstr}}{{/canloginbyemail}}" {{! |
144 |
| - !}}autocomplete="username"> |
145 |
| - </div> |
146 |
| - <div class="login-form-password mb-3"> |
147 |
| - <label for="password" class="sr-only">{{#str}} password {{/str}}</label> |
148 |
| - <input type="password" name="password" id="password" value="" {{! |
149 |
| - !}}class="form-control form-control-lg" {{! |
150 |
| - !}}placeholder="{{#cleanstr}}password{{/cleanstr}}" {{! |
151 |
| - !}}autocomplete="current-password"> |
152 |
| - </div> |
153 |
| - {{#recaptcha}} |
154 |
| - <div class="login-form-recaptcha mb-3"> |
155 |
| - {{{recaptcha}}} |
| 128 | + {{#showloginform}} |
| 129 | + <form class="login-form" action="{{loginurl}}" method="post" id="login"> |
| 130 | + <input id="anchor" type="hidden" name="anchor" value=""> |
| 131 | + <script>document.getElementById('anchor').value = location.hash;</script> |
| 132 | + <input type="hidden" name="logintoken" value="{{logintoken}}"> |
| 133 | + <div class="login-form-username mb-3"> |
| 134 | + <label for="username" class="sr-only"> |
| 135 | + {{^canloginbyemail}} |
| 136 | + {{#str}} username {{/str}} |
| 137 | + {{/canloginbyemail}} |
| 138 | + {{#canloginbyemail}} |
| 139 | + {{#str}} usernameemail {{/str}} |
| 140 | + {{/canloginbyemail}} |
| 141 | + </label> |
| 142 | + <input type="text" name="username" id="username" {{! |
| 143 | + !}}class="form-control form-control-lg" {{! |
| 144 | + !}}value="{{username}}" {{! |
| 145 | + !}}placeholder="{{^canloginbyemail}}{{#cleanstr}}username{{/cleanstr}}{{/canloginbyemail}}{{! |
| 146 | + !}}{{#canloginbyemail}}{{#cleanstr}}usernameemail{{/cleanstr}}{{/canloginbyemail}}" {{! |
| 147 | + !}}autocomplete="username"> |
156 | 148 | </div>
|
157 |
| - {{/recaptcha}} |
158 |
| - <div class="login-form-submit mb-3"> |
159 |
| - <button class="btn btn-primary btn-lg" type="submit" id="loginbtn">{{#str}}login{{/str}}</button> |
160 |
| - </div> |
161 |
| - <div class="login-form-forgotpassword mb-3"> |
162 |
| - <a href="{{forgotpasswordurl}}">{{#str}}forgotaccount{{/str}}</a> |
163 |
| - </div> |
164 |
| - </form> |
| 149 | + <div class="login-form-password mb-3"> |
| 150 | + <label for="password" class="sr-only">{{#str}} password {{/str}}</label> |
| 151 | + <input type="password" name="password" id="password" value="" {{! |
| 152 | + !}}class="form-control form-control-lg" {{! |
| 153 | + !}}placeholder="{{#cleanstr}}password{{/cleanstr}}" {{! |
| 154 | + !}}autocomplete="current-password"> |
| 155 | + </div> |
| 156 | + {{#recaptcha}} |
| 157 | + <div class="login-form-recaptcha mb-3"> |
| 158 | + {{{recaptcha}}} |
| 159 | + </div> |
| 160 | + {{/recaptcha}} |
| 161 | + <div class="login-form-submit mb-3"> |
| 162 | + <button class="btn btn-primary btn-lg" type="submit" id="loginbtn">{{#str}}login{{/str}}</button> |
| 163 | + </div> |
| 164 | + <div class="login-form-forgotpassword mb-3"> |
| 165 | + <a href="{{forgotpasswordurl}}">{{#str}}forgotaccount{{/str}}</a> |
| 166 | + </div> |
| 167 | + </form> |
| 168 | + {{/showloginform}} |
165 | 169 | {{#hasidentityproviders}}
|
166 | 170 | <div class="login-divider"></div>
|
167 | 171 | <div class="login-identityproviders">
|
|
0 commit comments