diff options
author | Jérémy Benoist <j0k3r@users.noreply.github.com> | 2019-05-29 11:14:00 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-05-29 11:14:00 +0200 |
commit | 73ec68b1ffafb792265a3805833e5cd84c966aed (patch) | |
tree | 33c6040c050f85c537f8dbf5e91d8c281db092cd /src/Wallabag/CoreBundle/Resources/views/themes/material/Config | |
parent | 2ba365c7c49556cd23b444dc3bb8d4a8cf08809d (diff) | |
parent | 2cbee36a0184786644470a84fdd8c720cfcac58e (diff) | |
download | wallabag-73ec68b1ffafb792265a3805833e5cd84c966aed.tar.gz wallabag-73ec68b1ffafb792265a3805833e5cd84c966aed.tar.zst wallabag-73ec68b1ffafb792265a3805833e5cd84c966aed.zip |
Merge pull request #3984 from wallabag/2.4
Merge 2.4 into master
Diffstat (limited to 'src/Wallabag/CoreBundle/Resources/views/themes/material/Config')
-rw-r--r-- | src/Wallabag/CoreBundle/Resources/views/themes/material/Config/index.html.twig | 158 | ||||
-rw-r--r-- | src/Wallabag/CoreBundle/Resources/views/themes/material/Config/otp_app.html.twig | 63 |
2 files changed, 149 insertions, 72 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..818fc4e7 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 | |||
@@ -12,10 +12,11 @@ | |||
12 | <div class="div_tabs col s12"> | 12 | <div class="div_tabs col s12"> |
13 | <ul class="tabs"> | 13 | <ul class="tabs"> |
14 | <li class="tab col s12 m6 l3"><a class="active" href="#set1">{{ 'config.tab_menu.settings'|trans }}</a></li> | 14 | <li class="tab col s12 m6 l3"><a class="active" href="#set1">{{ 'config.tab_menu.settings'|trans }}</a></li> |
15 | <li class="tab col s12 m6 l3"><a href="#set2">{{ 'config.tab_menu.rss'|trans }}</a></li> | 15 | <li class="tab col s12 m6 l3"><a href="#set2">{{ 'config.tab_menu.feed'|trans }}</a></li> |
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 | ||
@@ -122,42 +122,42 @@ | |||
122 | </div> | 122 | </div> |
123 | 123 | ||
124 | <div id="set2" class="col s12"> | 124 | <div id="set2" class="col s12"> |
125 | {{ form_start(form.rss) }} | 125 | {{ form_start(form.feed) }} |
126 | {{ form_errors(form.rss) }} | 126 | {{ form_errors(form.feed) }} |
127 | 127 | ||
128 | <div class="row"> | 128 | <div class="row"> |
129 | <div class="input-field col s12"> | 129 | <div class="input-field col s12"> |
130 | {{ 'config.form_rss.description'|trans }} | 130 | {{ 'config.form_feed.description'|trans }} |
131 | </div> | 131 | </div> |
132 | </div> | 132 | </div> |
133 | 133 | ||
134 | <div class="row"> | 134 | <div class="row"> |
135 | <div class="col s12"> | 135 | <div class="col s12"> |
136 | <h6 class="grey-text">{{ 'config.form_rss.token_label'|trans }}</h6> | 136 | <h6 class="grey-text">{{ 'config.form_feed.token_label'|trans }}</h6> |
137 | <div> | 137 | <div> |
138 | {% if rss.token %} | 138 | {% if feed.token %} |
139 | {{ rss.token }} | 139 | {{ feed.token }} |
140 | {% else %} | 140 | {% else %} |
141 | <em>{{ 'config.form_rss.no_token'|trans }}</em> | 141 | <em>{{ 'config.form_feed.no_token'|trans }}</em> |
142 | {% endif %} | 142 | {% endif %} |
143 | – <a href="{{ path('generate_token') }}"> | 143 | – <a href="{{ path('generate_token') }}"> |
144 | {% if rss.token %} | 144 | {% if feed.token %} |
145 | {{ 'config.form_rss.token_reset'|trans }} | 145 | {{ 'config.form_feed.token_reset'|trans }} |
146 | {% else %} | 146 | {% else %} |
147 | {{ 'config.form_rss.token_create'|trans }} | 147 | {{ 'config.form_feed.token_create'|trans }} |
148 | {% endif %}</a> | 148 | {% endif %}</a> |
149 | </div> | 149 | </div> |
150 | </div> | 150 | </div> |
151 | </div> | 151 | </div> |
152 | {% if rss.token %} | 152 | {% if feed.token %} |
153 | <div class="row"> | 153 | <div class="row"> |
154 | <div class="col s12"> | 154 | <div class="col s12"> |
155 | <h6 class="grey-text">{{ 'config.form_rss.rss_links'|trans }}</h6> | 155 | <h6 class="grey-text">{{ 'config.form_feed.feed_links'|trans }}</h6> |
156 | <ul> | 156 | <ul> |
157 | <li><a href="{{ path('unread_rss', {'username': rss.username, 'token': rss.token}) }}">{{ 'config.form_rss.rss_link.unread'|trans }}</a></li> | 157 | <li><a href="{{ path('unread_feed', {'username': feed.username, 'token': feed.token}) }}">{{ 'config.form_feed.feed_link.unread'|trans }}</a></li> |
158 | <li><a href="{{ path('starred_rss', {'username': rss.username, 'token': rss.token}) }}">{{ 'config.form_rss.rss_link.starred'|trans }}</a></li> | 158 | <li><a href="{{ path('starred_feed', {'username': feed.username, 'token': feed.token}) }}">{{ 'config.form_feed.feed_link.starred'|trans }}</a></li> |
159 | <li><a href="{{ path('archive_rss', {'username': rss.username, 'token': rss.token}) }}">{{ 'config.form_rss.rss_link.archive'|trans }}</a></li> | 159 | <li><a href="{{ path('archive_feed', {'username': feed.username, 'token': feed.token}) }}">{{ 'config.form_feed.feed_link.archive'|trans }}</a></li> |
160 | <li><a href="{{ path('all_rss', {'username': rss.username, 'token': rss.token}) }}">{{ 'config.form_rss.rss_link.all'|trans }}</a></li> | 160 | <li><a href="{{ path('all_feed', {'username': feed.username, 'token': feed.token}) }}">{{ 'config.form_feed.feed_link.all'|trans }}</a></li> |
161 | </ul> | 161 | </ul> |
162 | </div> | 162 | </div> |
163 | </div> | 163 | </div> |
@@ -165,14 +165,14 @@ | |||
165 | 165 | ||
166 | <div class="row"> | 166 | <div class="row"> |
167 | <div class="input-field col s12"> | 167 | <div class="input-field col s12"> |
168 | {{ form_label(form.rss.rss_limit) }} | 168 | {{ form_label(form.feed.feed_limit) }} |
169 | {{ form_errors(form.rss.rss_limit) }} | 169 | {{ form_errors(form.feed.feed_limit) }} |
170 | {{ form_widget(form.rss.rss_limit) }} | 170 | {{ form_widget(form.feed.feed_limit) }} |
171 | </div> | 171 | </div> |
172 | </div> | 172 | </div> |
173 | 173 | ||
174 | {{ form_widget(form.rss.save, {'attr': {'class': 'btn waves-effect waves-light'}}) }} | 174 | {{ form_widget(form.feed.save, {'attr': {'class': 'btn waves-effect waves-light'}}) }} |
175 | {{ form_rest(form.rss) }} | 175 | {{ form_rest(form.feed) }} |
176 | </form> | 176 | </form> |
177 | </div> | 177 | </div> |
178 | 178 | ||
@@ -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> |
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/material/Config/otp_app.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/material/Config/otp_app.html.twig new file mode 100644 index 00000000..7875d787 --- /dev/null +++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/Config/otp_app.html.twig | |||
@@ -0,0 +1,63 @@ | |||
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 | <div class="row"> | ||
7 | <div class="col s12"> | ||
8 | <div class="card-panel settings"> | ||
9 | <div class="row"> | ||
10 | <h5>{{ 'config.otp.page_title'|trans }}</h5> | ||
11 | |||
12 | <ol> | ||
13 | <li> | ||
14 | <p>{{ 'config.otp.app.two_factor_code_description_1'|trans }}</p> | ||
15 | <p>{{ 'config.otp.app.two_factor_code_description_2'|trans }}</p> | ||
16 | |||
17 | <p> | ||
18 | <img id="2faQrcode" class="hide-on-med-and-down" /> | ||
19 | <script> | ||
20 | document.getElementById('2faQrcode').src = jrQrcode.getQrBase64('{{ qr_code }}'); | ||
21 | </script> | ||
22 | </p> | ||
23 | </li> | ||
24 | <li> | ||
25 | <p>{{ 'config.otp.app.two_factor_code_description_3'|trans }}</p> | ||
26 | |||
27 | <p><strong>{{ backupCodes|join("\n")|nl2br }}</strong></p> | ||
28 | </li> | ||
29 | <li> | ||
30 | <p>{{ 'config.otp.app.two_factor_code_description_4'|trans }}</p> | ||
31 | |||
32 | {% for flashMessage in app.session.flashbag.get("two_factor") %} | ||
33 | <div class="card-panel red darken-1 black-text"> | ||
34 | {{ flashMessage|trans }} | ||
35 | </div> | ||
36 | {% endfor %} | ||
37 | |||
38 | <form class="form" action="{{ path("config_otp_app_check") }}" method="post"> | ||
39 | <div class="card-content"> | ||
40 | <div class="row"> | ||
41 | <div class="input-field col s12"> | ||
42 | <label for="_auth_code">{{ "scheb_two_factor.auth_code"|trans }}</label> | ||
43 | <input id="_auth_code" type="text" autocomplete="off" name="_auth_code" /> | ||
44 | </div> | ||
45 | </div> | ||
46 | </div> | ||
47 | <div class="card-action"> | ||
48 | <a href="{{ path('config_otp_app_cancel') }}" class="waves-effect waves-light grey btn"> | ||
49 | {{ 'config.otp.app.cancel'|trans }} | ||
50 | </a> | ||
51 | <button class="btn waves-effect waves-light" type="submit" name="send"> | ||
52 | {{ 'config.otp.app.enable'|trans }} | ||
53 | <i class="material-icons right">send</i> | ||
54 | </button> | ||
55 | </div> | ||
56 | </form> | ||
57 | </li> | ||
58 | </ol> | ||
59 | </div> | ||
60 | </div> | ||
61 | </div> | ||
62 | </div> | ||
63 | {% endblock %} | ||