Skip to content

Commit

Permalink
Merge pull request #401 from alphagov/tweak-debate-states
Browse files Browse the repository at this point in the history
Small tweaks to the debate functionality
  • Loading branch information
pixeltrix committed Oct 19, 2015
2 parents fd37dda + dc6ec11 commit 1ed58e9
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,18 @@
<%= f.text_area :overview, tabindex: increment, class: 'form-control' %>
<% end %>

<h3 class="petition-action-subheading">Was this petition debated?</h3>

<%= form_row class: 'inline' do %>
<%= f.label :debated_true, nil, class: 'block-label' do %>
<%= f.radio_button :debated, true %> Yes
<% end %>
<%= f.label :debated_false, nil, class: 'block-label' do %>
<%= f.radio_button :debated, false %> No
<% end %>
<%= error_messages_for_field petition, :debated %>
<% end %>

<div class="debate-outcome-controls" style="overflow: hidden; clear: left;">
<%= form_row :for => [f.object, :debated_on] do %>
<%= f.label :debated_on, class: 'form-label' %>
Expand All @@ -26,20 +38,8 @@
<% end %>
</div>

<h3 class="petition-action-subheading">Was this petition debated?</h3>

<%= form_row class: 'inline' do %>
<%= f.label :debated_true, nil, class: 'block-label' do %>
<%= f.radio_button :debated, true %> Yes
<% end %>
<%= f.label :debated_false, nil, class: 'block-label' do %>
<%= f.radio_button :debated, false %> No
<% end %>
<%= error_messages_for_field petition, :debated %>
<% end %>
<%= f.submit "Save without emailing", name: 'save', class: 'button-secondary' %>
<%= email_petitioners_with_count_submit_button(f, petition) %>
<%= f.submit "Save without emailing", name: 'save', class: 'button-secondary' %>
<% end -%>
<%= javascript_tag do %>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
<%= f.text_area :details, rows: 8, cols: 70, tabindex: increment, class: 'form-control' %>
<% end %>
<%= f.submit "Save without emailing", name: 'save', class: 'button-secondary' %>
<%= email_petitioners_with_count_submit_button(f, petition) %>
<%= f.submit "Save without emailing", name: 'save', class: 'button-secondary' %>
<% end -%>
<%= javascript_include_tag 'character-counter' %>
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
<%= f.date_field :scheduled_debate_date, tabindex: increment, class: 'form-control' %>
<% end %>
<%= f.submit "Save without emailing", name: 'save', class: 'button-secondary' %>
<%= email_petitioners_with_count_submit_button(f, petition) %>
<%= f.submit "Save without emailing", name: 'save', class: 'button-secondary' %>
<% end %>
3 changes: 3 additions & 0 deletions app/views/petitions/_debate_threshold.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@
</section>
<% else %>
<h2 id="debate-threshold-heading">The Petitions Committee decided not to debate this petition</h2>
<% if debate_outcome.overview? -%>
<%= auto_link(simple_format(h(debate_outcome.overview)), html: { rel: 'nofollow' }) %>
<% end -%>
<% end %>
<%# Has a debate date #%>
<% elsif petition.scheduled_debate_date? -%>
Expand Down
2 changes: 1 addition & 1 deletion config/locales/petitions.en-GB.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ en-GB:
awaiting_debate: "Awaiting a debate in Parliament (%{quantity})"

list_headers:
not_debated: "The Petitions Committee decided not to debate these petition"
not_debated: "The Petitions Committee decided not to debate these petitions"

facets:
public:
Expand Down

0 comments on commit 1ed58e9

Please sign in to comment.