Skip to content

Commit

Permalink
Legislation proposal views changes
Browse files Browse the repository at this point in the history
  • Loading branch information
MariaCheca committed Sep 19, 2017
1 parent 393e9f2 commit 8805037
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 8 deletions.
10 changes: 6 additions & 4 deletions app/views/legislation/proposals/_form.html.erb
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
<%= form_for(@proposal, url: form_url) do |f| %>
<%= render 'shared/errors', resource: @proposal %>
<%= f.hidden_field(:legislation_process_id, :value => params[:process_id]) %>

<div class="row">
<div class="small-12 column">
<%= f.label :title, t("proposals.form.proposal_title") %>
<%= f.text_field :title, maxlength: Proposal.title_max_length, placeholder: t("proposals.form.proposal_title"), label: false, data: {js_suggest_result: "js_suggest_result", js_suggest: "#js-suggest", js_url: suggest_proposals_path}%>
<%= f.text_field :title, maxlength: Legislation::Proposal.title_max_length, placeholder: t("proposals.form.proposal_title"), label: false, data: {js_suggest_result: "js_suggest_result", js_suggest: "#js-suggest", js_url: suggest_proposals_path}%>
</div>
<div id="js-suggest"></div>

Expand All @@ -15,7 +17,7 @@
<p class="help-text" id="question-help-text">
<%= t("proposals.form.proposal_question_example_html") %>
</p>
<%= f.text_field :question, maxlength: Proposal.question_max_length,
<%= f.text_field :question, maxlength: Legislation::Proposal.question_max_length,
placeholder: t("proposals.form.proposal_question"),
label: false,
aria: {describedby: "question-help-text"} %>
Expand All @@ -31,7 +33,7 @@

<div class="ckeditor small-12 column">
<%= f.label :description, t("proposals.form.proposal_text") %>
<%= f.cktext_area :description, maxlength: Proposal.description_max_length, ckeditor: { language: I18n.locale }, label: false %>
<%= f.cktext_area :description, maxlength: Legislation::Proposal.description_max_length, ckeditor: { language: I18n.locale }, label: false %>
</div>

<div class="small-12 column">
Expand All @@ -46,7 +48,7 @@
<%= f.text_field :external_url, placeholder: t("proposals.form.proposal_external_url"), label: false %>
</div>

<div class="documents small-12 column" data-max-documents="<%= Proposal.max_documents_allowed %>">
<div class="documents small-12 column" data-max-documents="<%= Legislation::Proposal.max_documents_allowed %>">
<%= render 'documents/nested_documents', documentable: @proposal %>
</div>

Expand Down
4 changes: 2 additions & 2 deletions app/views/legislation/proposals/_proposal.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@
<p><%= t("proposals.proposal.archived") %></p>
</div>
<% else %>
<%= render 'votes',
{ proposal: proposal, vote_url: vote_proposal_path(proposal, value: 'yes') } %>
<%= render 'legislation/proposals/votes',
{ proposal: proposal, vote_url: vote_legislation_process_proposal_path(proposal.legislation_process_id, proposal, value: 'yes') } %>
<% end %>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion app/views/legislation/proposals/new.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<%= t("proposals.new.more_info")%>
<% end %>
</div>
<%= render "proposals/form", form_url: proposals_url %>
<%= render "legislation/proposals/form", form_url: legislation_process_proposals_url, id: @proposal.id %>
</div>

<div class="small-12 medium-3 column">
Expand Down
2 changes: 1 addition & 1 deletion app/views/legislation/proposals/share.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
<% end %>

<div class="small margin-bottom">
<%= link_to t("proposals.proposal.share.view_proposal"), proposal_path(@proposal) %>
<%= link_to t("proposals.proposal.share.view_proposal"), legislation_process_proposal_path(@proposal.legislation_process_id, @proposal) %>
</div>
</div>

Expand Down

0 comments on commit 8805037

Please sign in to comment.