Skip to content

Commit 4b0cda3

Browse files
committed
minor #438 Tweaked the admin form views (javiereguiluz)
This PR was squashed before being merged into the master branch (closes #438). Discussion ---------- Tweaked the admin form views * Removed the author email from the form (you can only create posts for yourself) * Added some help messages for form fields (they are not displayed to the end-user yet) * Tweaks to the design of the error messages: | Before | After | --- | --- | ![before-error](https://cloud.githubusercontent.com/assets/73419/22024956/2056efd0-dccc-11e6-93fd-4bcd5c2b401a.png) | ![after-error](https://cloud.githubusercontent.com/assets/73419/22024959/20f2fa24-dccc-11e6-846b-c5338cba3511.png) Commits ------- 4aadb5a Tweaked the admin form views
2 parents 8e8719d + 4aadb5a commit 4b0cda3

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

app/Resources/views/admin/blog/new.html.twig

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,7 @@
1212
{{ form_row(form.publishedAt) }}
1313

1414
<input type="submit" value="{{ 'label.create_post'|trans }}" class="btn btn-primary" />
15-
1615
{{ form_widget(form.saveAndCreateNew, { label: 'label.save_and_create_new', attr: { class: 'btn btn-primary' } }) }}
17-
1816
<a href="{{ path('admin_post_index') }}" class="btn btn-link">
1917
{{ 'action.back_to_list'|trans }}
2018
</a>

web/css/main.css

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,9 +147,13 @@ footer #footer-resources i {
147147
padding: 1em
148148
}
149149

150-
.form-group.has-error .help-block ul {
150+
.form-group.has-error .help-block ul,
151+
.form-group.has-error .help-block li {
151152
margin-bottom: 0
152153
}
154+
.form-group.has-error .help-block li + li {
155+
margin-top: 0.5em;
156+
}
153157

154158
textarea {
155159
max-width: 100%

0 commit comments

Comments
 (0)