diff --git a/app/views/branded/contact_us/contacts/new.html.erb b/app/views/branded/contact_us/contacts/new.html.erb index a3b35f5..8766dd2 100644 --- a/app/views/branded/contact_us/contacts/new.html.erb +++ b/app/views/branded/contact_us/contacts/new.html.erb @@ -1,3 +1,4 @@ +<% title _('Contact Us') %>

<%= _("Contact Us") %>

diff --git a/app/views/branded/guidance_groups/admin_edit.html.erb b/app/views/branded/guidance_groups/admin_edit.html.erb index 26d90c9..8858f8b 100644 --- a/app/views/branded/guidance_groups/admin_edit.html.erb +++ b/app/views/branded/guidance_groups/admin_edit.html.erb @@ -1,3 +1,4 @@ +<% title _('Guidance group') %>

<%= _('Guidance group') %>

@@ -11,7 +12,7 @@
<%= f.label _('Name'), for: :name, class: "control-label" %> - <%= f.text_field :name, as: :string, class: "form-control", 'data-toggle': 'tooltip', title: _('Add an appropriate name for your guidance group. This name will tell the end user where the guidance has come from. We suggest you use the organisation or department name e.g. "OU" or "Maths & Stats"') %> + <%= f.text_field :name, as: :string, class: "form-control", 'aria-required': true, 'data-toggle': 'tooltip', title: _('Add an appropriate name for your guidance group. This name will tell the end user where the guidance has come from. We suggest you use the organisation or department name e.g. "OU" or "Maths & Stats"') %>
diff --git a/app/views/branded/guidance_groups/admin_new.html.erb b/app/views/branded/guidance_groups/admin_new.html.erb index cd2610c..a5aa0ac 100644 --- a/app/views/branded/guidance_groups/admin_new.html.erb +++ b/app/views/branded/guidance_groups/admin_new.html.erb @@ -1,3 +1,4 @@ +<% title _('Guidance group') %>

<%= _('Guidance group') %>

@@ -7,10 +8,10 @@
- <%= form_for :guidance_group, url: {action: "admin_create"}, id: 'admin_create_guidance_group_form' do |f| %> + <%= form_for :guidance_group, url: {action: "admin_create"}, html: {id: 'admin_create_guidance_group_form'} do |f| %>
<%= f.label _('Name'), for: :name, class: "control-label" %> - <%= f.text_field :name, as: :string, class: "form-control", 'data-toggle': 'tooltip', title: _('Add an appropriate name for your guidance group. This name will tell the end user where the guidance has come from. We suggest you use the organisation or department name e.g. "OU" or "Maths & Stats"') %> + <%= f.text_field :name, as: :string, class: "form-control", 'aria-required': true, 'data-toggle': 'tooltip', title: _('Add an appropriate name for your guidance group. This name will tell the end user where the guidance has come from. We suggest you use the organisation or department name e.g. "OU" or "Maths & Stats"') %>
diff --git a/app/views/branded/guidances/admin_index.html.erb b/app/views/branded/guidances/admin_index.html.erb index 8bce990..124ea81 100644 --- a/app/views/branded/guidances/admin_index.html.erb +++ b/app/views/branded/guidances/admin_index.html.erb @@ -1,9 +1,10 @@ +<% title _('Guidance') %>

<%= _('Guidance') %>

- <%= _("First create a guidance group. This could be organisation wide or a subset e.g. a particular College / School, Institute or department. When you create guidance you'll be asked to assign it to a guidance group.") %> + <%= raw _("First create a guidance group. This could be organisation wide or a subset e.g. a particular College / School, Institute or department. When you create guidance you'll be asked to assign it to a guidance group.") %>

diff --git a/app/views/branded/guidances/new_edit.html.erb b/app/views/branded/guidances/new_edit.html.erb index 62a21d2..cf41f7d 100644 --- a/app/views/branded/guidances/new_edit.html.erb +++ b/app/views/branded/guidances/new_edit.html.erb @@ -1,3 +1,4 @@ +<% title _('Guidance') %> <%# locals: { guidance, themes, guidance_groups, options } %>
@@ -10,11 +11,11 @@ <%= form_for(guidance, url: options[:url], html: { method: options[:method] , id: 'new_edit_guidance'}) do |f| %>
<%= f.label :text, class: 'control-label' %> - <%= text_area_tag("guidance-text", guidance.text, class: "tinymce form-control", 'aria-required': true, rows: 10) %> + <%= text_area_tag("guidance-text", guidance.text, class: "form-control", 'aria-required': true, rows: 10) %>
- <%= render partial: 'org_admin/shared/theme_selector', - locals: { f: f, all_themes: themes, - popover_message: _('Select one or more themes that are relevant to this guidance. This will display your generic organisation-level guidance, as well as that from other sources e.g. the %{org_name} guidance or any Schools/Departments that you provide guidance for.') % { org_name: (current_user.org.abbreviation.present? ? current_user.org.abbreviation : current_user.org.name ) } } %> + <%= render partial: 'org_admin/shared/theme_selector', + locals: { f: f, all_themes: themes, as_radio: true, required: true, + popover_message: _('Select one theme that is relevant to this guidance. This will display your generic organisation-level guidance, or any Schools/Departments for which you create guidance groups, across all templates that have questions with the corresponding theme tags.') } %>
<%= f.label _('Guidance group'), for: :guidance_group_id, class: 'control-label' %> <%= f.collection_select(:guidance_group_id, guidance_groups, @@ -25,7 +26,7 @@
<%= f.submit _('Save'), name: "edit_guidance_submit", class: "btn btn-primary" %> - <%= link_to _('Cancel'), admin_index_guidance_path, class: "btn btn-primary", role: 'button' %> + <%= link_to _('Cancel'), admin_index_guidance_path, class: "btn btn-primary", role: 'button' %>
<%end%>
diff --git a/app/views/branded/home/_welcome.html.erb b/app/views/branded/home/_welcome.html.erb index aeec3d2..948ff8a 100644 --- a/app/views/branded/home/_welcome.html.erb +++ b/app/views/branded/home/_welcome.html.erb @@ -1,3 +1,4 @@ +<% title d_('dmpopidor', 'Welcome!') %>

diff --git a/app/views/branded/layouts/application.html.erb b/app/views/branded/layouts/application.html.erb index ed08fa9..6145d56 100644 --- a/app/views/branded/layouts/application.html.erb +++ b/app/views/branded/layouts/application.html.erb @@ -1,8 +1,7 @@ - - <%= _('%{application_name}') % { :application_name => Rails.configuration.branding[:application][:name] } %> + <title><%= content_for?(:title) ? yield(:title) : _('%{application_name}') % { :application_name => Rails.configuration.branding[:application][:name] } %> <%= favicon_link_tag "favicon.ico" %>
<%= render partial: "layouts/header" %> @@ -54,7 +55,7 @@ %> -
+
<% modifiable = template.latest? && !template.customization_of.present? && template.id.present? && (template.org_id = current_user.org.id) %>
diff --git a/app/views/branded/org_admin/plans/index.html.erb b/app/views/branded/org_admin/plans/index.html.erb index 45f6ff6..1c87179 100644 --- a/app/views/branded/org_admin/plans/index.html.erb +++ b/app/views/branded/org_admin/plans/index.html.erb @@ -1,3 +1,4 @@ +<% title _('%{org_name} Plans') % { org_name: current_user.org.name } %>

<%= _('%{org_name} Plans') % { org_name: current_user.org.name } %>

diff --git a/app/views/branded/org_admin/templates/container.html.erb b/app/views/branded/org_admin/templates/container.html.erb index 28c29e7..96cd19e 100644 --- a/app/views/branded/org_admin/templates/container.html.erb +++ b/app/views/branded/org_admin/templates/container.html.erb @@ -1,3 +1,4 @@ +<% title template.id.present? ? template.title : _('New Template') %> <% modifiable = template.latest? && !template.customization_of.present? && template.id.present? && (template.org_id = current_user.org.id) %>
diff --git a/app/views/branded/org_admin/templates/index.html.erb b/app/views/branded/org_admin/templates/index.html.erb index d9d44ef..9dc396e 100644 --- a/app/views/branded/org_admin/templates/index.html.erb +++ b/app/views/branded/org_admin/templates/index.html.erb @@ -1,3 +1,4 @@ +<% title _('Templates') %>

<%= _('Templates') %>

diff --git a/app/views/branded/orgs/admin_edit.html.erb b/app/views/branded/orgs/admin_edit.html.erb index 886e827..6f1f12d 100644 --- a/app/views/branded/orgs/admin_edit.html.erb +++ b/app/views/branded/orgs/admin_edit.html.erb @@ -1,3 +1,4 @@ +<% title org.id.present? ? _('Organisation details') : _('New organisation') %>

<%= org.id.present? ? _('Organisation details') : _('New organisation') %>

@@ -19,18 +20,29 @@ <% end %> - -
-
- <%= render partial: 'orgs/profile_form', locals: local_assigns %> -
- <% if org.id.present? %> -
- <%= render partial: 'orgs/feedback_form', locals: local_assigns %> + +
+
+
+
+
+ <%= render partial: 'orgs/profile_form', locals: local_assigns %> +
+
- <% end %> +
+
+
+
+ <% if org.id.present? %> +
+ <%= render partial: 'orgs/feedback_form', locals: local_assigns %> +
+ <% end %> +
+
+
- diff --git a/app/views/branded/plans/new.html.erb b/app/views/branded/plans/new.html.erb index de38152..5a28baa 100644 --- a/app/views/branded/plans/new.html.erb +++ b/app/views/branded/plans/new.html.erb @@ -1,8 +1,9 @@ +<% title _('Create a new plan') %>
<%= form_for Plan.new, url: plans_path do |f| %> -

<%= _('Project title') %>

+

* <%= _('Project title') %>

<%= f.text_field(:title, class: 'form-control', 'aria-describedby': 'project-title', 'aria-required': 'true', @@ -27,7 +28,7 @@ <%= link_to d_('dmpopidor', 'Find the list of the available templates'), public_templates_path, :target => "_blank" %>

-

<%= d_('dmpopidor', 'Select a research organisation:') %>

+

* <%= d_('dmpopidor', 'Select a research organisation:') %>

<%= render partial: "shared/accessible_combobox", @@ -43,13 +44,14 @@
- <%= _('or') %> -
- <%= label_tag(:plan_no_org, raw("#{check_box_tag(:plan_no_org)} #{ d_('dmpopidor', 'No research organisation')}")) %> + <% primary_research_org_message = d_('dmpopidor', 'No research organisation') %> + <%= label_tag(:plan_no_org, raw("#{check_box_tag(:plan_no_org)} #{primary_research_org_message}")) %>
-

<%= d_('dmpopidor', 'Select a funder:') %>

+

* <%= d_('dmpopidor', 'Select a funder:') %>

<%= render partial: "shared/accessible_combobox", @@ -65,7 +67,8 @@
- <%= _('or') %> -
- <%= label_tag(:plan_no_funder, raw("#{check_box_tag(:plan_no_funder)} #{ d_('dmpopidor', 'No funder associated with this plan')}")) %> + <% primary_funding_message = d_('dmpopidor', 'No funder associated with this plan') %> + <%= label_tag(:plan_no_funder, raw("#{check_box_tag(:plan_no_funder)} #{primary_funding_message}")) %>
diff --git a/app/views/branded/shared/_accessible_combobox.html.erb b/app/views/branded/shared/_accessible_combobox.html.erb index 5625068..fd31642 100644 --- a/app/views/branded/shared/_accessible_combobox.html.erb +++ b/app/views/branded/shared/_accessible_combobox.html.erb @@ -6,18 +6,20 @@ <% json = {} %> <% models.map{|m| json["#{m[attribute]}"] = m.id} %> - + + <% name = name.gsub(name.match(/^.*\[/)[0].split('_')[0] + '_', '') %> <% models.each do |model| %> @@ -33,7 +35,7 @@ " name="<%= name.gsub("_#{attribute}]", "_id]") %>" value="<%= default_selection.id unless default_selection.nil? %>" aria-required="<%= required %>" - data-validation="js-combobox" data-validation-error="<%= error %>" /> + class="org-id" data-validation="js-combobox" data-validation-error="<%= error %>" /> <% else %> <%= _('No items available.') %> diff --git a/app/views/branded/shared/_create_account_form.html.erb b/app/views/branded/shared/_create_account_form.html.erb index 83520db..2a21f0a 100644 --- a/app/views/branded/shared/_create_account_form.html.erb +++ b/app/views/branded/shared/_create_account_form.html.erb @@ -1,4 +1,4 @@ -<%= form_for resource, as: 'user', url: registration_path("user"), html: {autocomplete: "off", id: "create_account_form"} do |f| %> +<%= form_for resource, as: 'user', namespace: 'new_user', url: registration_path("user"), html: {autocomplete: "off", id: "create_account_form"} do |f| %>
<%= f.label(:firstname, _('First Name'), class: "control-label") %> @@ -15,7 +15,8 @@
<%= render partial: "shared/my_org", locals: {f: f, default_org: @default_org, - orgs: Org.where("parent_id IS NULL").order("sort_name ASC, name ASC"), allow_other_orgs: true} %> + orgs: Org.where("parent_id IS NULL").order("sort_name ASC, name ASC"), + allow_other_orgs: true, required: true} %>
diff --git a/app/views/branded/static_pages/about_us.html.erb b/app/views/branded/static_pages/about_us.html.erb index d10af66..09c8c9b 100644 --- a/app/views/branded/static_pages/about_us.html.erb +++ b/app/views/branded/static_pages/about_us.html.erb @@ -1,4 +1,4 @@ - +<% title t("about_page.title") %>

<%= t("about_page.title")%>

diff --git a/app/views/branded/static_pages/help.html.erb b/app/views/branded/static_pages/help.html.erb index ca2a212..e2705dd 100644 --- a/app/views/branded/static_pages/help.html.erb +++ b/app/views/branded/static_pages/help.html.erb @@ -1,3 +1,4 @@ +<% title _('Help') %>