-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
changed syntax to use semantic instead of standard and enhanced helpe…
…r naming consistency
- Loading branch information
Showing
26 changed files
with
995 additions
and
96 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
8 | ||
|
||
dir | ||
860 | ||
svn+ssh://nate@74.205.71.69/home/svnowner/repository/openPresenceRubyOnRails/trunk/vendor/plugins/semantic_form_builder | ||
svn+ssh://nate@74.205.71.69/home/svnowner/repository | ||
|
||
|
||
|
||
2008-04-14T04:36:21.422973Z | ||
795 | ||
nate | ||
|
||
|
||
svn:special svn:externals svn:needs-lock | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
75e973b7-daca-42f5-98ca-6c0bed327aa9 | ||
|
||
.git | ||
dir | ||
|
||
MIT-LICENSE | ||
file | ||
|
||
|
||
|
||
|
||
2008-04-14T04:27:50.000000Z | ||
ef8a8411d1f142aee549cd9a00a720d5 | ||
2008-04-14T04:36:21.422973Z | ||
795 | ||
nate | ||
|
||
README | ||
file | ||
|
||
|
||
|
||
|
||
2008-04-14T04:28:57.000000Z | ||
c7b90e76696dbea2cacf887aac4c1ddf | ||
2008-04-14T04:36:21.422973Z | ||
795 | ||
nate | ||
|
||
Rakefile | ||
file | ||
|
||
|
||
|
||
|
||
2008-04-14T04:27:50.000000Z | ||
3ac693f850bd232d80f07057e2adfa05 | ||
2008-04-14T04:36:21.422973Z | ||
795 | ||
nate | ||
|
||
init.rb | ||
file | ||
|
||
|
||
|
||
|
||
2008-04-14T04:27:50.000000Z | ||
b1cb018155b176780c6105f4a47ba407 | ||
2008-04-14T04:36:21.422973Z | ||
795 | ||
nate | ||
has-props | ||
|
||
lib | ||
dir | ||
|
||
tasks | ||
dir | ||
|
||
test | ||
dir | ||
|
||
uninstall.rb | ||
file | ||
|
||
|
||
|
||
|
||
2008-04-14T04:27:50.000000Z | ||
2a5fc883fe7f8dfe22ced24643d59ad4 | ||
2008-04-14T04:36:21.422973Z | ||
795 | ||
nate | ||
has-props | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
K 13 | ||
svn:mime-type | ||
V 10 | ||
text/plain | ||
END |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
K 13 | ||
svn:mime-type | ||
V 10 | ||
text/plain | ||
END |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
Copyright (c) 2008 [name of plugin creator] | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining | ||
a copy of this software and associated documentation files (the | ||
"Software"), to deal in the Software without restriction, including | ||
without limitation the rights to use, copy, modify, merge, publish, | ||
distribute, sublicense, and/or sell copies of the Software, and to | ||
permit persons to whom the Software is furnished to do so, subject to | ||
the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be | ||
included in all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | ||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | ||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | ||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE | ||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION | ||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION | ||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
SemanticFormBuilder | ||
=================== | ||
|
||
Installation | ||
============ | ||
|
||
To install, simply add a clone of the git repository to the vendor/plugins directory | ||
|
||
$ cd /path/to/rails/app | ||
$ git clone git@github.com:xgamerx/semantic_form_builder.git vendor/plugins/semantic_form_builder | ||
|
||
Overview | ||
======== | ||
|
||
This class is a standardized form builder which works to create semantically correct forms, | ||
each field with the appropriate label and wrapped within a definition list item in order to | ||
represent a list of items using proper xhtml markup. | ||
|
||
The tags allowed are as follows: | ||
|
||
* fieldset(name:string, &block) - wraps the rest of the form items in a definition list | ||
* text_field_item (attribute:symbol, options_hash:hash) | ||
* password_field_item (attribute:symbol, options_hash:hash) | ||
* file_field_item (attribute:symbol, options_hash:hash) | ||
* text_area_item (attribute:symbol, options_hash:hash) | ||
* check_box_item (attribute:symbol, options_hash:hash) | ||
* radio_button_group (attribute:symbol, options_hash:hash) | ||
* submit_button (label:string) - create a submit button in a definition item | ||
|
||
Example | ||
======= | ||
|
||
This form builder is rather easy to use as the example illustrates: | ||
|
||
- standard_form_for :user, :url => users_path do |f| | ||
- f.fieldset 'Register' do | ||
= f.text_field_item :login, :label => 'Login' | ||
= f.text_field_item :email, :label => 'Email' | ||
= f.password_field_item :password, :label => 'Password' | ||
= f.password_field_item :password_confirmation, :label => 'Password Confirmation' | ||
= f.submit_button 'Sign up' | ||
|
||
which generates the following semantically valid markup: | ||
|
||
<form method="post" action="/users"> | ||
<fieldset> | ||
<legend>Register</legend> | ||
<dl class = "standard-form"> | ||
<dt><label for="user_login">Login:</label></dt> | ||
<dd><input type="text" size="30" name="user[login]" id="user_login"/></dd> | ||
|
||
<dt><label for="user_email">Email:</label></dt> | ||
<dd><input type="text" size="30" name="user[email]" id="user_email"/></dd> | ||
|
||
<dt><label for="user_password">Password:</label></dt> | ||
<dd><input type="password" size="30" name="user[password]" id="user_password"/></dd> | ||
|
||
<dt><label for="user_password_confirmation">Password Confirmation:</label></dt> | ||
<dd><input type="password" size="30" name="user[password_confirmation]" id="user_password_confirmation"/></dd> | ||
|
||
<dt class="button"/> | ||
<dd class="button"><input type="submit" value="Sign up" name="commit"/></dd> | ||
</dl> | ||
</fieldset> | ||
</form> | ||
|
||
|
||
Copyright (c) 2008 Nathan Esquenazi, released under the MIT license |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
require 'rake' | ||
require 'rake/testtask' | ||
require 'rake/rdoctask' | ||
|
||
desc 'Default: run unit tests.' | ||
task :default => :test | ||
|
||
desc 'Test the semantic_form_builder plugin.' | ||
Rake::TestTask.new(:test) do |t| | ||
t.libs << 'lib' | ||
t.pattern = 'test/**/*_test.rb' | ||
t.verbose = true | ||
end | ||
|
||
desc 'Generate documentation for the semantic_form_builder plugin.' | ||
Rake::RDocTask.new(:rdoc) do |rdoc| | ||
rdoc.rdoc_dir = 'rdoc' | ||
rdoc.title = 'SemanticFormBuilder' | ||
rdoc.options << '--line-numbers' << '--inline-source' | ||
rdoc.rdoc_files.include('README') | ||
rdoc.rdoc_files.include('lib/**/*.rb') | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
require 'semantic_form_builder' | ||
require 'semantic_form_helpers' | ||
ActionView::Base.send :include, SemanticFormBuilder::Helpers |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# Uninstall hook code here |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
8 | ||
|
||
dir | ||
860 | ||
svn+ssh://nate@74.205.71.69/home/svnowner/repository/openPresenceRubyOnRails/trunk/vendor/plugins/semantic_form_builder/lib | ||
svn+ssh://nate@74.205.71.69/home/svnowner/repository | ||
|
||
|
||
|
||
2008-04-14T04:36:21.422973Z | ||
795 | ||
nate | ||
|
||
|
||
svn:special svn:externals svn:needs-lock | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
75e973b7-daca-42f5-98ca-6c0bed327aa9 | ||
|
||
semantic_form_builder.rb | ||
file | ||
|
||
|
||
|
||
|
||
2008-04-14T04:27:50.000000Z | ||
9a3c475f406067192ea5a5e033ac6070 | ||
2008-04-14T04:36:21.422973Z | ||
795 | ||
nate | ||
has-props | ||
|
||
semantic_form_helpers.rb | ||
file | ||
|
||
|
||
|
||
|
||
2008-04-14T04:27:50.000000Z | ||
3a949a79d57c3ec03c3b9ccffad57d5e | ||
2008-04-14T04:36:21.422973Z | ||
795 | ||
nate | ||
has-props | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
K 13 | ||
svn:mime-type | ||
V 10 | ||
text/plain | ||
END |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
K 13 | ||
svn:mime-type | ||
V 10 | ||
text/plain | ||
END |
Oops, something went wrong.