diff options
author | Jeremy Benoist <jeremy.benoist@gmail.com> | 2016-03-05 20:04:19 +0100 |
---|---|---|
committer | Jeremy Benoist <jeremy.benoist@gmail.com> | 2016-03-05 20:04:19 +0100 |
commit | 2c2308b7830e24409c6f4a52b52a616803b1a515 (patch) | |
tree | 7a4346147cbe5621230343cc4c99cab2e46350a3 /src/Wallabag | |
parent | 5bf8f3f164aa95f844a3f4faaa19987a2ea39a99 (diff) | |
download | wallabag-2c2308b7830e24409c6f4a52b52a616803b1a515.tar.gz wallabag-2c2308b7830e24409c6f4a52b52a616803b1a515.tar.zst wallabag-2c2308b7830e24409c6f4a52b52a616803b1a515.zip |
Cleanup form
- Avoid too much hidden data in the form (instead of manually define the submit button and hide the default, use the default one !)
- Fix HTML syntax in client_parameters
- Add developer link in baggy menu
- Fix space between link in material footer
Diffstat (limited to 'src/Wallabag')
12 files changed, 16 insertions, 20 deletions
diff --git a/src/Wallabag/CoreBundle/Controller/DeveloperController.php b/src/Wallabag/CoreBundle/Controller/DeveloperController.php index 4688aeef..30cc8beb 100644 --- a/src/Wallabag/CoreBundle/Controller/DeveloperController.php +++ b/src/Wallabag/CoreBundle/Controller/DeveloperController.php | |||
@@ -35,7 +35,7 @@ class DeveloperController extends Controller | |||
35 | $clientForm->handleRequest($request); | 35 | $clientForm->handleRequest($request); |
36 | 36 | ||
37 | if ($clientForm->isValid()) { | 37 | if ($clientForm->isValid()) { |
38 | $client->setAllowedGrantTypes(array('token', 'authorization_code','password')); | 38 | $client->setAllowedGrantTypes(array('token', 'authorization_code', 'password')); |
39 | $em->persist($client); | 39 | $em->persist($client); |
40 | $em->flush(); | 40 | $em->flush(); |
41 | 41 | ||
diff --git a/src/Wallabag/CoreBundle/Form/Type/ClientType.php b/src/Wallabag/CoreBundle/Form/Type/ClientType.php index 79feae65..cb6b5e65 100644 --- a/src/Wallabag/CoreBundle/Form/Type/ClientType.php +++ b/src/Wallabag/CoreBundle/Form/Type/ClientType.php | |||
@@ -15,7 +15,7 @@ class ClientType extends AbstractType | |||
15 | { | 15 | { |
16 | $builder | 16 | $builder |
17 | ->add('redirect_uris', UrlType::class, array('required' => true)) | 17 | ->add('redirect_uris', UrlType::class, array('required' => true)) |
18 | ->add('save', SubmitType::class) | 18 | ->add('save', SubmitType::class, array('label' => 'Create new client')) |
19 | ; | 19 | ; |
20 | 20 | ||
21 | $builder->get('redirect_uris') | 21 | $builder->get('redirect_uris') |
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Developer/client.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Developer/client.html.twig index 061f4631..5cbe1c39 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Developer/client.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Developer/client.html.twig | |||
@@ -8,20 +8,20 @@ | |||
8 | <div class="card-panel settings"> | 8 | <div class="card-panel settings"> |
9 | 9 | ||
10 | <div class="row"> | 10 | <div class="row"> |
11 | <p>{% trans %}You will create a new client. Please fill the field below for the redirect URI of your application:{% endtrans %}</p> | 11 | <p>{% trans %}You are about to create a new client. Please fill the field below for the redirect URI of your application:{% endtrans %}</p> |
12 | {{ form_start(form) }} | 12 | {{ form_start(form) }} |
13 | {{ form_errors(form) }} | 13 | {{ form_errors(form) }} |
14 | |||
14 | <div class="input-field col s12"> | 15 | <div class="input-field col s12"> |
15 | {{ form_label(form.redirect_uris) }} | 16 | {{ form_label(form.redirect_uris) }} |
16 | {{ form_errors(form.redirect_uris) }} | 17 | {{ form_errors(form.redirect_uris) }} |
17 | {{ form_widget(form.redirect_uris) }} | 18 | {{ form_widget(form.redirect_uris) }} |
18 | </div> | 19 | </div> |
19 | <div class="hidden">{{ form_rest(form) }}</div> | ||
20 | 20 | ||
21 | <a href="{{ path('developer') }}" class="waves-effect waves-light grey btn">{% trans %}Back{% endtrans %}</a> | 21 | <a href="{{ path('developer') }}" class="waves-effect waves-light grey btn">{% trans %}Back{% endtrans %}</a> |
22 | <button class="btn waves-effect waves-light" type="submit" name="action"> | 22 | {{ form_widget(form.save, {'attr': {'class': 'btn waves-effect waves-light'}}) }} |
23 | {% trans %}Create new client{% endtrans %} | 23 | |
24 | </button> | 24 | {{ form_rest(form) }} |
25 | </div> | 25 | </div> |
26 | 26 | ||
27 | </div> | 27 | </div> |
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Developer/client_parameters.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Developer/client_parameters.html.twig index 8e3966b9..a2a28d50 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Developer/client_parameters.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Developer/client_parameters.html.twig | |||
@@ -17,8 +17,6 @@ | |||
17 | <a href="{{ path('developer') }}" class="waves-effect waves-light grey btn">{% trans %}Back{% endtrans %}</a> | 17 | <a href="{{ path('developer') }}" class="waves-effect waves-light grey btn">{% trans %}Back{% endtrans %}</a> |
18 | <a href="{{ path('howto-firstapp') }}" class="btn waves-effect waves-light">{% trans %}Read the howto "Create my first application"{% endtrans %}</a> | 18 | <a href="{{ path('howto-firstapp') }}" class="btn waves-effect waves-light">{% trans %}Read the howto "Create my first application"{% endtrans %}</a> |
19 | </div> | 19 | </div> |
20 | </div> | ||
21 | |||
22 | </div> | 20 | </div> |
23 | </div> | 21 | </div> |
24 | </div> | 22 | </div> |
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Developer/howto_app.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Developer/howto_app.html.twig index 497bb308..88788776 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Developer/howto_app.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Developer/howto_app.html.twig | |||
@@ -58,5 +58,5 @@ X-Powered-By: PHP/5.5.9-1ubuntu4.13 | |||
58 | </div> | 58 | </div> |
59 | </div> | 59 | </div> |
60 | </div> | 60 | </div> |
61 | <script src="{{ asset('bundles/wallabagcore/themes/_global/js/prism.js') }}"></script> | 61 | <script src="{{ asset('bundles/wallabagcore/themes/_global/js/prism.js') }}"></script> |
62 | {% endblock %} | 62 | {% endblock %} |
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Developer/index.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Developer/index.html.twig index b983883f..87dd4a5f 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Developer/index.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Developer/index.html.twig | |||
@@ -28,5 +28,4 @@ | |||
28 | </div> | 28 | </div> |
29 | </div> | 29 | </div> |
30 | 30 | ||
31 | |||
32 | {% endblock %} | 31 | {% endblock %} |
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/layout.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/layout.html.twig index 84604762..7f098066 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/layout.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/layout.html.twig | |||
@@ -56,6 +56,7 @@ | |||
56 | {% endif %} | 56 | {% endif %} |
57 | <li><a href="{{ path('import') }}">{% trans %}import{% endtrans %}</a></li> | 57 | <li><a href="{{ path('import') }}">{% trans %}import{% endtrans %}</a></li> |
58 | <li><a href="{{ path('howto') }}">{% trans %}howto{% endtrans %}</a></li> | 58 | <li><a href="{{ path('howto') }}">{% trans %}howto{% endtrans %}</a></li> |
59 | <li><a href="{{ path('developer') }}">{% trans %}Developer{% endtrans %}</a></li> | ||
59 | <li><a href="{{ path('about') }}">{% trans %}about{% endtrans %}</a></li> | 60 | <li><a href="{{ path('about') }}">{% trans %}about{% endtrans %}</a></li> |
60 | <li><a class="icon icon-power" href="{{ path('fos_user_security_logout') }}" title="{% trans %}logout{% endtrans %}">{% trans %}logout{% endtrans %}</a></li> | 61 | <li><a class="icon icon-power" href="{{ path('fos_user_security_logout') }}" title="{% trans %}logout{% endtrans %}">{% trans %}logout{% endtrans %}</a></li> |
61 | </ul> | 62 | </ul> |
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/material/Developer/client.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/material/Developer/client.html.twig index 061f4631..5cbe1c39 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/material/Developer/client.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/Developer/client.html.twig | |||
@@ -8,20 +8,20 @@ | |||
8 | <div class="card-panel settings"> | 8 | <div class="card-panel settings"> |
9 | 9 | ||
10 | <div class="row"> | 10 | <div class="row"> |
11 | <p>{% trans %}You will create a new client. Please fill the field below for the redirect URI of your application:{% endtrans %}</p> | 11 | <p>{% trans %}You are about to create a new client. Please fill the field below for the redirect URI of your application:{% endtrans %}</p> |
12 | {{ form_start(form) }} | 12 | {{ form_start(form) }} |
13 | {{ form_errors(form) }} | 13 | {{ form_errors(form) }} |
14 | |||
14 | <div class="input-field col s12"> | 15 | <div class="input-field col s12"> |
15 | {{ form_label(form.redirect_uris) }} | 16 | {{ form_label(form.redirect_uris) }} |
16 | {{ form_errors(form.redirect_uris) }} | 17 | {{ form_errors(form.redirect_uris) }} |
17 | {{ form_widget(form.redirect_uris) }} | 18 | {{ form_widget(form.redirect_uris) }} |
18 | </div> | 19 | </div> |
19 | <div class="hidden">{{ form_rest(form) }}</div> | ||
20 | 20 | ||
21 | <a href="{{ path('developer') }}" class="waves-effect waves-light grey btn">{% trans %}Back{% endtrans %}</a> | 21 | <a href="{{ path('developer') }}" class="waves-effect waves-light grey btn">{% trans %}Back{% endtrans %}</a> |
22 | <button class="btn waves-effect waves-light" type="submit" name="action"> | 22 | {{ form_widget(form.save, {'attr': {'class': 'btn waves-effect waves-light'}}) }} |
23 | {% trans %}Create new client{% endtrans %} | 23 | |
24 | </button> | 24 | {{ form_rest(form) }} |
25 | </div> | 25 | </div> |
26 | 26 | ||
27 | </div> | 27 | </div> |
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/material/Developer/client_parameters.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/material/Developer/client_parameters.html.twig index 8e3966b9..a2a28d50 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/material/Developer/client_parameters.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/Developer/client_parameters.html.twig | |||
@@ -17,8 +17,6 @@ | |||
17 | <a href="{{ path('developer') }}" class="waves-effect waves-light grey btn">{% trans %}Back{% endtrans %}</a> | 17 | <a href="{{ path('developer') }}" class="waves-effect waves-light grey btn">{% trans %}Back{% endtrans %}</a> |
18 | <a href="{{ path('howto-firstapp') }}" class="btn waves-effect waves-light">{% trans %}Read the howto "Create my first application"{% endtrans %}</a> | 18 | <a href="{{ path('howto-firstapp') }}" class="btn waves-effect waves-light">{% trans %}Read the howto "Create my first application"{% endtrans %}</a> |
19 | </div> | 19 | </div> |
20 | </div> | ||
21 | |||
22 | </div> | 20 | </div> |
23 | </div> | 21 | </div> |
24 | </div> | 22 | </div> |
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/material/Developer/howto_app.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/material/Developer/howto_app.html.twig index 497bb308..88788776 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/material/Developer/howto_app.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/Developer/howto_app.html.twig | |||
@@ -58,5 +58,5 @@ X-Powered-By: PHP/5.5.9-1ubuntu4.13 | |||
58 | </div> | 58 | </div> |
59 | </div> | 59 | </div> |
60 | </div> | 60 | </div> |
61 | <script src="{{ asset('bundles/wallabagcore/themes/_global/js/prism.js') }}"></script> | 61 | <script src="{{ asset('bundles/wallabagcore/themes/_global/js/prism.js') }}"></script> |
62 | {% endblock %} | 62 | {% endblock %} |
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/material/Developer/index.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/material/Developer/index.html.twig index b983883f..87dd4a5f 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/material/Developer/index.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/Developer/index.html.twig | |||
@@ -28,5 +28,4 @@ | |||
28 | </div> | 28 | </div> |
29 | </div> | 29 | </div> |
30 | 30 | ||
31 | |||
32 | {% endblock %} | 31 | {% endblock %} |
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/material/layout.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/material/layout.html.twig index 46aab5dc..82bd9a1d 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/material/layout.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/layout.html.twig | |||
@@ -117,6 +117,7 @@ | |||
117 | <p>{% trans %}powered by{% endtrans %} <a target="_blank" href="https://wallabag.org" class="grey-text text-lighten-4">wallabag</a></p> | 117 | <p>{% trans %}powered by{% endtrans %} <a target="_blank" href="https://wallabag.org" class="grey-text text-lighten-4">wallabag</a></p> |
118 | <a class="grey-text text-lighten-4 right" href="{{ path('about') }}">{% trans %}About{% endtrans %}</a> | 118 | <a class="grey-text text-lighten-4 right" href="{{ path('about') }}">{% trans %}About{% endtrans %}</a> |
119 | <a class="grey-text text-lighten-4 right" href="{{ path('developer') }}">{% trans %}Developer{% endtrans %} | 119 | <a class="grey-text text-lighten-4 right" href="{{ path('developer') }}">{% trans %}Developer{% endtrans %} |
120 | - | ||
120 | </div> | 121 | </div> |
121 | </div> | 122 | </div> |
122 | </footer> | 123 | </footer> |