KickstartWithBootstrap
KickstartWithBootstrap copied to clipboard
bug in renderEditor.template - g:select - 'class' attribute written twice in several places
The class="form-control" is overwritten (if I may use the term as its not exactly on override) in the following places causing the g:select tag to render only the second class element. For the lines outlined below the form-control needs to be incorporated in the appropriate following line. The current code cause the g:select tag to ignore the class="form-control"
One:
private renderManyToOne(domainClass,property)
line:95
sb << '<g:select class="form-control"'
overwritten by:
line:103
sb << ' class="many-to-one"'
Two:
private renderManyToMany(domainClass, property)
line:120
sb << '<g:select class="form-control" name="' << property.name << '"'
overwritten by:
line:127
sb << ' class="many-to-many"'
Three: a)
private renderNumberEditor(domainClass, property)
line:153
return "<g:select class='form-control' name=\"${property.name}\" from=\"\${-128..127}\" class=\"range\" value=\"\${fieldValue(bean: ${domainInstance}, field: '${property.name}')}\" />"
class='form-control'
overwritten by:
class=\"range\"
b)
line:160:
sb << '<g:select class="form-control" name="' << property.name <<
overwritten by:
line:162
sb << ' class="range"'
I should probably clarify - the way the renderEditor.template is right now it renders the <g:select ...> tag with two class attributes and the first one seems to be ignored (for example the many-to-many):
<g:select class="form-control" name="name" from="form" multiple="multiple" optionKey="id" size="5" required="" value="value" class="many-to-many"/>
where the
class="form-control"
appears in the beginning of the tag, and the
class="many-to-many"
appears at the end. The browser then seems to disregard the first class attribute (granted tested only in Chrome)