Skip to content
This repository was archived by the owner on Oct 31, 2018. It is now read-only.
This repository was archived by the owner on Oct 31, 2018. It is now read-only.

bug in renderEditor.template - g:select - 'class' attribute written twice in several places #80

Open

Description

@pbb6w7

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"'

Activity

  1. pbb6w7 commented on Mar 16, 2014

    @pbb6w7
    Author

    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)

  2. added a commit that references this issue on Sep 26, 2014
    d70f959
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions