Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Print missing 'selected' attribute if matches or an empty quotes and …
…recompile
  • Loading branch information
bocharsky-bw committed Aug 7, 2017
1 parent 6e765f6 commit ae26ba0
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions _tuts/cleanup-going-back-to-nice-date-field.diff
@@ -1,5 +1,5 @@
diff --git a/app/Resources/views/admin/genus/_form.html.twig b/app/Resources/views/admin/genus/_form.html.twig
index 9866bd1..5732a80 100644
index ba0f459..5732a80 100644
--- a/app/Resources/views/admin/genus/_form.html.twig
+++ b/app/Resources/views/admin/genus/_form.html.twig
@@ -18,18 +18,6 @@
Expand All @@ -10,7 +10,7 @@ index 9866bd1..5732a80 100644
- <select id="{{ genusForm.firstDiscoveredAt.year.vars.id }}"
- name="{{ genusForm.firstDiscoveredAt.year.vars.full_name }}">
- {% for choice in genusForm.firstDiscoveredAt.year.vars.choices %}
- <option value="{{ choice.value }}" {{ choice.value == genusForm.firstDiscoveredAt.year.vars.data }}>{{ choice.label }}</option>
- <option value="{{ choice.value }}" {{ choice.value == genusForm.firstDiscoveredAt.year.vars.data ? 'selected' : '' }}>{{ choice.label }}</option>
- {% endfor %}
- </select>
- {{ form_errors(genusForm.firstDiscoveredAt.year) }}
Expand Down
2 changes: 1 addition & 1 deletion _tuts/steps.json
Expand Up @@ -1431,5 +1431,5 @@
"description": null
}
],
"sha": "18e12420f7a38aa58462d377fdb6cf3b8580e1bb"
"sha": "6e765f657fd20b8bcffa6daa81034aff6742c215"
}
2 changes: 1 addition & 1 deletion _tuts/vars-in-tpl-mark-field-as-rendered.diff
@@ -1,5 +1,5 @@
diff --git a/app/Resources/views/admin/genus/_form.html.twig b/app/Resources/views/admin/genus/_form.html.twig
index fb80089..9866bd1 100644
index da01a0c..ba0f459 100644
--- a/app/Resources/views/admin/genus/_form.html.twig
+++ b/app/Resources/views/admin/genus/_form.html.twig
@@ -26,6 +26,7 @@
Expand Down
4 changes: 2 additions & 2 deletions _tuts/vars-in-tpl-render-year-by-hand.diff
@@ -1,5 +1,5 @@
diff --git a/app/Resources/views/admin/genus/_form.html.twig b/app/Resources/views/admin/genus/_form.html.twig
index f52ff75..fb80089 100644
index f52ff75..da01a0c 100644
--- a/app/Resources/views/admin/genus/_form.html.twig
+++ b/app/Resources/views/admin/genus/_form.html.twig
@@ -18,7 +18,15 @@
Expand All @@ -11,7 +11,7 @@ index f52ff75..fb80089 100644
+ <select id="{{ genusForm.firstDiscoveredAt.year.vars.id }}"
+ name="{{ genusForm.firstDiscoveredAt.year.vars.full_name }}">
+ {% for choice in genusForm.firstDiscoveredAt.year.vars.choices %}
+ <option value="{{ choice.value }}" {{ choice.value == genusForm.firstDiscoveredAt.year.vars.data }}>{{ choice.label }}</option>
+ <option value="{{ choice.value }}" {{ choice.value == genusForm.firstDiscoveredAt.year.vars.data ? 'selected' : '' }}>{{ choice.label }}</option>
+ {% endfor %}
+ </select>
+ {{ form_errors(genusForm.firstDiscoveredAt.year) }}
Expand Down

0 comments on commit ae26ba0

Please sign in to comment.