diff options
Diffstat (limited to 'src/Wallabag/CoreBundle/Resources/views')
-rw-r--r-- | src/Wallabag/CoreBundle/Resources/views/themes/baggy/Config/index.html.twig | 88 | ||||
-rw-r--r-- | src/Wallabag/CoreBundle/Resources/views/themes/material/Config/index.html.twig | 45 |
2 files changed, 84 insertions, 49 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..5c4e44dd 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 | |||
@@ -176,43 +176,36 @@ | |||
176 | 176 | ||
177 | <fieldset class="w500p inline"> | 177 | <fieldset class="w500p inline"> |
178 | <div class="row"> | 178 | <div class="row"> |
179 | {{ form_label(form.user.twoFactorAuthentication) }} | 179 | {{ form_label(form.user.emailTwoFactor) }} |
180 | {{ form_errors(form.user.twoFactorAuthentication) }} | 180 | {{ form_errors(form.user.emailTwoFactor) }} |
181 | {{ form_widget(form.user.twoFactorAuthentication) }} | 181 | {{ form_widget(form.user.emailTwoFactor) }} |
182 | </div> | 182 | </div> |
183 | <a href="#" title="{{ 'config.form_user.help_twoFactorAuthentication'|trans }}"> | 183 | <br/> |
184 | <i class="material-icons">live_help</i> | 184 | <div class="row"> |
185 | </a> | 185 | {{ form_label(form.user.googleTwoFactor) }} |
186 | {{ form_widget(form.user.googleTwoFactor) }} | ||
187 | {{ form_errors(form.user.googleTwoFactor) }} | ||
188 | </div> | ||
189 | {% for OTPSecret in app.session.flashbag.get('OTPSecret') %} | ||
190 | <div class="row"> | ||
191 | You just enabled the OTP two factor authentication, open your OTP app and use that code to get a one time password. | ||
192 | <br/> | ||
193 | That code will disapear after a page reload. | ||
194 | <br/><br/> | ||
195 | <strong>{{ OTPSecret.code }}</strong> | ||
196 | <br/><br/> | ||
197 | Or you can scan that QR Code with your app: | ||
198 | <br/> | ||
199 | <img id="2faQrcode" class="hide-on-med-and-down" /> | ||
200 | |||
201 | <script> | ||
202 | document.getElementById('2faQrcode').src = jrQrcode.getQrBase64('{{ OTPSecret.qrCode }}');; | ||
203 | </script> | ||
204 | </div> | ||
205 | {% endfor %} | ||
186 | </fieldset> | 206 | </fieldset> |
187 | {% endif %} | 207 | {% endif %} |
188 | 208 | ||
189 | <h2>{{ 'config.reset.title'|trans }}</h2> | ||
190 | <fieldset class="w500p inline"> | ||
191 | <p>{{ 'config.reset.description'|trans }}</p> | ||
192 | <ul> | ||
193 | <li> | ||
194 | <a href="{{ path('config_reset', { type: 'annotations'}) }}" onclick="return confirm('{{ 'config.reset.confirm'|trans|escape('js') }}')" class="waves-effect waves-light btn red"> | ||
195 | {{ 'config.reset.annotations'|trans }} | ||
196 | </a> | ||
197 | </li> | ||
198 | <li> | ||
199 | <a href="{{ path('config_reset', { type: 'tags'}) }}" onclick="return confirm('{{ 'config.reset.confirm'|trans|escape('js') }}')" class="waves-effect waves-light btn red"> | ||
200 | {{ 'config.reset.tags'|trans }} | ||
201 | </a> | ||
202 | </li> | ||
203 | <li> | ||
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 | |||
216 | {{ form_widget(form.user._token) }} | 209 | {{ form_widget(form.user._token) }} |
217 | {{ form_widget(form.user.save) }} | 210 | {{ form_widget(form.user.save) }} |
218 | </form> | 211 | </form> |
@@ -277,7 +270,7 @@ | |||
277 | {% endfor %} | 270 | {% endfor %} |
278 | </ul> | 271 | </ul> |
279 | 272 | ||
280 | {{ form_start(form.new_tagging_rule) }} | 273 | {{ form_start(form.new_tagging_rule) }} |
281 | {{ form_errors(form.new_tagging_rule) }} | 274 | {{ form_errors(form.new_tagging_rule) }} |
282 | 275 | ||
283 | <fieldset class="w500p inline"> | 276 | <fieldset class="w500p inline"> |
@@ -382,4 +375,31 @@ | |||
382 | </table> | 375 | </table> |
383 | </div> | 376 | </div> |
384 | </div> | 377 | </div> |
378 | |||
379 | <h2>{{ 'config.reset.title'|trans }}</h2> | ||
380 | <fieldset class="w500p inline"> | ||
381 | <p>{{ 'config.reset.description'|trans }}</p> | ||
382 | <ul> | ||
383 | <li> | ||
384 | <a href="{{ path('config_reset', { type: 'annotations'}) }}" onclick="return confirm('{{ 'config.reset.confirm'|trans|escape('js') }}')" class="waves-effect waves-light btn red"> | ||
385 | {{ 'config.reset.annotations'|trans }} | ||
386 | </a> | ||
387 | </li> | ||
388 | <li> | ||
389 | <a href="{{ path('config_reset', { type: 'tags'}) }}" onclick="return confirm('{{ 'config.reset.confirm'|trans|escape('js') }}')" class="waves-effect waves-light btn red"> | ||
390 | {{ 'config.reset.tags'|trans }} | ||
391 | </a> | ||
392 | </li> | ||
393 | <li> | ||
394 | <a href="{{ path('config_reset', { type: 'archived'}) }}" onclick="return confirm('{{ 'config.reset.confirm'|trans|escape('js') }}')" class="waves-effect waves-light btn red"> | ||
395 | {{ 'config.reset.archived'|trans }} | ||
396 | </a> | ||
397 | </li> | ||
398 | <li> | ||
399 | <a href="{{ path('config_reset', { type: 'entries'}) }}" onclick="return confirm('{{ 'config.reset.confirm'|trans|escape('js') }}')" class="waves-effect waves-light btn red"> | ||
400 | {{ 'config.reset.entries'|trans }} | ||
401 | </a> | ||
402 | </li> | ||
403 | </ul> | ||
404 | </fieldset> | ||
385 | {% endblock %} | 405 | {% endblock %} |
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'}}) }} |