Skip to content

Commit

Permalink
Webform style fix and remove required from inputs
Browse files Browse the repository at this point in the history
  • Loading branch information
cykod committed Oct 6, 2010
1 parent 9a0bb81 commit a2ea817
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
9 changes: 5 additions & 4 deletions lib/styled_form_builder_generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -857,15 +857,16 @@ class CmsUnstyledForm < StyledForm



generate_styled_fields('form_options',
generate_styled_fields('unstyled_form_options',
field_helpers + %w(label_field label_option_field country_select collection_select select radio_buttons grouped_check_boxes grouped_radio_buttons grouped_select check_boxes) - %w(check_box radio_button hidden_field) + %w(access_control filemanager_image filemanager_folder filemanager_file price_classes price_range color_field date_field datetime_field upload_image upload_document unsorted_selector content_selector multi_content_selector image_list end_user_selector autocomplete_field ordered_selection_list ordered_array)) do
options[:output]
end

def form_options(tag,field,output,options) #:nodoc:

def unstyled_form_options(tag,field,output,options) #:nodoc:
options = options.symbolize_keys
options[:class] = !options[:class].blank? ? tag.to_s + '_input ' + options[:class].to_s : tag.to_s + '_input'
{
:output => output.call( {:class => options[:class] })
:output => output.call( {:class => options[:class], :required => nil, :noun => nil })
}
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class Webform::PageFeature < ParagraphFeature
<cms:field>
<div class='item'>
<cms:error><div class='error'><cms:value/></div></cms:error>
<div class='label'><cms:label/><cms:required>*</cms:required>:</div>
<div class='label'><cms:label/>:</div>
<div class='field'><cms:control/></div>
</div>
</cms:field>
Expand Down

0 comments on commit a2ea817

Please sign in to comment.