CSS class set for button_html is added to wrapper_html #442

Closed
manuelmeurer opened this Issue Nov 16, 2010 · 2 comments

Projects

None yet

2 participants

@manuelmeurer
Contributor

Example:

= f.buttons do
  = f.commit_button 'Log in', :button_html => { :class => 'my-button-class' }

should (and did) generate:

<fieldset class="buttons">
  <ol>
    <li class="commit create">
      <input class="my-button-class create" id="admin_user_submit" name="commit" type="submit" value="Log in" />
    </li>
  </ol>
</fieldset>

but generates:

<fieldset class="buttons">
  <ol>
    <li class="commit my-button-class create">
      <input class="my-button-class create" id="admin_user_submit" name="commit" type="submit" value="Log in" />
    </li>
  </ol>
</fieldset>

The class 'my-button-class' is added to the li-wrapper as well but should only be added to the input.

The change is here:
eed0029#L0R379

@justinfrench
Owner

Resolved in 80c11ae, please test by bundling master into your app, will be in next patch release (1.2.2). Closing for now.

@manuelmeurer
Contributor

Works beautifully, thanks for the fix.

@sterrym sterrym pushed a commit to sterrym/formtastic that referenced this issue Apr 26, 2011
@justinfrench resolves #442 by not merging the button_html class into the wrapper_h…
…tml class
80c11ae
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment