README in mbleigh-uberkit-0.0.1 vs README in mbleigh-uberkit-0.0.2

- old
+ new

@@ -14,9 +14,81 @@ To install it as a plugin (Rails 2.1 or later): script/plugin install git://github.com/mbleigh/uberkit.git +UberForms +--------- + +UberForms provide a simple context for building forms in a DRYer +manner by abstracting the markup into a simple, CSS-styleable +format. It is available as a form builder as Uberkit::Forms::Builder, +but is likely more useful when used in one of the helper forms: +uberform_for or remote_uberform_for. + +=== Basic Example + +<% uberform_for :user do |f| %> + <%= f.text_field :login %> + <%= f.password_field :password %> + <%= f.submit "Submit"%> +<% end %> + +Becomes... + +<form method="post" class="uberform" action="/users"> + <div class="field_row"> + <label for="user_login">Login:</label> + <input type="text" size="30" name="user[login]" id="user_login" class="text_field"/> + <br/> + </div> + <div class="field_row"> + <label for="user_password">Password:</label> + <input type="password" size="30" name="user[password]" id="user_password" class="password_field"/> + <br/> + </div> + <button type="submit">Submit</button> +</form> + +=== Labels, Help, and Descriptions + +You can pass options into a given field to set a custom label, +some help text, or a description of the field. + +<%= f.text_field :login, :label => "Username", + :help => "Only a-z and underscores.", + :description => "The name you will use to log in." %> + +Becomes... + +<div class="field_row"> + <label for="user_login">Username:</label> + <input type="text" size="30" name="user[login]" label="Username" id="user_login" help="Only a-z and underscores." description="The name you will use to log in." class="text_field"/> + <span class="help">Only a-z and underscores.</span> + <span class="description">The name you will use to log in.</span> + <br/> +</div> + +=== Custom Fields + +Maybe the built-in form helpers won't do it for you. In that case, you +can use the custom helper to insert arbitrary HTML that still plays +nice with the rest of UberForms: + +<% f.custom :label => "State", :for => "user_state" do |f| %> + <%= state_select :user, :state %> +<% end %> + +Becomes... + +<div class="field_row"> + <label for="user_state">State:</label> + <div class="pseudo_field"> + <select id="user_state">...</select> + </div> + <br/> +</div> + UberMenu -------- UberMenu is the simplest way to generate the markup for CSS menus, including state representation and special hooks for cross-browser