diff options
Diffstat (limited to 'src/Wallabag/CoreBundle/Resources/views/themes/baggy/Config')
-rw-r--r-- | src/Wallabag/CoreBundle/Resources/views/themes/baggy/Config/index.html.twig | 97 | ||||
-rw-r--r-- | src/Wallabag/CoreBundle/Resources/views/themes/baggy/Config/otp_app.html.twig | 55 |
2 files changed, 111 insertions, 41 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 bcc57dac..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 | |||
@@ -86,8 +86,7 @@ | |||
86 | <br/> | 86 | <br/> |
87 | <img id="androidQrcode" /> | 87 | <img id="androidQrcode" /> |
88 | <script> | 88 | <script> |
89 | const imgBase64 = jrQrcode.getQrBase64('wallabag://{{ app.user.username }}@{{ wallabag_url }}'); | 89 | document.getElementById('androidQrcode').src = jrQrcode.getQrBase64('wallabag://{{ app.user.username }}@{{ wallabag_url }}'); |
90 | document.getElementById('androidQrcode').src = imgBase64; | ||
91 | </script> | 90 | </script> |
92 | </div> | 91 | </div> |
93 | </fieldset> | 92 | </fieldset> |
@@ -169,52 +168,41 @@ | |||
169 | </div> | 168 | </div> |
170 | </fieldset> | 169 | </fieldset> |
171 | 170 | ||
171 | {{ form_widget(form.user.save) }} | ||
172 | |||
172 | {% if twofactor_auth %} | 173 | {% if twofactor_auth %} |
174 | <h5>{{ 'config.otp.page_title'|trans }}</h5> | ||
175 | |||
173 | <div class="row"> | 176 | <div class="row"> |
174 | {{ 'config.form_user.two_factor_description'|trans }} | 177 | {{ 'config.form_user.two_factor_description'|trans }} |
175 | </div> | 178 | </div> |
176 | 179 | ||
177 | <fieldset class="w500p inline"> | 180 | <table> |
178 | <div class="row"> | 181 | <thead> |
179 | {{ form_label(form.user.twoFactorAuthentication) }} | 182 | <tr> |
180 | {{ form_errors(form.user.twoFactorAuthentication) }} | 183 | <th>{{ 'config.form_user.two_factor.table_method'|trans }}</th> |
181 | {{ form_widget(form.user.twoFactorAuthentication) }} | 184 | <th>{{ 'config.form_user.two_factor.table_state'|trans }}</th> |
182 | </div> | 185 | <th>{{ 'config.form_user.two_factor.table_action'|trans }}</th> |
183 | <a href="#" title="{{ 'config.form_user.help_twoFactorAuthentication'|trans }}"> | 186 | </tr> |
184 | <i class="material-icons">live_help</i> | 187 | </thead> |
185 | </a> | ||
186 | </fieldset> | ||
187 | {% endif %} | ||
188 | 188 | ||
189 | <h2>{{ 'config.reset.title'|trans }}</h2> | 189 | <tbody> |
190 | <fieldset class="w500p inline"> | 190 | <tr> |
191 | <p>{{ 'config.reset.description'|trans }}</p> | 191 | <td>{{ 'config.form_user.two_factor.emailTwoFactor_label'|trans }}</td> |
192 | <ul> | 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> |
193 | <li> | 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> |
194 | <a href="{{ path('config_reset', { type: 'annotations'}) }}" onclick="return confirm('{{ 'config.reset.confirm'|trans|escape('js') }}')" class="waves-effect waves-light btn red"> | 194 | </tr> |
195 | {{ 'config.reset.annotations'|trans }} | 195 | <tr> |
196 | </a> | 196 | <td>{{ 'config.form_user.two_factor.googleTwoFactor_label'|trans }}</td> |
197 | </li> | 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> |
198 | <li> | 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> |
199 | <a href="{{ path('config_reset', { type: 'tags'}) }}" onclick="return confirm('{{ 'config.reset.confirm'|trans|escape('js') }}')" class="waves-effect waves-light btn red"> | 199 | </tr> |
200 | {{ 'config.reset.tags'|trans }} | 200 | </tbody> |
201 | </a> | 201 | </table> |
202 | </li> | 202 | |
203 | <li> | 203 | {% endif %} |
204 | <a href="{{ path('config_reset', { type: 'archived'}) }}" onclick="return confirm('{{ 'config.reset.confirm'|trans|escape('js') }}')" class="waves-effect waves-light btn red"> | ||
205 | {{ 'config.reset.archived'|trans }} | ||
206 | </a> | ||
207 | </li> | ||
208 | <li> | ||
209 | <a href="{{ path('config_reset', { type: 'entries'}) }}" onclick="return confirm('{{ 'config.reset.confirm'|trans|escape('js') }}')" class="waves-effect waves-light btn red"> | ||
210 | {{ 'config.reset.entries'|trans }} | ||
211 | </a> | ||
212 | </li> | ||
213 | </ul> | ||
214 | </fieldset> | ||
215 | 204 | ||
216 | {{ form_widget(form.user._token) }} | 205 | {{ form_widget(form.user._token) }} |
217 | {{ form_widget(form.user.save) }} | ||
218 | </form> | 206 | </form> |
219 | 207 | ||
220 | {% if enabled_users > 1 %} | 208 | {% if enabled_users > 1 %} |
@@ -277,7 +265,7 @@ | |||
277 | {% endfor %} | 265 | {% endfor %} |
278 | </ul> | 266 | </ul> |
279 | 267 | ||
280 | {{ form_start(form.new_tagging_rule) }} | 268 | {{ form_start(form.new_tagging_rule) }} |
281 | {{ form_errors(form.new_tagging_rule) }} | 269 | {{ form_errors(form.new_tagging_rule) }} |
282 | 270 | ||
283 | <fieldset class="w500p inline"> | 271 | <fieldset class="w500p inline"> |
@@ -382,4 +370,31 @@ | |||
382 | </table> | 370 | </table> |
383 | </div> | 371 | </div> |
384 | </div> | 372 | </div> |
373 | |||
374 | <h2>{{ 'config.reset.title'|trans }}</h2> | ||
375 | <fieldset class="w500p inline"> | ||
376 | <p>{{ 'config.reset.description'|trans }}</p> | ||
377 | <ul> | ||
378 | <li> | ||
379 | <a href="{{ path('config_reset', { type: 'annotations'}) }}" onclick="return confirm('{{ 'config.reset.confirm'|trans|escape('js') }}')" class="waves-effect waves-light btn red"> | ||
380 | {{ 'config.reset.annotations'|trans }} | ||
381 | </a> | ||
382 | </li> | ||
383 | <li> | ||
384 | <a href="{{ path('config_reset', { type: 'tags'}) }}" onclick="return confirm('{{ 'config.reset.confirm'|trans|escape('js') }}')" class="waves-effect waves-light btn red"> | ||
385 | {{ 'config.reset.tags'|trans }} | ||
386 | </a> | ||
387 | </li> | ||
388 | <li> | ||
389 | <a href="{{ path('config_reset', { type: 'archived'}) }}" onclick="return confirm('{{ 'config.reset.confirm'|trans|escape('js') }}')" class="waves-effect waves-light btn red"> | ||
390 | {{ 'config.reset.archived'|trans }} | ||
391 | </a> | ||
392 | </li> | ||
393 | <li> | ||
394 | <a href="{{ path('config_reset', { type: 'entries'}) }}" onclick="return confirm('{{ 'config.reset.confirm'|trans|escape('js') }}')" class="waves-effect waves-light btn red"> | ||
395 | {{ 'config.reset.entries'|trans }} | ||
396 | </a> | ||
397 | </li> | ||
398 | </ul> | ||
399 | </fieldset> | ||
385 | {% endblock %} | 400 | {% endblock %} |
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Config/otp_app.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Config/otp_app.html.twig new file mode 100644 index 00000000..0919646e --- /dev/null +++ b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Config/otp_app.html.twig | |||
@@ -0,0 +1,55 @@ | |||
1 | {% extends "WallabagCoreBundle::layout.html.twig" %} | ||
2 | |||
3 | {% block title %}{{ 'config.page_title'|trans }} > {{ 'config.otp.page_title'|trans }}{% endblock %} | ||
4 | |||
5 | {% block content %} | ||
6 | <h5>{{ 'config.otp.page_title'|trans }}</h5> | ||
7 | |||
8 | <ol> | ||
9 | <li> | ||
10 | <p>{{ 'config.otp.app.two_factor_code_description_1'|trans }}</p> | ||
11 | <p>{{ 'config.otp.app.two_factor_code_description_2'|trans }}</p> | ||
12 | |||
13 | <p> | ||
14 | <img id="2faQrcode" class="hide-on-med-and-down" /> | ||
15 | <script> | ||
16 | document.getElementById('2faQrcode').src = jrQrcode.getQrBase64('{{ qr_code }}'); | ||
17 | </script> | ||
18 | </p> | ||
19 | </li> | ||
20 | <li> | ||
21 | <p>{{ 'config.otp.app.two_factor_code_description_3'|trans }}</p> | ||
22 | |||
23 | <p><strong>{{ backupCodes|join("\n")|nl2br }}</strong></p> | ||
24 | </li> | ||
25 | <li> | ||
26 | <p>{{ 'config.otp.app.two_factor_code_description_4'|trans }}</p> | ||
27 | |||
28 | {% for flashMessage in app.session.flashbag.get("two_factor") %} | ||
29 | <div class="card-panel red darken-1 black-text"> | ||
30 | {{ flashMessage|trans }} | ||
31 | </div> | ||
32 | {% endfor %} | ||
33 | |||
34 | <form class="form" action="{{ path("config_otp_app_check") }}" method="post"> | ||
35 | <div class="card-content"> | ||
36 | <div class="row"> | ||
37 | <div class="input-field col s12"> | ||
38 | <label for="_auth_code">{{ "scheb_two_factor.auth_code"|trans }}</label> | ||
39 | <input id="_auth_code" type="text" autocomplete="off" name="_auth_code" /> | ||
40 | </div> | ||
41 | </div> | ||
42 | </div> | ||
43 | <div class="card-action"> | ||
44 | <a href="{{ path('config_otp_app_cancel') }}" class="waves-effect waves-light grey btn"> | ||
45 | {{ 'config.otp.app.cancel'|trans }} | ||
46 | </a> | ||
47 | <button class="btn waves-effect waves-light" type="submit" name="send"> | ||
48 | {{ 'config.otp.app.enable'|trans }} | ||
49 | <i class="material-icons right">send</i> | ||
50 | </button> | ||
51 | </div> | ||
52 | </form> | ||
53 | </li> | ||
54 | </ol> | ||
55 | {% endblock %} | ||