Skip to content

Commit 779ed96

Browse files
bechiratierant
authored andcommitted
Fix typos & remove commented code
1 parent 4c04860 commit 779ed96

File tree

7 files changed

+8
-29
lines changed

7 files changed

+8
-29
lines changed

assets/admin.js

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,6 @@ import Bloodhound from "bloodhound-js";
44
import 'bootstrap-tagsinput';
55

66
$(function() {
7-
// Datetime picker initialization.
8-
// See https://eonasdan.github.io/bootstrap-datetimepicker/
9-
// $('[data-toggle="datetimepicker"]').datetimepicker({
10-
// icons: {
11-
// time: 'fa fa-clock-o',
12-
// date: 'fa fa-calendar',
13-
// up: 'fa fa-chevron-up',
14-
// down: 'fa fa-chevron-down',
15-
// previous: 'fa fa-chevron-left',
16-
// next: 'fa fa-chevron-right',
17-
// today: 'fa fa-check-circle-o',
18-
// clear: 'fa fa-trash',
19-
// close: 'fa fa-remove'
20-
// }
21-
// });
22-
237
// Bootstrap-tagsinput initialization
248
// https://bootstrap-tagsinput.github.io/bootstrap-tagsinput/examples/
259
var $input = $('input[data-toggle="tagsinput"]');

assets/app.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
import './styles/app.scss';
22

33
// loads the Bootstrap jQuery plugins
4-
// import 'bootstrap-sass/assets/javascripts/bootstrap/transition.js';
5-
import 'bootstrap/js/dist/alert';
64
import 'bootstrap/js/dist/alert';
75
import 'bootstrap/js/dist/collapse';
86
import 'bootstrap/js/dist/dropdown';

assets/styles/app.scss

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,8 +154,6 @@ body {
154154

155155
header {
156156
margin-bottom: 2em;
157-
}
158-
159157

160158
.nav-link {
161159
padding: 0 2rem;
@@ -197,6 +195,7 @@ header {
197195
}
198196
}
199197
}
198+
}
200199

201200
.body-container {
202201
flex: 1;

templates/admin/layout.html.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
{% endblock %}
1414

1515
{% block header_navigation_links %}
16-
<li class="nav-item{{ route in ['admin_index', 'admin_post_index'] ? ' active' : '' }}">
16+
<li class="nav-item{{ _route in ['admin_index', 'admin_post_index'] ? ' active' : '' }}">
1717
<a class="nav-link" href="{{ path('admin_post_index') }}">
1818
<i class="fa fa-list-alt" aria-hidden="true"></i> {{ 'menu.post_list'|trans }}
1919
</a>

templates/base.html.twig

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
See https://symfony.com/doc/current/templates.html#template-inheritance-and-layouts
55
#}
66

7-
{% set route = app.request.get('_route') %}
7+
{% set _route = app.request.get('_route') %}
88

99
<!DOCTYPE html>
1010
<html lang="{{ app.request.locale }}">
@@ -44,7 +44,7 @@
4444
<div class="navbar-collapse collapse" id="appNavbar">
4545
<ul class="navbar-nav ml-auto">
4646
{% block header_navigation_links %}
47-
<li class="nav-item{{ route == 'blog_index' ? ' active' : '' }}">
47+
<li class="nav-item{{ _route == 'blog_index' ? ' active' : '' }}">
4848
<a class="nav-link" href="{{ path('blog_index') }}">
4949
<i class="fa fa-home" aria-hidden="true"></i> {{ 'menu.homepage'|trans }}
5050
</a>
@@ -58,7 +58,7 @@
5858
{% endif %}
5959
{% endblock %}
6060

61-
<li class="nav-item{{ route == 'blog_search' ? ' active' : '' }}">
61+
<li class="nav-item{{ _route == 'blog_search' ? ' active' : '' }}">
6262
<a class="nav-link" href="{{ path('blog_search') }}"> <i class="fa fa-search"></i> {{ 'menu.search'|trans }}</a>
6363
</li>
6464

templates/form/layout.html.twig

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,15 @@
22

33
{# Errors #}
44

5-
{#
65
{% block form_errors -%}
76
{% if errors|length > 0 -%}
87
{% if form is not rootform %}<span class="help-block">{% else %}<div class="alert alert-danger">{% endif %}
98
<ul class="list-unstyled">
109
{%- for error in errors -%}
11-
{# use font-awesome icon library # }
10+
{# use font-awesome icon library #}
1211
<li><span class="fa fa-exclamation-triangle"></span> {{ error.message }}</li>
1312
{%- endfor -%}
1413
</ul>
1514
{% if form is not rootform %}</span>{% else %}</div>{% endif %}
1615
{%- endif %}
1716
{%- endblock form_errors %}
18-
#}

tests/Controller/Admin/BlogControllerTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,8 +135,8 @@ public function testAdminNewDuplicatedPost(): void
135135
// post titles must be unique, so trying to create the same post twice should result in an error
136136
$this->client->submit($form);
137137

138-
$this->assertSelectorTextContains('form .invalid-feedback .form-error-message', 'This title was already used in another blog post, but they must be unique.');
139-
$this->assertSelectorExists('form #post_title.is-invalid');
138+
$this->assertSelectorTextSame('form .form-group.has-error label', 'Title');
139+
$this->assertSelectorTextContains('form .form-group.has-error .help-block', 'This title was already used in another blog post, but they must be unique.');
140140
}
141141

142142
public function testAdminShowPost(): void

0 commit comments

Comments
 (0)