diff options
Diffstat (limited to 'src/Wallabag/CoreBundle/Resources/views/themes/baggy/Config/index.html.twig')
-rw-r--r-- | src/Wallabag/CoreBundle/Resources/views/themes/baggy/Config/index.html.twig | 61 |
1 files changed, 27 insertions, 34 deletions
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Config/index.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Config/index.html.twig index cf439408..93f8ddf8 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Config/index.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Config/index.html.twig | |||
@@ -168,48 +168,41 @@ | |||
168 | </div> | 168 | </div> |
169 | </fieldset> | 169 | </fieldset> |
170 | 170 | ||
171 | {{ form_widget(form.user.save) }} | ||
172 | |||
171 | {% if twofactor_auth %} | 173 | {% if twofactor_auth %} |
174 | <h5>{{ 'config.otp.page_title'|trans }}</h5> | ||
175 | |||
172 | <div class="row"> | 176 | <div class="row"> |
173 | {{ 'config.form_user.two_factor_description'|trans }} | 177 | {{ 'config.form_user.two_factor_description'|trans }} |
174 | </div> | 178 | </div> |
175 | 179 | ||
176 | <fieldset class="w500p inline"> | 180 | <table> |
177 | <div class="row"> | 181 | <thead> |
178 | {{ form_label(form.user.emailTwoFactor) }} | 182 | <tr> |
179 | {{ form_errors(form.user.emailTwoFactor) }} | 183 | <th>{{ 'config.form_user.two_factor.table_method'|trans }}</th> |
180 | {{ form_widget(form.user.emailTwoFactor) }} | 184 | <th>{{ 'config.form_user.two_factor.table_state'|trans }}</th> |
181 | </div> | 185 | <th>{{ 'config.form_user.two_factor.table_action'|trans }}</th> |
182 | <br/> | 186 | </tr> |
183 | <div class="row"> | 187 | </thead> |
184 | {{ form_label(form.user.googleTwoFactor) }} | 188 | |
185 | {{ form_widget(form.user.googleTwoFactor) }} | 189 | <tbody> |
186 | {{ form_errors(form.user.googleTwoFactor) }} | 190 | <tr> |
187 | </div> | 191 | <td>{{ 'config.form_user.two_factor.emailTwoFactor_label'|trans }}</td> |
188 | {% for OtpQrCode in app.session.flashbag.get('OtpQrCode') %} | 192 | <td>{% if app.user.isEmailTwoFactor %}<b>{{ 'config.form_user.two_factor.state_enabled'|trans }}</b>{% else %}{{ 'config.form_user.two_factor.state_disabled'|trans }}{% endif %}</td> |
189 | <div class="row"> | 193 | <td><a href="{{ path('config_otp_email') }}" class="waves-effect waves-light btn{% if app.user.isEmailTwoFactor %} disabled{% endif %}">{{ 'config.form_user.two_factor.action_email'|trans }}</a></td> |
190 | {{ 'config.form_user.two_factor_code_description_1'|trans }} | 194 | </tr> |
191 | <br/> | 195 | <tr> |
192 | {{ 'config.form_user.two_factor_code_description_2'|trans }} | 196 | <td>{{ 'config.form_user.two_factor.googleTwoFactor_label'|trans }}</td> |
193 | <br/><br/> | 197 | <td>{% if app.user.isGoogleTwoFactor %}<b>{{ 'config.form_user.two_factor.state_enabled'|trans }}</b>{% else %}{{ 'config.form_user.two_factor.state_disabled'|trans }}{% endif %}</td> |
194 | <img id="2faQrcode" class="hide-on-med-and-down" /> | 198 | <td><a href="{{ path('config_otp_app') }}" class="waves-effect waves-light btn{% if app.user.isGoogleTwoFactor %} disabled{% endif %}">{{ 'config.form_user.two_factor.action_app'|trans }}</a></td> |
195 | <script> | 199 | </tr> |
196 | document.getElementById('2faQrcode').src = jrQrcode.getQrBase64('{{ OtpQrCode }}'); | 200 | </tbody> |
197 | </script> | 201 | </table> |
198 | <br/><br/> | 202 | |
199 | {{ 'config.form_user.two_factor_code_description_3'|trans }} | ||
200 | <br/><br/> | ||
201 | <strong>{{ app.user.getGoogleAuthenticatorSecret }}</strong> | ||
202 | <br/><br/> | ||
203 | {{ 'config.form_user.two_factor_code_description_4'|trans }} | ||
204 | <br/><br/> | ||
205 | <strong>{{ app.user.getBackupCodes|join("\n")|nl2br }}</strong> | ||
206 | </div> | ||
207 | {% endfor %} | ||
208 | </fieldset> | ||
209 | {% endif %} | 203 | {% endif %} |
210 | 204 | ||
211 | {{ form_widget(form.user._token) }} | 205 | {{ form_widget(form.user._token) }} |
212 | {{ form_widget(form.user.save) }} | ||
213 | </form> | 206 | </form> |
214 | 207 | ||
215 | {% if enabled_users > 1 %} | 208 | {% if enabled_users > 1 %} |