mirror of
https://github.com/Growstuff/growstuff.git
synced 2026-05-14 11:15:48 -04:00
Bootstrap3: form control groups
This commit is contained in:
@@ -12,17 +12,17 @@
|
||||
=link_to "crop wrangling guide", "http://wiki.growstuff.org/index.php/Crop_wrangling"
|
||||
on the Growstuff wiki.
|
||||
|
||||
.control-group
|
||||
.form-group
|
||||
= f.label :name, :class => 'control-label'
|
||||
.controls
|
||||
= f.text_field :name
|
||||
%span.help-inline Name in US English; singular; capitalize proper nouns only.
|
||||
.control-group
|
||||
.form-group
|
||||
= f.label :en_wikipedia_url, 'Wikipedia URL', :class => 'control-label'
|
||||
.controls
|
||||
= f.text_field :en_wikipedia_url
|
||||
%span.help-inline Link to this crop's page on the English language Wikipedia.
|
||||
.control-group
|
||||
.form-group
|
||||
= f.label :parent_id, 'Parent crop', :class => 'control-label'
|
||||
.controls
|
||||
= collection_select(:crop, :parent_id, Crop.all, :id, :name, {:include_blank => true})
|
||||
|
||||
@@ -5,23 +5,23 @@
|
||||
|
||||
%h2 Email settings
|
||||
|
||||
.control-group
|
||||
.form-group
|
||||
= f.label :email, :class => 'control-label'
|
||||
.controls
|
||||
= f.email_field :email
|
||||
%span.help-inline If you change your email address you will have to reconfirm.
|
||||
|
||||
.control-group
|
||||
.form-group
|
||||
.controls
|
||||
= f.check_box :show_email
|
||||
Show email publicly on your profile page
|
||||
|
||||
.control-group
|
||||
.form-group
|
||||
.controls
|
||||
= f.check_box :send_notification_email
|
||||
Receive emailed copies of Inbox notifications.
|
||||
|
||||
.control-group
|
||||
.form-group
|
||||
.controls
|
||||
= f.check_box :newsletter
|
||||
Subscribe to the #{ENV['GROWSTUFF_SITE_NAME']} newsletter
|
||||
@@ -29,7 +29,7 @@
|
||||
= render :partial => 'newsletter_blurb'
|
||||
|
||||
%h2 Profile details
|
||||
.control-group
|
||||
.form-group
|
||||
%label.control-label
|
||||
Profile picture
|
||||
.controls
|
||||
@@ -40,20 +40,20 @@
|
||||
= succeed "." do
|
||||
= link_to 'gravatar.com', "http://gravatar.com/"
|
||||
|
||||
.control-group
|
||||
.form-group
|
||||
=f.label :location, 'Your location', :class => 'control-label'
|
||||
.controls
|
||||
=f.text_field :location, :autocomplete => "off"
|
||||
%span.help-inline This will be displayed on a map. You can be as detailed or vague as you like.
|
||||
|
||||
.control-group
|
||||
.form-group
|
||||
=f.label :bio, :class => 'control-label'
|
||||
.controls
|
||||
=f.text_area :bio, :rows => 6, :class => 'input-block-level'
|
||||
|
||||
%h2 Linked accounts
|
||||
|
||||
.control-group
|
||||
.form-group
|
||||
.controls
|
||||
%p
|
||||
= image_tag "twitter_32.png", :size => "32x32", :alt => 'Twitter logo'
|
||||
@@ -78,17 +78,17 @@
|
||||
%p
|
||||
%span.help-block Leave blank if you don't want to change your password.
|
||||
|
||||
.control-group
|
||||
.form-group
|
||||
= f.label :current_password, :class => 'control-label'
|
||||
.controls
|
||||
= f.password_field :current_password
|
||||
|
||||
.control-group
|
||||
.form-group
|
||||
= f.label :password, "New password", :class => 'control-label'
|
||||
.controls
|
||||
= f.password_field :password, :autocomplete => "off"
|
||||
|
||||
.control-group
|
||||
.form-group
|
||||
= f.label :password_confirmation, :class => 'control-label'
|
||||
.controls= f.password_field :password_confirmation
|
||||
|
||||
|
||||
@@ -5,33 +5,33 @@
|
||||
= form_for(resource, :as => resource_name, :url => registration_path(resource_name), :html => {:class => "form-horizontal"}) do |f|
|
||||
= devise_error_messages!
|
||||
|
||||
.control-group
|
||||
.form-group
|
||||
= f.label :login_name, :class => "control-label"
|
||||
.controls
|
||||
= f.text_field :login_name
|
||||
%span.help-inline This is the name that will show on the website.
|
||||
|
||||
.control-group
|
||||
.form-group
|
||||
= f.label :email, :class => "control-label"
|
||||
.controls
|
||||
= f.email_field :email
|
||||
%span.help-inline We'll use this address to contact you (we never spam!)
|
||||
|
||||
.control-group
|
||||
.form-group
|
||||
= f.label :password, :class => "control-label"
|
||||
.controls= f.password_field :password
|
||||
|
||||
.control-group
|
||||
.form-group
|
||||
= f.label :password_confirmation, :class => "control-label"
|
||||
.controls= f.password_field :password_confirmation
|
||||
|
||||
.control-group
|
||||
.form-group
|
||||
.controls
|
||||
= f.check_box :tos_agreement
|
||||
I agree to the
|
||||
= succeed "." do
|
||||
= link_to 'Terms of Service', url_for(:action => 'tos', :controller => '/policy')
|
||||
.control-group
|
||||
.form-group
|
||||
.controls
|
||||
= f.check_box :newsletter, :checked => true
|
||||
Subscribe to the #{ENV['GROWSTUFF_SITE_NAME']} newsletter
|
||||
|
||||
@@ -3,16 +3,16 @@
|
||||
= form_for(resource, :as => resource_name, :url => session_path(resource_name), :html => {:class => "form-horizontal"}) do |f|
|
||||
= devise_error_messages!
|
||||
|
||||
.control-group
|
||||
.form-group
|
||||
= f.label :login, :class => "control-label"
|
||||
.controls= f.text_field :login
|
||||
|
||||
.control-group
|
||||
.form-group
|
||||
= f.label :password, :class => "control-label"
|
||||
.controls= f.password_field :password
|
||||
|
||||
- if devise_mapping.rememberable?
|
||||
.control-group
|
||||
.form-group
|
||||
.controls
|
||||
= f.check_box :remember_me
|
||||
Remember me
|
||||
|
||||
@@ -6,13 +6,13 @@
|
||||
- @forum.errors.full_messages.each do |msg|
|
||||
%li= msg
|
||||
|
||||
.control-group
|
||||
.form-group
|
||||
= f.label :name, :class => 'control-label'
|
||||
.controls= f.text_field :name, :class => 'input-block-level'
|
||||
.control-group
|
||||
.form-group
|
||||
= f.label :description, :class => 'control-label'
|
||||
.controls= f.text_area :description, :rows => 6, :class => 'input-block-level'
|
||||
.control-group
|
||||
.form-group
|
||||
= f.label :owner_id, :class => 'control-label'
|
||||
.controls= collection_select(:forum, :owner_id, Member.all, :id, :login_name)
|
||||
.form-actions
|
||||
|
||||
@@ -6,17 +6,17 @@
|
||||
- @garden.errors.full_messages.each do |msg|
|
||||
%li= msg
|
||||
|
||||
.control-group
|
||||
.form-group
|
||||
= f.label :name, :class => 'control-label'
|
||||
.controls
|
||||
= f.text_field :name
|
||||
|
||||
.control-group
|
||||
.form-group
|
||||
= f.label :description, :class => 'control-label'
|
||||
.controls
|
||||
= f.text_area :description, :rows => 6
|
||||
|
||||
.control-group
|
||||
.form-group
|
||||
= f.label :location, :class => 'control-label'
|
||||
.controls
|
||||
= f.text_field :location, :value => @garden.location || current_member.location
|
||||
@@ -28,13 +28,13 @@
|
||||
- else
|
||||
=link_to "Change your location.", edit_member_registration_path
|
||||
|
||||
.control-group
|
||||
.form-group
|
||||
= f.label :area, :class => 'control-label'
|
||||
.controls
|
||||
= f.number_field :area, :class => 'input-small'
|
||||
= f.select(:area_unit, Garden::AREA_UNITS_VALUES, {:include_blank => false}, :class => 'input-medium')
|
||||
|
||||
.control-group
|
||||
.form-group
|
||||
= f.label 'Active? ', :class => 'control-label'
|
||||
.controls
|
||||
= f.check_box :active
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
- @harvest.errors.full_messages.each do |msg|
|
||||
%li= msg
|
||||
|
||||
.control-group
|
||||
.form-group
|
||||
= f.label 'What did you harvest?', :class => 'control-label'
|
||||
.controls
|
||||
= collection_select(:harvest, :crop_id, Crop.all, :id, :name, :selected => @harvest.crop_id || @crop.id)
|
||||
@@ -15,11 +15,11 @@
|
||||
Can't find what you're looking for?
|
||||
= link_to "Request new crops.", Growstuff::Application.config.new_crops_request_link
|
||||
|
||||
.control-group
|
||||
.form-group
|
||||
= f.label 'When?', :class => 'control-label'
|
||||
.controls= f.text_field :harvested_at, :value => @harvest.harvested_at ? @harvest.harvested_at.to_s(:ymd) : '', :class => 'add-datepicker'
|
||||
|
||||
.control-group
|
||||
.form-group
|
||||
= f.label 'How many?', :class => 'control-label'
|
||||
.controls
|
||||
-# Some browsers (eg Firefox for Android) assume "number" means
|
||||
@@ -28,13 +28,13 @@
|
||||
= f.number_field :quantity, :class => 'input-small', :step => 'any'
|
||||
= f.select(:unit, Harvest::UNITS_VALUES, {:include_blank => false}, :class => 'input-medium')
|
||||
|
||||
.control-group
|
||||
.form-group
|
||||
= f.label 'Weighing:', :class => 'control-label'
|
||||
.controls
|
||||
= f.number_field :weight_quantity, :class => 'input-small', :step => 'any'
|
||||
= f.select(:weight_unit, Harvest::WEIGHT_UNITS_VALUES, {:include_blank => false}, :class => 'input-medium')
|
||||
in total
|
||||
.control-group
|
||||
.form-group
|
||||
= f.label 'Notes', :class => 'control-label'
|
||||
.controls= f.text_area :description, :rows => 6
|
||||
|
||||
|
||||
@@ -6,35 +6,35 @@
|
||||
- @planting.errors.full_messages.each do |msg|
|
||||
%li= msg
|
||||
|
||||
.control-group
|
||||
.form-group
|
||||
= f.label 'What did you plant?', :class => 'control-label'
|
||||
.controls
|
||||
= collection_select(:planting, :crop_id, Crop.all, :id, :name, :selected => @planting.crop_id || @crop.id)
|
||||
%span.help-inline
|
||||
Can't find what you're looking for?
|
||||
= link_to "Request new crops.", Growstuff::Application.config.new_crops_request_link
|
||||
.control-group
|
||||
.form-group
|
||||
= f.label 'Where did you plant it?', :class => 'control-label'
|
||||
.controls
|
||||
= collection_select(:planting, :garden_id, Garden.active.where(:owner_id => current_member), :id, :name, :selected => @planting.garden_id || @garden.id)
|
||||
%span.help-inline
|
||||
= link_to "Add a garden.", new_garden_path
|
||||
.control-group
|
||||
.form-group
|
||||
= f.label 'When?', :class => 'control-label'
|
||||
.controls= f.text_field :planted_at, :value => @planting.planted_at ? @planting.planted_at.to_s(:ymd) : '', :class => 'add-datepicker'
|
||||
.control-group
|
||||
.form-group
|
||||
= f.label 'How many?', :class => 'control-label'
|
||||
.controls
|
||||
= f.number_field :quantity, :class => 'input-small'
|
||||
.control-group
|
||||
.form-group
|
||||
= f.label 'Planted from:', :class => 'control-label'
|
||||
.controls
|
||||
= f.select(:planted_from, Planting::PLANTED_FROM_VALUES, {:include_blank => true})
|
||||
.control-group
|
||||
.form-group
|
||||
= f.label 'Sun or shade?', :class => 'control-label'
|
||||
.controls
|
||||
= f.select(:sunniness, Planting::SUNNINESS_VALUES, {:include_blank => true})
|
||||
.control-group
|
||||
.form-group
|
||||
= f.label 'Tell us more about it', :class => 'control-label'
|
||||
.controls= f.text_area :description, :rows => 6
|
||||
|
||||
|
||||
@@ -25,6 +25,6 @@
|
||||
.field
|
||||
= f.label :paid_months
|
||||
= f.text_field :paid_months
|
||||
.control-group
|
||||
.form-group
|
||||
.actions
|
||||
= f.submit 'Save'
|
||||
|
||||
@@ -12,11 +12,11 @@
|
||||
=link_to "crop wrangling guide", "http://wiki.growstuff.org/index.php/Crop_wrangling"
|
||||
on the Growstuff wiki.
|
||||
|
||||
.control-group
|
||||
.form-group
|
||||
= f.label :crop_id, :class => 'control-label'
|
||||
.controls
|
||||
= collection_select(:scientific_name, :crop_id, Crop.all, :id, :name, :selected => @scientific_name.crop_id || @crop.id)
|
||||
.control-group
|
||||
.form-group
|
||||
= f.label :scientific_name, :class => 'control-label'
|
||||
.controls
|
||||
= f.text_field :scientific_name
|
||||
|
||||
@@ -6,20 +6,20 @@
|
||||
- @seed.errors.full_messages.each do |msg|
|
||||
%li= msg
|
||||
|
||||
.control-group
|
||||
.form-group
|
||||
= f.label 'Crop:', :class => 'control-label'
|
||||
.controls= collection_select(:seed, :crop_id, Crop.all, :id, :name, :selected => @seed.crop_id || @crop.id)
|
||||
.control-group
|
||||
.form-group
|
||||
= f.label 'Quantity:', :class => 'control-label'
|
||||
.controls
|
||||
= f.number_field :quantity, :class => 'input-small'
|
||||
.control-group
|
||||
.form-group
|
||||
= f.label 'Plant before:', :class => 'control-label'
|
||||
.controls= f.text_field :plant_before, :value => @seed.plant_before ? @seed.plant_before.to_s(:ymd) : '', :class => 'add-datepicker'
|
||||
.control-group
|
||||
.form-group
|
||||
= f.label 'Description:', :class => 'control-label'
|
||||
.controls= f.text_area :description, :rows => 6
|
||||
.control-group
|
||||
.form-group
|
||||
= f.label 'Will trade:', :class => 'control-label'
|
||||
.controls
|
||||
= f.select(:tradable_to,
|
||||
|
||||
Reference in New Issue
Block a user