diff --git a/app/views/contact_us/contacts/new.html.erb b/app/views/contact_us/contacts/new.html.erb index bfebccb..c4d2f30 100644 --- a/app/views/contact_us/contacts/new.html.erb +++ b/app/views/contact_us/contacts/new.html.erb @@ -64,15 +64,15 @@ <%= recaptcha_tags %> <% end %> - -
-
- <%= render partial: 'shared/accessible_submit_button', - locals: {id: 'create_contact_submit', - val: 'Submit', - disabled_initially: true, - tooltip: _('Fill in required fields')} %> -
+ +
+ + <%= render partial: 'shared/accessible_submit_button', + locals: {id: 'create_contact_submit', + val: 'Submit', + disabled_initially: true, + tooltip: _('Fill in the required fields')} %> +
<% end %> diff --git a/app/views/devise/registrations/edit.html.erb b/app/views/devise/registrations/edit.html.erb index 3b38eaf..6bbbf14 100644 --- a/app/views/devise/registrations/edit.html.erb +++ b/app/views/devise/registrations/edit.html.erb @@ -5,18 +5,16 @@ <%= _("Please note that your email address is used as your username. If you change this, remember to use your new email address on sign in.") %>

- <%= form_for(resource, as: resource_name, url: registration_path(resource_name), html: {method: :put, class: "side-by-side"}) do |f| %> -
- + <%= form_for(resource, as: resource_name, url: registration_path(resource_name), html: {method: :put, class: "roadmap-form white_background"}) do |f| %> -
+
<%= _('You can edit any of the details below.') %> <%= hidden_field_tag :unlink_flag, "false", id: "unlink_flag" %>
<%= f.label :email, _('Email') + " *" %> - <%= f.email_field :email, as: :email, class: "left-indent input-medium has-tooltip", + <%= f.email_field :email, as: :email, class: "input-medium has-tooltip", "data-toggle": "tooltip", "data-trigger": "focus", "title": _('Please enter your current password below when changing your email address.') %>
@@ -25,7 +23,7 @@ <%= f.text_field :firstname, as: :string, id: "first_time_login_firstname", autofocus: true, - class: "left-indent input-medium has-tooltip", + class: "input-medium has-tooltip", "data-toggle" => "tooltip", "data-trigger" => "focus" , "title" => _('Please enter your first name.') %> @@ -33,7 +31,7 @@
<%= f.label :surname, _('Last name') + " *" %> <%= f.text_field :surname, as: :string, id: "first_time_login_surname", - class: "left-indent input-medium has-tooltip", "data-toggle" => "tooltip", + class: "input-medium has-tooltip", "data-toggle" => "tooltip", "data-trigger" => "focus" , "title" => _('Please enter your surname or family name.') %>
@@ -45,7 +43,7 @@ default_selection: @default_org, models: @orgs, attribute: 'name', - classes: 'input-large indent-left'} %> + classes: 'fixed-width-large'} %>
<% if MANY_LANGUAGES %> @@ -53,7 +51,7 @@ <% lang = current_user.language.nil? ? FastGettext.default_locale : current_user.language.abbreviation %> <%= f.label :language, _('Language') %> + + - - - - - <% end %> diff --git a/app/views/phases/_add_note.html.erb b/app/views/phases/_add_note.html.erb index c8063f8..51e81e2 100644 --- a/app/views/phases/_add_note.html.erb +++ b/app/views/phases/_add_note.html.erb @@ -8,24 +8,17 @@ <%= form_for( :new_note, url: notes_path, remote: true, - method: :post, - id: "new_note_form_#{questionid}", - class: "add_note_form") do |f| %> + html: {method: :post, class: "add_note_form roadmap-form"}, + id: "new_note_form_#{questionid}") do |f| %> <%= f.hidden_field :user_id, value: current_user.id %> <%= f.hidden_field :question_id, value: questionid %> <%= f.hidden_field :answer_id, value: answer.id %> <%= f.hidden_field :plan_id, value: plan_id %> -
+
<%= label_tag "#{questionid}new_note_text", _('Share note with collaborators') %> <%= text_area_tag "#{questionid}new_note_text", nil, class: "tinymce" %> <%= tinymce :content_css => asset_path("application.css"), :setup => "function(editor){editor.on('change', function(e){$.fn.check_textarea(editor)});}" %> +
- -
- -
- <%= f.submit _('Save'), class: "form-submit inline new_comment_submit_button" %> -
-
<% end %> diff --git a/app/views/phases/_answer_form.html.erb b/app/views/phases/_answer_form.html.erb index c0bc699..a1e295a 100644 --- a/app/views/phases/_answer_form.html.erb +++ b/app/views/phases/_answer_form.html.erb @@ -19,8 +19,8 @@ %>
- <%= semantic_form_for answer, :url => {controller: :answers, action: :update }, method: "put", remote: true do |f| %> -
+ <%= semantic_form_for answer, :url => {controller: :answers, action: :update }, html: {method: "put", class: "roadmap-form"}, remote: true do |f| %> +
<%= f.input :id, as: :hidden, input_html: { value: answer.id } %> <%= f.input :plan_id, as: :hidden, input_html: { value: @plan.id } %> <%= f.input :user_id, as: :hidden, input_html: { value: current_user.id } %> @@ -95,12 +95,13 @@ <%= text_area_tag("answer-text-#{question_id}".to_sym, answer.text, class: "tinymce") %> <% end %> + + + + +
- -
- - - + <% end %>
@@ -110,8 +111,6 @@ <%= _('Answered')%> <%= answer.updated_at.iso8601 %><%= _(' by')%> <%= answer.user.name %> <% end %> - -
diff --git a/app/views/phases/_edit_note.html.erb b/app/views/phases/_edit_note.html.erb index 5a45c88..17a75bc 100644 --- a/app/views/phases/_edit_note.html.erb +++ b/app/views/phases/_edit_note.html.erb @@ -3,18 +3,13 @@ <%= form_for(note, url: note_path(note), remote: true, - method: :put, - class: "edit_note_form", + html: {method: :put, class: "edit_note_form roadmap-form"}, id: "edit_note_form_#{note.id}") do |f| %> +
<%= f.hidden_field :id, :value => note.id %> <%= text_area_tag("#{note.id}_note_text".to_sym, note.text , class: "tinymce") %> -
- - -
- <%= f.submit _('Save'), :class => "form-submit inline edit_note_submit_button" %> -
-
+ <%= f.submit _('Save'), :class => "form-submit edit_note_submit_button" %> +
<%end%> diff --git a/app/views/plans/_available_templates.html.erb b/app/views/plans/_available_templates.html.erb index 90c4878..59eb6fa 100644 --- a/app/views/plans/_available_templates.html.erb +++ b/app/views/plans/_available_templates.html.erb @@ -4,7 +4,7 @@ <%= _('Select a template') %> - <%= raw @templates.collect{|t| "" }.join('') %> diff --git a/app/views/plans/_plan_details.html.erb b/app/views/plans/_plan_details.html.erb index 81d2f2d..7012938 100644 --- a/app/views/plans/_plan_details.html.erb +++ b/app/views/plans/_plan_details.html.erb @@ -10,55 +10,55 @@
"> <%= form_for @plan, url: {controller: :plans, action: :update }, - html: {method: :put, class: "side-by-side"} do |f| %> + html: {method: :put, class: "roadmap-form"} do |f| %>
-
+
<%= _('Please fill in the basic project details below') %>
<%= f.label :title, _('Plan name') %> - <%= f.text_field :title, class: "left-indent input-large has-tooltip", 'data-toggle': "tooltip", + <%= f.text_field :title, class: "input-large has-tooltip", 'data-toggle': "tooltip", 'title': _('If applying for funding, state the name exactly as in the grant proposal.') %>
<%= f.label :identifier, _('ID') %> - <%= f.text_field :identifier, class: 'left-indent input-medium has-tooltip', 'data-toggle': "tooltip", + <%= f.text_field :identifier, class: 'input-medium has-tooltip', 'data-toggle': "tooltip", 'title': _('A pertinent ID as determined by the funder and/or institution.') %>
<%= f.label :grant_number, _('Grant number') %> - <%= f.text_field :grant_number, class: 'left-indent input-medium has-tooltip', + <%= f.text_field :grant_number, class: 'input-medium has-tooltip', 'data-toggle': "tooltip", 'title': _('Grant reference number if applicable [POST-AWARD DMPs ONLY]') %>
<%= f.label :principal_investigator, _('Principal Investigator/Researcher') %> - <%= f.text_field :principal_investigator, class: 'left-indent input-medium has-tooltip', + <%= f.text_field :principal_investigator, class: 'input-medium has-tooltip', 'data-toggle': "tooltip", 'title': _('Name of Principal Investigator(s) or main researcher(s) on the project.') %>
<%= f.label :principal_investigator_identifier, _('Principal Investigator/Researcher ID') %> - <%= f.text_field :principal_investigator_identifier, class: 'left-indent input-medium has-tooltip', + <%= f.text_field :principal_investigator_identifier, class: 'input-medium has-tooltip', 'data-toggle': "tooltip", 'title': _('E.g ORCID http://orcid.org/.') %>
<%= f.label :data_contact, _('Plan data contact') %> - <%= f.text_field :data_contact, class: 'left-indent input-medium has-tooltip', + <%= f.text_field :data_contact, class: 'input-medium has-tooltip', 'data-toggle': "tooltip", 'title': _('Name (if different to above), telephone and email contact details') %>
<%= f.label :description, _('Description') %> - <%= f.text_area :description, { rows: 7, class: 'left-indent input-large has-tooltip', + <%= f.text_area :description, { rows: 7, class: 'input-large has-tooltip', 'data-toggle': "tooltip", 'data-html': "true", 'title': _("

Questions to consider:

  • - What is the nature of your research project?
  • - What research questions are you addressing?
  • - For what purpose are the data being collected or created?

Guidance:

Briefly summarise the type of study (or studies) to help others understand the purposes for which the data are being collected or created.

")} %>
-
+
diff --git a/app/views/plans/new.html.erb b/app/views/plans/new.html.erb index ea291b9..a40b41b 100644 --- a/app/views/plans/new.html.erb +++ b/app/views/plans/new.html.erb @@ -7,25 +7,25 @@ <%= _("Before you get started, we need to ask a few questions to set you up with the best DMP template for your needs.") %>

- <%= form_for @plan, method: :post, remote: true do |f| %> + <%= form_for @plan, html: {method: :post, class: "roadmap-form"}, remote: true do |f| %>
-
+
<%= _('What research project are you planning?') %> - +
<%= _('If applying for funding, state the title exactly as in the proposal.') %>
-
+
<%= _('Primary research organisation') %>
-
+
<%= _('Funding organisation') %>
-
+
diff --git a/app/views/plans/share.html.erb b/app/views/plans/share.html.erb index 3dd23ad..42f6988 100644 --- a/app/views/plans/share.html.erb +++ b/app/views/plans/share.html.erb @@ -58,31 +58,21 @@ <% new_role = Role.new %> <% new_role.plan = @plan %> <%= form_for new_role, url: {controller: :roles, action: :create }, - html: {method: :post, class: 'side-by-side'} do |f| %> -
-
- <%= _('Add collaborator') %> + html: {method: :post, class: 'roadmap-form'} do |f| %> +
+ <%= _('Add collaborator') %> - <%= f.hidden_field :plan_id %> - -
- <%= f.fields_for :user do |user| %> - <%= user.label :email, _('Email') %> - <%= user.email_field :email, for: :user, name: "user", class: "left-indent" %> - <% end %> -
-
- <%= f.label :access_level, _('Permissions') %> - <%= f.select :access_level, [[_('Co-owner'), 3], [ _('Editor') , 2], [ _('Read only'), 1]], {}, {class: 'has-tooltip left-indent', 'data-toggle': "tooltip", 'title': _('Editors can contribute to plans. Co-owners have additional rights to edit plan details and control access.') } %> -
- -
-
- -
-
-
- + <%= f.hidden_field :plan_id %> + + <%= f.fields_for :user do |user| %> + <%= user.label :email, _('Email') %> + <%= user.email_field :email, for: :user, name: "user", class: "left-indent" %> + <% end %> + + <%= f.label :access_level, _('Permissions') %> + <%= f.select :access_level, [[_('Co-owner'), 3], [ _('Editor') , 2], [ _('Read only'), 1]], {}, {class: 'has-tooltip left-indent', 'data-toggle': "tooltip", 'title': _('Editors can contribute to plans. Co-owners have additional rights to edit plan details and control access.') } %> + +
<% end %>
diff --git a/lib/assets/stylesheets/roadmap-form.scss b/lib/assets/stylesheets/roadmap-form.scss index 440c13e..9abd90a 100644 --- a/lib/assets/stylesheets/roadmap-form.scss +++ b/lib/assets/stylesheets/roadmap-form.scss @@ -9,7 +9,7 @@ $primary-color: #F49700; $primary-admin-color: #0057A7; $disabled-button-color: #CCC; -$cancel-button-color: #CCC; +$cancel-button-color: #827D7E; $reverse-text: #FFF; /* See `.combobox-clear-button` for an example of this mixin in use */ @@ -32,23 +32,27 @@ } .content-box { - background-color: $white; - - padding: 20px 15px 35px 15px; - - -webkit-border-radius: 10px; - -moz-border-radius: 10px; - border-radius: 10px; + } /* Roadmap Form Styling */ /* ------------------------------------------------ */ form.roadmap-form { - padding: 0 25px 25px 25px; - margin-bottom: 25px; - - /* Fieldset with labels over inputs */ - fieldset.standard { + + fieldset.padded { + padding: 10px 10px 25px 10px; + } + + /* Fieldset with labels over inputs */ + fieldset.standard { + background-color: $white; + + margin-bottom: 25px; + + -webkit-border-radius: 10px; + -moz-border-radius: 10px; + border-radius: 10px; + label, input[type="checkbox"], .combobox-container, @@ -68,10 +72,10 @@ display: inline-block; margin-left: 5px; } - } - - /* Fieldset with labels to the left of inputs */ - fieldset.side-by-side { + } + + /* Fieldset with labels to the left of inputs */ + fieldset.side-by-side { .mce-tinymce { display: inline-block; } @@ -89,7 +93,7 @@ } label { - width: 20%; + width: 25%; text-align: right; margin-right: 10px; vertical-align: middle; @@ -100,91 +104,99 @@ font-size: 10pt; } } - - .button-spacer { - display: inline-block; - width: 21%; - } - } - - /* Generic Fieldset Settings */ - fieldset legend { - font-family: $header-font; - color: $primary-color; - font-size: 26px; - font-weight: normal; - text-decoration: none; + + .button-spacer { + display: inline-block; + width: 21%; + } + } - float: left; /* positions the legend within the fieldset box */ - padding-top: 20px; - border-bottom: none; - } - - div.inline { - display: inline-block; - } - .left-indent { - margin-left: 15px; - } - .input-large { - width: 70%; - } - .input-medium { - width: 50%; - } - .input-small { - width: 20%; - } - - /* Accessible Form Buttons */ - input.form-submit { - background-color: $primary-color; - color: $reverse-text; - padding: 10px 30px; - font-size: 12pt; + /* Generic Fieldset Settings */ + fieldset legend { + font-family: $header-font; + color: $primary-color; + font-size: 26px; + font-weight: normal; + text-decoration: none; - -webkit-border-radius: 10px; - -moz-border-radius: 10px; - border-radius: 10px; - } - /* Override the button color for the Org Admin sections */ - input[type="submit"].admin{ - background-color: $primary-admin-color; - } - input.form-submit[aria-disabled='true'] { - background-color: $disabled-button-color; - } - input.form-submit:focus + [role="tooltip"] { - display: inline-block; - } - button.form-cancel { - background-color: $cancel-button-color; - color: $reverse-text; - padding: 10px 30px; - font-size: 12pt; + float: left; /* positions the legend within the fieldset box */ + border-bottom: none; + } - -webkit-border-radius: 10px; - -moz-border-radius: 10px; - border-radius: 10px; - } - .submit-tooltip { - display: none; - margin-left: 5px; + div.inline { + display: inline-block; + } + .left-indent { + margin-left: 15px; + } + .input-extra-large { + width: 70%; + } + .input-large { + width: 50%; + } + .input-medium { + width: 30%; + } + .input-small { + width: 10%; + } + /* Used for the jquery autocomplete combobox on side-by-side fieldsets */ + .fixed-width-large { + width: 550px; + } + + /* Accessible Form Buttons */ + input.form-submit { + background-color: $primary-color; + color: $reverse-text; + padding: 10px 30px; + font-size: 12pt; + margin-top: 15px; + + -webkit-border-radius: 10px; + -moz-border-radius: 10px; + border-radius: 10px; + } + /* Override the button color for the Org Admin sections */ + input[type="submit"].admin{ + background-color: $primary-admin-color; + } + input.form-submit[aria-disabled='true'] { + background-color: $disabled-button-color; + } + input.form-submit:focus + [role="tooltip"] { + display: inline-block; + } + button.form-cancel { + background-color: $cancel-button-color; + color: $reverse-text; + padding: 10px 30px; + font-size: 12pt; + margin-top: 15px; + + -webkit-border-radius: 10px; + -moz-border-radius: 10px; + border-radius: 10px; + } + .submit-tooltip { + display: none; + margin-left: 5px; - .arrow-left { - vertical-align: middle; - margin-right: -5px; - } - .submit-tooltip-msg { - color: $white; - background-color: $dark-grey; - padding: 5px 5px 8px 5px; + .arrow-left { + vertical-align: middle; + margin-right: -5px; + } + .submit-tooltip-msg { + color: $white; + background-color: $dark-grey; + padding: 5px 5px 8px 5px; - -webkit-border-radius: 5px; - -moz-border-radius: 5px; - border-radius: 5px; - } - } + -webkit-border-radius: 5px; + -moz-border-radius: 5px; + border-radius: 5px; + } + } } /* Accessible JQuery combobox */