aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/CoreBundle/Resources/views/themes/material/Config/index.html.twig
diff options
context:
space:
mode:
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.twig45
1 files changed, 30 insertions, 15 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 35800989..887d154f 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
@@ -112,8 +112,7 @@
112 <img id="androidQrcode" class="hide-on-med-and-down" /> 112 <img id="androidQrcode" class="hide-on-med-and-down" />
113 </div> 113 </div>
114 <script> 114 <script>
115 const imgBase64 = jrQrcode.getQrBase64('wallabag://{{ app.user.username }}@{{ wallabag_url }}'); 115 document.getElementById('androidQrcode').src = jrQrcode.getQrBase64('wallabag://{{ app.user.username }}@{{ wallabag_url }}');;
116 document.getElementById('androidQrcode').src = imgBase64;
117 </script> 116 </script>
118 </div> 117 </div>
119 118
@@ -198,22 +197,38 @@
198 </div> 197 </div>
199 198
200 {% if twofactor_auth %} 199 {% if twofactor_auth %}
201 <div class="row"> 200 <div class="row">
202 <div class="input-field col s11">
203 {{ 'config.form_user.two_factor_description'|trans }} 201 {{ 'config.form_user.two_factor_description'|trans }}
204 202
205 <br /> 203 <div class="input-field col s11">
206 204 {{ form_widget(form.user.emailTwoFactor) }}
207 {{ form_widget(form.user.twoFactorAuthentication) }} 205 {{ form_label(form.user.emailTwoFactor) }}
208 {{ form_label(form.user.twoFactorAuthentication) }} 206 {{ form_errors(form.user.emailTwoFactor) }}
209 {{ form_errors(form.user.twoFactorAuthentication) }} 207 </div>
210 </div> 208 <div class="input-field col s11">
211 <div class="input-field col s1"> 209 {{ form_widget(form.user.googleTwoFactor) }}
212 <a href="#" class="tooltipped" data-position="left" data-delay="50" data-tooltip="{{ 'config.form_user.help_twoFactorAuthentication'|trans }}"> 210 {{ form_label(form.user.googleTwoFactor) }}
213 <i class="material-icons">live_help</i> 211 {{ form_errors(form.user.googleTwoFactor) }}
214 </a> 212 </div>
215 </div> 213 </div>
216 </div> 214
215 {% for OTPSecret in app.session.flashbag.get('OTPSecret') %}
216 <div class="card-panel yellow darken-1 black-text">
217 You just enabled the OTP two factor authentication, open your OTP app and use that code to get a one time password.
218 <br/>
219 That code will disapear after a page reload.
220 <br/><br/>
221 <strong>{{ OTPSecret.code }}</strong>
222 <br/><br/>
223 Or you can scan that QR Code with your app:
224 <br/>
225 <img id="2faQrcode" class="hide-on-med-and-down" />
226
227 <script>
228 document.getElementById('2faQrcode').src = jrQrcode.getQrBase64('{{ OTPSecret.qrCode }}');;
229 </script>
230 </div>
231 {% endfor %}
217 {% endif %} 232 {% endif %}
218 233
219 {{ form_widget(form.user.save, {'attr': {'class': 'btn waves-effect waves-light'}}) }} 234 {{ form_widget(form.user.save, {'attr': {'class': 'btn waves-effect waves-light'}}) }}