Skip to content

Commit

Permalink
Fixed formatting and html example output in README
Browse files Browse the repository at this point in the history
  • Loading branch information
Sebastian Roebke committed Oct 28, 2009
1 parent 361bb05 commit b6ab1c0
Showing 1 changed file with 17 additions and 13 deletions.
30 changes: 17 additions & 13 deletions README.rdoc
Original file line number Diff line number Diff line change
@@ -1,25 +1,29 @@
=ClassyFieldErrors

==PURPOSE
==Purpose
Provide clean html/css handling of form fields with errors. Rails wraps error input fields with a div, to provide styling. We just add the css class directly to the error form field.

==WHY
==Why
The default rails way can break html structure, and destroy placement/styling. We saw this happen mainly when you wrap form fields inside label tags.

==RESULT
* Normal Rails html/css for error input fields
<div class="fieldWithErrors"><input class="input-error test">Test</input></div>
* New output
<input class="input-error test">Test</input>
==Result
<b>Normal Rails html/css for error input fields</b>

<div class="fieldWithErrors"><input>Test</input></div>

<b>New output</b>

<input class="input-error">Test</input>

This works on input, textarea and select elements.


==HOW TO USE
* script/plugin install git://github.com/xing/classy_field_errors.git
* Put the css contained in field_error_proc.css in your base css file


==DESCRIPTION
==How to use
* Install the plugin via <tt>script/plugin install git://github.com/xing/classy_field_errors.git</tt>
* Put the css contained in <tt>sample/field_error_proc.css</tt> in your base css file


==Description

Longer explanation and context for this plugin here: {Making Errors Look Good}[http://blog.xing.com/2009/10/making-errors-look-good/]

Expand Down

0 comments on commit b6ab1c0

Please sign in to comment.