Browse files

conforming ERB templates to styleguide

  • Loading branch information...
1 parent b2ba604 commit d43dab00e1bd8b9e7b21f5bfa84f46e8236c727c @benilovj benilovj committed Dec 13, 2012
View
12 app/views/campaign_requests/_campaign_details.html.erb
@@ -1,14 +1,14 @@
<%= f.semantic_fields_for :campaign do |r| %>
<%= r.inputs :name => "Campaign details" do %>
- <%= r.input :title, :label => "Campaign title", :required => true, :input_html => {:class => "span6", :"aria-required" => true} %>
+ <%= r.input :title, label: "Campaign title", required: true, input_html: {:class => "span6", :"aria-required" => true} %>
- <%= r.input :erg_reference_number, :label => "ERG reference number", :required => true, :input_html => {:class => "span6", :"aria-required" => true} %>
+ <%= r.input :erg_reference_number, label: "ERG reference number", required: true, input_html: {:class => "span6", :"aria-required" => true} %>
- <%= r.input :start_date, :label => "Start date", :required => false, :input_html => {:"calendar-enabled" => true, :placeholder => "dd-mm-YYYY", :value => r.object.start_date} %>
- <%= r.input :description, :as => :text, :label => "Campaign description", :required => true, :input_html => {:class => "span6", :rows => 6, :cols => 50, :"aria-required" => true } %>
+ <%= r.input :start_date, label: "Start date", required: false, input_html: {:"calendar-enabled" => true, :placeholder => "dd-mm-YYYY", :value => r.object.start_date} %>
+ <%= r.input :description, as: :text, label: "Campaign description", required: true, input_html: {:class => "span6", :rows => 6, :cols => 50, :"aria-required" => true } %>
- <%= r.input :affiliated_group_or_company, :label => "Group or company affiliated with this campaign", :required => false, :input_html => {:class => "span6"} %>
+ <%= r.input :affiliated_group_or_company, label: "Group or company affiliated with this campaign", required: false, input_html: { class: "span6" } %>
- <%= r.input :info_url, :label => "URL with more information", :required => false, :input_html => {:class => "span6"} %>
+ <%= r.input :info_url, label: "URL with more information", required: false, input_html: { class: "span6" } %>
<% end %>
<% end %>
View
8 app/views/content_change_requests/_request_details.html.erb
@@ -1,6 +1,6 @@
-<%= render :partial => "support/request_context", :locals => {:f => f} %>
+<%= render partial: "support/request_context", locals: { f: f } %>
-<%= f.inputs :name => "URL affected" do %>
- <%= f.input :url, :label => "URL", :input_html => {:class => "span6", :placeholder => "https://www.gov.uk/"} %>
- <%= f.input :details_of_change, :as => :text, :label => "Details of the requested change", :required => :true, :input_html => {:class => "span6", :rows => 6, :cols => 50, :"aria-required" => true } %>
+<%= f.inputs name: "URL affected" do %>
+ <%= f.input :url, label: "URL", input_html: { class: "span6", placeholder: "https://www.gov.uk/" } %>
+ <%= f.input :details_of_change, as: :text, label: "Details of the requested change", required: true, input_html: { :class => "span6", :rows => 6, :cols => 50, :"aria-required" => true } %>
<% end %>
View
6 app/views/create_new_user_requests/_request_details.html.erb
@@ -1,7 +1,7 @@
-<%= render :partial => 'support/tool_role_choice', :locals => {:f => f} %>
+<%= render partial: 'support/tool_role_choice', locals: { f: f } %>
<div id="user_details" %>
- <%= render :partial => 'requested_user_details', :locals => {:f => f} %>
+ <%= render partial: 'requested_user_details', locals: { f: f } %>
</div>
-<%= f.input :additional_comments, :as => :text, :label => "Additional comments", :input_html => {:class => "span6", :rows => 6, :cols => 50 } %>
+<%= f.input :additional_comments, as: :text, label: "Additional comments", input_html: { class: "span6", rows: 6, cols: 50 } %>
View
8 app/views/create_new_user_requests/_requested_user_details.html.erb
@@ -1,8 +1,8 @@
<%= f.semantic_fields_for :requested_user do |r| %>
<%= r.inputs :name => "User details" do %>
- <%= r.input :name, :label => "Name", :required => true, :input_html => {:"aria-required" => true, :class => "span6"} %>
- <%= r.input :email, :label => "Email", :as => :email, :required => true, :input_html => {:"aria-required" => true, :class => "span6"} %>
- <%= r.input :job, :label => "Job title", :required => true, :input_html => {:"aria-required" => true, :class => "span6"} %>
- <%= r.input :phone, :label => "Phone number", :as => :phone, :required => false, :input_html => {:class => "span6"} %>
+ <%= r.input :name, label: "Name", required: true, input_html: { :"aria-required" => true, :class => "span6" } %>
+ <%= r.input :email, label: "Email", as: :email, required: true, input_html: { :"aria-required" => true, :class => "span6" } %>
+ <%= r.input :job, label: "Job title", required: true, input_html: { :"aria-required" => true, :class => "span6" } %>
+ <%= r.input :phone, label: "Phone number", as: :phone, required: false, input_html: { class: "span6" } %>
<% end %>
<% end %>
View
4 app/views/general_requests/_request_details.html.erb
@@ -1,5 +1,5 @@
<%= f.inputs "Details of your problem, request or suggestion" do %>
- <%= f.input :additional, :as => :text, :label => "Details", :input_html => {:class => "span6", :rows => 6, :cols => 50 } %>
+ <%= f.input :additional, as: :text, label: "Details", input_html: { class: "span6", rows: 6, cols: 50 } %>
- <%= f.input :url, :label => "URL (if applicable)", :input_html => {:class => "span6"} %>
+ <%= f.input :url, label: "URL (if applicable)", input_html: { class: "span6" } %>
<% end %>
View
8 app/views/new_feature_requests/_request_details.html.erb
@@ -1,9 +1,9 @@
-<%= render :partial => "support/request_context", :locals => {:f => f} %>
+<%= render partial: "support/request_context", locals: { f: f } %>
-<%= f.inputs :name => "Details of the new feature/need" do %>
+<%= f.inputs name: "Details of the new feature/need" do %>
- <%= f.input :user_need, :as => :text, :required => :true, :label => "What is the user need/feature request?", :input_html => {:"aria-required" => true, :class => "span6", :rows => 6, :cols => 50 } %>
+ <%= f.input :user_need, as: :text, required: true, label: "What is the user need/feature request?", input_html: { :"aria-required" => true, :class => "span6", :rows => 6, :cols => 50 } %>
- <%= f.input :url_of_example, :label => "Can you provide a link to an example of this feature?", :input_html => {:class => "span6", :placeholder => "http://www.example.com/"} %>
+ <%= f.input :url_of_example, label: "Can you provide a link to an example of this feature?", input_html: { class: "span6", placeholder: "http://www.example.com/" } %>
<% end %>
View
2 app/views/new_feature_requests/new.html.erb
@@ -2,7 +2,7 @@
<%= content_for :header, "Request a new feature/need" %>
<div class="well">
- <%= semantic_form_for @request, :url => { :action => "create" }, :html => { :novalidate => false } do |f| %>
+ <%= semantic_form_for @request, url: { action: "create" }, html: { novalidate: false } do |f| %>
<%= render partial: "support/requester", locals: { f: f, show_collaborators: true } %>
View
10 app/views/remove_user_requests/_request_details.html.erb
@@ -1,15 +1,15 @@
-<%= render :partial => 'support/tool_role_choice', :locals => {:f => f} %>
+<%= render partial: 'support/tool_role_choice', locals: { f: f } %>
<div id="user_details" %>
<%= f.inputs "User details" do %>
- <%= f.input :user_name, :label => "Name", :required => true, :input_html => {:class => "span6", :"aria-required" => true } %>
+ <%= f.input :user_name, label: "Name", required: true, input_html: {:class => "span6", :"aria-required" => true } %>
- <%= f.input :user_email, :as => :email, :label => "Email", :required => true, :input_html => {:class => "span6", :"aria-required" => true } %>
+ <%= f.input :user_email, as: :email, label: "Email", required: true, input_html: { :class => "span6", :"aria-required" => true } %>
<%= f.semantic_fields_for :time_constraint do |r| %>
- <%= r.input :not_before_date, :label => "MUST NOT be removed BEFORE", :required => false, :input_html => {:"calendar-enabled" => true, :placeholder => "dd-mm-YYYY", :value => r.object.not_before_date} %>
+ <%= r.input :not_before_date, label: "MUST NOT be removed BEFORE", required: false, input_html: { :"calendar-enabled" => true, :placeholder => "dd-mm-YYYY", :value => r.object.not_before_date } %>
<% end %>
- <%= f.input :reason_for_removal, :as => :text, :label => "Reason for removal", :input_html => {:class => "span6", :rows => 6, :cols => 50 } %>
+ <%= f.input :reason_for_removal, as: :text, label: "Reason for removal", input_html: { class: "span6", rows: 6, cols: 50 } %>
<% end %>
</div>
View
2 app/views/support/_request_context.html.erb
@@ -1,3 +1,3 @@
<div id="request-context">
- <%= f.input :request_context, :as => :radio, :required => true, :label => "Which part of GOV.UK is this about?", :collection => f.object.request_context_options, :input_html => {:"aria-required" => true} %>
+ <%= f.input :request_context, as: :radio, required: true, label: "Which part of GOV.UK is this about?", collection: f.object.request_context_options, input_html: { :"aria-required" => true } %>
</div>
View
4 app/views/support/_requester.html.erb
@@ -1,6 +1,6 @@
<%= f.semantic_fields_for :requester do |r| %>
- <%= r.input :email, :label => "Your email", :as => :email, :required => true, :input_html => {:"aria-required" => true, :class => "span6"} %>
+ <%= r.input :email, label: "Your email", as: :email, required: true, input_html: { :"aria-required" => true, :class => "span6" } %>
<% if show_collaborators %>
- <%= r.input :collaborator_emails, :label => "Should anybody else be copied in on this request? (comma-separated list of emails)",:required => false, :input_html => {:class => "span6", :value => r.object.collaborator_emails.join(", ") } %>
+ <%= r.input :collaborator_emails, label: "Should anybody else be copied in on this request? (comma-separated list of emails)", required: false, input_html: { class: "span6", value: r.object.collaborator_emails.join(", ") } %>
<% end %>
<% end %>
View
8 app/views/support/_time_constraint.html.erb
@@ -1,7 +1,7 @@
<%= f.semantic_fields_for :time_constraint do |r| %>
- <%= r.inputs :name => "Are there any time constraints? (Optional)" do %>
- <%= r.input :needed_by_date, :label => "MUST be published by", :required => false, :input_html => {:"calendar-enabled" => true, :placeholder => "dd-mm-YYYY", :value => r.object.needed_by_date} %>
- <%= r.input :not_before_date, :label => "MUST NOT be published BEFORE", :required => false, :input_html => {:"calendar-enabled" => true, :placeholder => "dd-mm-YYYY", :value => r.object.not_before_date} %>
- <%= r.input :time_constraint_reason, :as => :text, :label => "Reason for the above dates", :required => false, :input_html => {:class => "span6", :rows => 6, :cols => 50 } %>
+ <%= r.inputs name: "Are there any time constraints? (Optional)" do %>
+ <%= r.input :needed_by_date, label: "MUST be published by", required: false, input_html: { :"calendar-enabled" => true, :placeholder => "dd-mm-YYYY", :value => r.object.needed_by_date } %>
+ <%= r.input :not_before_date, label: "MUST NOT be published BEFORE", required: false, input_html: { :"calendar-enabled" => true, :placeholder => "dd-mm-YYYY", :value => r.object.not_before_date } %>
+ <%= r.input :time_constraint_reason, as: :text, label: "Reason for the above dates", required: false, input_html: { class: "span6", rows: 6, cols: 50 } %>
<% end %>
<% end %>
View
2 app/views/support/_tool_role_choice.html.erb
@@ -1,3 +1,3 @@
<div id="tool-role-choice">
- <%= f.input :tool_role, :as => :radio, :required => true, :label => "Which tool/role is this about?", :collection => f.object.tool_role_options, :input_html => {:"aria-required" => true} %>
+ <%= f.input :tool_role, as: :radio, required: true, label: "Which tool/role is this about?", collection: f.object.tool_role_options, input_html: { :"aria-required" => true } %>
</div>

0 comments on commit d43dab0

Please sign in to comment.