aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/CoreBundle/Resources/views/themes/material/Config/index.html.twig
diff options
context:
space:
mode:
authorKevin Decherf <kevin@kdecherf.com>2019-01-30 01:02:27 +0100
committerGitHub <noreply@github.com>2019-01-30 01:02:27 +0100
commit2e5b3fa361098498a9e42a65396a27e1eb487fba (patch)
treef20677c3d68c1ea756f0835ff179a0d7d3431a67 /src/Wallabag/CoreBundle/Resources/views/themes/material/Config/index.html.twig
parentc6024246b744e411175318065f7c396bbb5a213e (diff)
parent4654a83b6438b88e3b7062a21d18999d9df2fb8e (diff)
downloadwallabag-2e5b3fa361098498a9e42a65396a27e1eb487fba.tar.gz
wallabag-2e5b3fa361098498a9e42a65396a27e1eb487fba.tar.zst
wallabag-2e5b3fa361098498a9e42a65396a27e1eb487fba.zip
Merge pull request #3798 from wallabag/update-two-factor-bundle
Enable OTP 2FA
Diffstat (limited to 'src/Wallabag/CoreBundle/Resources/views/themes/material/Config/index.html.twig')
-rw-r--r--src/Wallabag/CoreBundle/Resources/views/themes/material/Config/index.html.twig114
1 files changed, 64 insertions, 50 deletions
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/material/Config/index.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/material/Config/index.html.twig
index f896fe2d..412c18f4 100644
--- a/src/Wallabag/CoreBundle/Resources/views/themes/material/Config/index.html.twig
+++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/Config/index.html.twig
@@ -16,6 +16,7 @@
16 <li class="tab col s12 m6 l3"><a href="#set3">{{ 'config.tab_menu.user_info'|trans }}</a></li> 16 <li class="tab col s12 m6 l3"><a href="#set3">{{ 'config.tab_menu.user_info'|trans }}</a></li>
17 <li class="tab col s12 m6 l3"><a href="#set4">{{ 'config.tab_menu.password'|trans }}</a></li> 17 <li class="tab col s12 m6 l3"><a href="#set4">{{ 'config.tab_menu.password'|trans }}</a></li>
18 <li class="tab col s12 m6 l3"><a href="#set5">{{ 'config.tab_menu.rules'|trans }}</a></li> 18 <li class="tab col s12 m6 l3"><a href="#set5">{{ 'config.tab_menu.rules'|trans }}</a></li>
19 <li class="tab col s12 m6 l3"><a href="#set6">{{ 'config.tab_menu.reset'|trans }}</a></li>
19 </ul> 20 </ul>
20 </div> 21 </div>
21 22
@@ -111,8 +112,7 @@
111 <img id="androidQrcode" class="hide-on-med-and-down" /> 112 <img id="androidQrcode" class="hide-on-med-and-down" />
112 </div> 113 </div>
113 <script> 114 <script>
114 const imgBase64 = jrQrcode.getQrBase64('wallabag://{{ app.user.username }}@{{ wallabag_url }}'); 115 document.getElementById('androidQrcode').src = jrQrcode.getQrBase64('wallabag://{{ app.user.username }}@{{ wallabag_url }}');
115 document.getElementById('androidQrcode').src = imgBase64;
116 </script> 116 </script>
117 </div> 117 </div>
118 118
@@ -196,59 +196,42 @@
196 </div> 196 </div>
197 </div> 197 </div>
198 198
199 {% if twofactor_auth %} 199 {{ form_widget(form.user.save, {'attr': {'class': 'btn waves-effect waves-light'}}) }}
200 <div class="row">
201 <div class="input-field col s11">
202 {{ 'config.form_user.two_factor_description'|trans }}
203
204 <br />
205 200
206 {{ form_widget(form.user.twoFactorAuthentication) }} 201 {% if twofactor_auth %}
207 {{ form_label(form.user.twoFactorAuthentication) }} 202 <br/>
208 {{ form_errors(form.user.twoFactorAuthentication) }} 203 <br/>
209 </div> 204 <div class="row">
210 <div class="input-field col s1"> 205 <h5>{{ 'config.otp.page_title'|trans }}</h5>
211 <a href="#" class="tooltipped" data-position="left" data-delay="50" data-tooltip="{{ 'config.form_user.help_twoFactorAuthentication'|trans }}"> 206
212 <i class="material-icons">live_help</i> 207 <p>{{ 'config.form_user.two_factor_description'|trans }}</p>
213 </a> 208
209 <table>
210 <thead>
211 <tr>
212 <th>{{ 'config.form_user.two_factor.table_method'|trans }}</th>
213 <th>{{ 'config.form_user.two_factor.table_state'|trans }}</th>
214 <th>{{ 'config.form_user.two_factor.table_action'|trans }}</th>
215 </tr>
216 </thead>
217
218 <tbody>
219 <tr>
220 <td>{{ 'config.form_user.two_factor.emailTwoFactor_label'|trans }}</td>
221 <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>
222 <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>
223 </tr>
224 <tr>
225 <td>{{ 'config.form_user.two_factor.googleTwoFactor_label'|trans }}</td>
226 <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>
227 <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>
228 </tr>
229 </tbody>
230 </table>
214 </div> 231 </div>
215 </div>
216 {% endif %} 232 {% endif %}
217
218 {{ form_widget(form.user.save, {'attr': {'class': 'btn waves-effect waves-light'}}) }}
219 {{ form_widget(form.user._token) }} 233 {{ form_widget(form.user._token) }}
220 </form> 234 </form>
221
222 <br /><hr /><br />
223
224 <div class="row">
225 <h5>{{ 'config.reset.title'|trans }}</h5>
226 <p>{{ 'config.reset.description'|trans }}</p>
227 <a href="{{ path('config_reset', { type: 'annotations'}) }}" onclick="return confirm('{{ 'config.reset.confirm'|trans|escape('js') }}')" class="waves-effect waves-light btn red">
228 {{ 'config.reset.annotations'|trans }}
229 </a>
230 <a href="{{ path('config_reset', { type: 'tags'}) }}" onclick="return confirm('{{ 'config.reset.confirm'|trans|escape('js') }}')" class="waves-effect waves-light btn red">
231 {{ 'config.reset.tags'|trans }}
232 </a>
233 <a href="{{ path('config_reset', { type: 'archived'}) }}" onclick="return confirm('{{ 'config.reset.confirm'|trans|escape('js') }}')" class="waves-effect waves-light btn red">
234 {{ 'config.reset.archived'|trans }}
235 </a>
236 <a href="{{ path('config_reset', { type: 'entries'}) }}" onclick="return confirm('{{ 'config.reset.confirm'|trans|escape('js') }}')" class="waves-effect waves-light btn red">
237 {{ 'config.reset.entries'|trans }}
238 </a>
239 </div>
240
241 {% if enabled_users > 1 %}
242 <br /><hr /><br />
243
244 <div class="row">
245 <h5>{{ 'config.form_user.delete.title'|trans }}</h5>
246 <p>{{ 'config.form_user.delete.description'|trans }}</p>
247 <a href="{{ path('delete_account') }}" onclick="return confirm('{{ 'config.form_user.delete.confirm'|trans|escape('js') }}')" class="waves-effect waves-light btn red delete-account">
248 {{ 'config.form_user.delete.button'|trans }}
249 </a>
250 </div>
251 {% endif %}
252 </div> 235 </div>
253 236
254 <div id="set4" class="col s12"> 237 <div id="set4" class="col s12">
@@ -422,6 +405,37 @@
422 </div> 405 </div>
423 </div> 406 </div>
424 </div> 407 </div>
408
409 <div id="set6" class="col s12">
410 <div class="row">
411 <h5>{{ 'config.reset.title'|trans }}</h5>
412 <p>{{ 'config.reset.description'|trans }}</p>
413 <a href="{{ path('config_reset', { type: 'annotations'}) }}" onclick="return confirm('{{ 'config.reset.confirm'|trans|escape('js') }}')" class="waves-effect waves-light btn red">
414 {{ 'config.reset.annotations'|trans }}
415 </a>
416 <a href="{{ path('config_reset', { type: 'tags'}) }}" onclick="return confirm('{{ 'config.reset.confirm'|trans|escape('js') }}')" class="waves-effect waves-light btn red">
417 {{ 'config.reset.tags'|trans }}
418 </a>
419 <a href="{{ path('config_reset', { type: 'archived'}) }}" onclick="return confirm('{{ 'config.reset.confirm'|trans|escape('js') }}')" class="waves-effect waves-light btn red">
420 {{ 'config.reset.archived'|trans }}
421 </a>
422 <a href="{{ path('config_reset', { type: 'entries'}) }}" onclick="return confirm('{{ 'config.reset.confirm'|trans|escape('js') }}')" class="waves-effect waves-light btn red">
423 {{ 'config.reset.entries'|trans }}
424 </a>
425 </div>
426
427 {% if enabled_users > 1 %}
428 <br /><hr /><br />
429
430 <div class="row">
431 <h5>{{ 'config.form_user.delete.title'|trans }}</h5>
432 <p>{{ 'config.form_user.delete.description'|trans }}</p>
433 <a href="{{ path('delete_account') }}" onclick="return confirm('{{ 'config.form_user.delete.confirm'|trans|escape('js') }}')" class="waves-effect waves-light btn red delete-account">
434 {{ 'config.form_user.delete.button'|trans }}
435 </a>
436 </div>
437 {% endif %}
438 </div>
425 </div> 439 </div>
426 440
427 </div> 441 </div>