diff --git a/app/assets/stylesheets/application.scss b/app/assets/stylesheets/application.scss index 7aca741dd..da217b874 100644 --- a/app/assets/stylesheets/application.scss +++ b/app/assets/stylesheets/application.scss @@ -13,6 +13,7 @@ @import "dashboard"; @import "legislation"; @import "legislation_process"; +@import "legislation_process_form"; @import "community"; @import "stats"; @import "custom"; diff --git a/app/assets/stylesheets/legislation_process_form.scss b/app/assets/stylesheets/legislation_process_form.scss new file mode 100644 index 000000000..14ccdf86e --- /dev/null +++ b/app/assets/stylesheets/legislation_process_form.scss @@ -0,0 +1,35 @@ +.legislation-process-form { + fieldset { + margin: $fieldset-padding 0; + padding-bottom: $fieldset-padding; + position: relative; + + &::after { + border-bottom: $fieldset-border; + bottom: 0; + content: ""; + display: block; + margin-left: rem-calc(16); + position: absolute; + width: calc(100% - #{2 * rem-calc(16)}); + + @include breakpoint(small only) { + margin-left: rem-calc(10); + width: calc(100% - #{2 * rem-calc(10)}); + } + } + + > :last-child { + float: left !important; + } + + legend { + margin-bottom: 0; + + > * { + display: block; + font-weight: normal; + } + } + } +} diff --git a/app/views/admin/legislation/processes/_form.html.erb b/app/views/admin/legislation/processes/_form.html.erb index 9c5945334..16bfb5daf 100644 --- a/app/views/admin/legislation/processes/_form.html.erb +++ b/app/views/admin/legislation/processes/_form.html.erb @@ -1,14 +1,14 @@ <%= render "shared/globalize_locales", resource: @process %> -<%= translatable_form_for [:admin, @process] do |f| %> +<%= translatable_form_for [:admin, @process], html: { class: "legislation-process-form" } do |f| %> <%= render "shared/errors", resource: @process %> -
-
- -

<%= t("admin.legislation.processes.form.draft_phase_description") %>

-
+
+ + <%= t("admin.legislation.processes.form.draft_phase") %> + <%= t("admin.legislation.processes.form.draft_phase_description") %> +
<%= f.text_field :draft_start_date, @@ -26,14 +26,12 @@
<%= f.check_box :draft_phase_enabled, checked: @process.draft_phase.enabled?, label: t("admin.legislation.processes.form.enabled") %>
+
-
-
-
- -
- -
+
+ + <%= t("admin.legislation.processes.form.process") %> +
<%= f.text_field :start_date, @@ -51,14 +49,12 @@
<%= f.check_box :published, checked: @process.published?, label: t("admin.legislation.processes.form.enabled") %>
+
-
-
-
- -
- -
+
+ + <%= t("admin.legislation.processes.form.debate_phase") %> +
<%= f.text_field :debate_start_date, @@ -76,14 +72,12 @@
<%= f.check_box :debate_phase_enabled, checked: @process.debate_phase.enabled?, label: t("admin.legislation.processes.form.enabled") %>
+
-
-
-
- -
- -
+
+ + <%= t("admin.legislation.processes.form.proposals_phase") %> +
<%= f.text_field :proposals_phase_start_date, @@ -101,14 +95,12 @@
<%= f.check_box :proposals_phase_enabled, checked: @process.proposals_phase.enabled?, label: t("admin.legislation.processes.form.enabled") %>
+
-
-
-
- -
- -
+
+ + <%= t("admin.legislation.processes.form.allegations_phase") %> +
<%= f.text_field :allegations_start_date, @@ -126,11 +118,9 @@
<%= f.check_box :allegations_phase_enabled, checked: @process.allegations_phase.enabled?, label: t("admin.legislation.processes.form.enabled") %>
+
-
-
-
- +
<%= f.text_field :draft_publication_date, value: format_date_for_calendar_form(@process.draft_publication_date), @@ -140,11 +130,9 @@
<%= f.check_box :draft_publication_enabled, checked: @process.draft_publication.enabled?, label: t("admin.legislation.processes.form.enabled") %>
+
-
-
-
- +
<%= f.text_field :result_publication_date, value: format_date_for_calendar_form(@process.result_publication_date), @@ -154,11 +142,9 @@
<%= f.check_box :result_publication_enabled, checked: @process.result_publication.enabled?, label: t("admin.legislation.processes.form.enabled") %>
+
-
-
-
- +
<%= render "documents/nested_documents", documentable: @process, f: f %>