diff --git a/app/views/devise/registrations/_external_identifier_orcid.html.erb b/app/views/devise/registrations/_external_identifier_orcid.html.erb index b5e9acb..16a6e02 100644 --- a/app/views/devise/registrations/_external_identifier_orcid.html.erb +++ b/app/views/devise/registrations/_external_identifier_orcid.html.erb @@ -1,13 +1,11 @@ <% if id.nil? || id.identifier == '' %> - <%= link_to 'Create or connect your ORCID iD', Rails.application.routes.url_helpers.send("user_#{scheme.name.downcase}_omniauth_authorize_path"), id:"connect-orcid-button", target: '_blank', title: t("identifier_schemes.schemes.#{scheme.name}.connect_tooltip", default: "") %> + <%= link_to 'Create or connect your ORCID iD', Rails.application.routes.url_helpers.send("user_#{scheme.name.downcase}_omniauth_authorize_path"), id:"connect-orcid-button", target: '_blank', title: t("identifier_schemes.schemes.#{scheme.name}.connect_tooltip", default: ""), 'data-toggle': "tooltip" %> <% else %> <% if scheme.user_landing_url.nil? %> <%= _("Your account has been linked to #{scheme.description}.") %> <% else %> - <%= link_to (image_tag("#{scheme.logo_url}", id: 'orcid-id-logo', alt: scheme.description)) + "#{scheme.user_landing_url}/#{id.identifier}", "#{scheme.user_landing_url}/#{id.identifier}", id: 'orcid-id', target: '_blank', title: t("identifier_schemes.schemes.#{scheme.name}.connect_tooltip", default: "") %> + <%= link_to (image_tag("#{scheme.logo_url}", id: 'orcid-id-logo', alt: scheme.description)) + "#{scheme.user_landing_url}/#{id.identifier}", "#{scheme.user_landing_url}/#{id.identifier}", id: 'orcid-id', target: '_blank', title: t("identifier_schemes.schemes.#{scheme.name}.connect_tooltip", default: " "), 'data-toggle': "tooltip" %> <% end %> <% title = _("Unlink your account from #{scheme.description}. You can link again at any time.") %> - <%= link_to ''.html_safe, - destroy_user_identifier_path(id), method: :delete, title: title, 'aria-label': title, - data: {confirm: _("Are you sure you want to unlink #{scheme.description} ID?")} %> + <%= link_to ''.html_safe, destroy_user_identifier_path(id), method: :delete, title: title, 'aria-label': title, 'data-toggle': "tooltip", data: {confirm: _("Are you sure you want to unlink #{scheme.description} ID?")} %> <% end %> diff --git a/app/views/devise/registrations/_external_identifier_shibboleth.html.erb b/app/views/devise/registrations/_external_identifier_shibboleth.html.erb index 9daa7f1..8e7283b 100644 --- a/app/views/devise/registrations/_external_identifier_shibboleth.html.erb +++ b/app/views/devise/registrations/_external_identifier_shibboleth.html.erb @@ -2,18 +2,18 @@ <%= link_to "#{_("Link account with #{scheme.description} ID")}", Rails.application.routes.url_helpers.send( "user_#{scheme.name.downcase}_omniauth_authorize_path" - ), + ), 'data-toggle': "tooltip", title: t("identifier_schemes.schemes.#{scheme.name}.connect_tooltip", default: "") %> <% else %> <% if scheme.user_landing_url.nil? %> <%= _("Your account has been linked to #{scheme.description}.") %> <% else %> - <%= link_to "#{_("Your account has been linked to #{scheme.description}.")}", "#{scheme.user_landing_url}/#{id.identifier}", target: '_blank', + <%= link_to "#{_("Your account has been linked to #{scheme.description}.")}", "#{scheme.user_landing_url}/#{id.identifier}", target: '_blank', 'data-toggle': "tooltip", title: t("identifier_schemes.schemes.#{scheme.name}.connect_tooltip", default: "") %> <% end %> <% title = _("Unlink your account from #{scheme.description}. You can link again at any time.") %> <%= link_to ''.html_safe, - destroy_user_identifier_path(id), method: :delete, title: title, 'aria-label': title, + destroy_user_identifier_path(id), method: :delete, title: title, 'aria-label': title, 'data-toggle': "tooltip", data: {confirm: _("Are you sure you want to unlink #{scheme.description} ID?")} %> <% end %> diff --git a/app/views/devise/registrations/_personal_details.html.erb b/app/views/devise/registrations/_personal_details.html.erb index e08b028..4514f7e 100644 --- a/app/views/devise/registrations/_personal_details.html.erb +++ b/app/views/devise/registrations/_personal_details.html.erb @@ -11,9 +11,7 @@
<%= f.label(:email, _('Email'), class: "col-sm-2 control-label") %>
- <%= f.email_field(:email, class: "form-control", "aria-required": true, - title: _('Please enter your current password below when changing your email address.'), - value: @user.email) %> + <%= f.email_field(:email, class: "form-control", "aria-required": true, 'data-toggle': "tooltip", title: _('Please enter your current password below when changing your email address.'), value: @user.email) %>
@@ -34,9 +32,7 @@
<%= f.label(:recovery_email, _('Recovery email'), class: "col-sm-2 control-label") %>
- <%= f.email_field(:recovery_email, class: 'form-control', "aria-required": true, - title: _('This email will be used to recover your account if you change institutions'), - value: @user.recovery_email) %> + <%= f.email_field(:recovery_email, class: 'form-control', "aria-required": true, 'data-toggle': "tooltip", title: _('This email will be used to recover your account if you change institutions'), value: @user.recovery_email) %>
@@ -67,7 +63,7 @@ <% other_organisations = Org.where("parent_id IS ? AND is_other = ?", nil, true).pluck(:id) %>
<%= f.label _('Organisation name'), for: :other_organisation, class: "col-sm-2 control-label" %> - <%= f.text_field :other_organisation, :autocomplete => "off", :class => 'form-control has-tooltip', 'data-toggle' => "tooltip", 'data-container' => "body", 'title' => _('Please enter the name of your organisation.') %> + <%= f.text_field :other_organisation, :autocomplete => "off", class: 'form-control', 'data-toggle' => "tooltip", 'title': _('Please enter the name of your organisation.') %>
@@ -106,9 +102,8 @@ <% unless @user.api_token.blank? %>
<%= f.label(:api_token, _('API token'), class: "col-sm-2 control-label") %> -
<%= @user.api_token %>
- <%= label_tag(:api_information, _('API Information'), class: "col-sm-2 control-label") %> -
<%= link_to( _('How to use the API'), controller: "token_permission_types", action: "index")%>
+ <%= @user.api_token %> + <%= link_to( _('How to use the API'), controller: "token_permission_types", action: "index")%>
<% end %> diff --git a/app/views/guidance_groups/admin_edit.html.erb b/app/views/guidance_groups/admin_edit.html.erb index 9b9d7b4..3f3e3f5 100644 --- a/app/views/guidance_groups/admin_edit.html.erb +++ b/app/views/guidance_groups/admin_edit.html.erb @@ -10,33 +10,17 @@
<%= f.label _('Name'), for: :name %> - <%= f.text_field :name, as: :string, class: 'input-medium required' %> - + <%= f.text_field :name, as: :string, class: 'input-medium required', 'data-toggle': 'tooltip', title: _('Add an appropriate name for your guidance group. This name will be used to tell the end user where the guidance has come from. It will be appended to text identifying the theme e.g. "[guidance group name]: guidance on data sharing" so we suggest you just use the institution or department name.') %>
<%= f.label _('Published'), for: :published %> - <%= f.check_box :published %> -
- <% lbl = _("Check this box when you are ready for guidance associated with this group to appear on user's plans.") %> - - -
+ <%= f.check_box :published, 'data-toggle': 'tooltip', title: _("Check this box when you are ready for guidance associated with this group to appear on user's plans.") %>
<%= f.label _('Optional Subset'), for: :optional_subset %> - <%= f.check_box :optional_subset %> <%= _('e.g. School/ Department') %> - + <%= f.check_box :optional_subset, 'data-toggle': 'tooltip', title: _("If the guidance is only meant for a subset of users e.g. those in a specific college or institute, check this box. Users will be able to select to display this subset guidance when answering questions in the 'create plan' wizard.") %> <%= _('e.g. School/ Department') %>
diff --git a/app/views/guidance_groups/admin_new.html.erb b/app/views/guidance_groups/admin_new.html.erb index 7b625fd..3893fe1 100644 --- a/app/views/guidance_groups/admin_new.html.erb +++ b/app/views/guidance_groups/admin_new.html.erb @@ -10,21 +10,11 @@
<%= f.label _('Name'), for: :name %> - <%= f.text_field :name, as: :string, class: "input-medium required" %> - + <%= f.text_field :name, as: :string, class: "input-medium required", 'data-toggle': 'tooltip', title: _('Add an appropriate name for your guidance group. This name will be used to tell the end user where the guidance has come from. It will be appended to text identifying the theme e.g. "[guidance group name]: guidance on data sharing" so we suggest you just use the institution or department name.') %>
<%= f.label _('Optional Subset'), for: :optional_subset %> - <%= f.check_box :optional_subset %> <%= _('e.g. School/ Department') %> - + <%= f.check_box :optional_subset, 'data-toggle': 'tooltip', title: _("If the guidance is only meant for a subset of users e.g. those in a specific college or institute, check this box. Users will be able to select to display this subset guidance when answering questions in the 'create plan' wizard.") %> <%= _('e.g. School/ Department') %>
diff --git a/app/views/guidances/admin_edit.html.erb b/app/views/guidances/admin_edit.html.erb index 952f800..6c27a87 100644 --- a/app/views/guidances/admin_edit.html.erb +++ b/app/views/guidances/admin_edit.html.erb @@ -7,30 +7,23 @@
<%= form_for(@guidance, url: admin_update_guidance_path(@guidance), html: { method: :put , id: 'edit_guidance_form', class: 'roadmap-form bordered'}) do |f| %>
-
+
<%= f.label _('Text'), for: @guidance.text %> <%= text_area_tag("guidance-text", @guidance.text, class: "tinymce") %> -
- <% lbl = %> - - -
<%= f.label _('Themes'), for: :theme_ids %> <%= f.collection_select(:theme_ids, @themes, :id, :title, - {prompt: false, include_blank: 'None'}, {multiple: true, title: _('Select which theme(s) this guidance relates to.')})%> + {prompt: false, include_blank: 'None'}, {multiple: true, 'data-toggle': 'tooltip', title: _('Select which theme(s) this guidance relates to.')})%>
<%= f.label _('Published'), for: :published %> - <%= f.check_box :published , as: :check_boxes, title: _("Check this box when you are ready for this guidance to appear on user's plans.") %> + <%= f.check_box :published , as: :check_boxes, 'data-toggle': 'tooltip', title: _("Check this box when you are ready for this guidance to appear on user's plans.") %>
<%= f.label _('Guidance group'), for: :guidance_group_id %> <%= f.collection_select(:guidance_group_id, @guidance_groups, - :id, :name, {prompt: false, include_blank: 'None'}, {multiple: false, title: _('Select which group this guidance relates to.')})%> + :id, :name, {prompt: false, include_blank: 'None'}, {multiple: false, 'data-toggle': 'tooltip', title: _('Select which group this guidance relates to.')})%>

diff --git a/app/views/guidances/admin_new.html.erb b/app/views/guidances/admin_new.html.erb index 9a97d4c..cefaf2f 100644 --- a/app/views/guidances/admin_new.html.erb +++ b/app/views/guidances/admin_new.html.erb @@ -8,30 +8,23 @@
<%= form_for :guidance, url: {action: 'admin_create'}, html: {id: 'edit_guidance_form', class: 'roadmap-form bordered'} do |f| %>
-
+
<%= f.label :text %> <%= text_area_tag("guidance-text", "", class: "tinymce") %> -
- <% lbl = _('Enter your guidance here. You can include links where needed.') %> - - -
<%= f.label _('Themes'), for: :theme_ids %> <%= f.collection_select(:theme_ids, @themes, - :id, :title, {prompt: false, include_blank: 'None'}, {multiple: true, title: _('Select which theme(s) this guidance relates to.')}) %> + :id, :title, {prompt: false, include_blank: 'None'}, {multiple: true, 'data-toggle': 'tooltip', title: _('Select which theme(s) this guidance relates to.')}) %>
<%= f.label :published %> - <%= f.check_box :published , as: :check_boxes, title: _("Check this box when you are ready for this guidance to appear on user's plans.") %> + <%= f.check_box :published , as: :check_boxes, 'data-toggle': 'tooltip', title: _("Check this box when you are ready for this guidance to appear on user's plans.") %>
<%= f.label _('Guidance group'), for: :guidance_group_id %> <%= f.collection_select(:guidance_group_id, @guidance_groups, - :id, :name, {prompt: false, include_blank: 'None'}, {multiple: false, title: _('Select which group this guidance relates to.')})%> + :id, :name, {prompt: false, include_blank: 'None'}, {multiple: false, 'data-toggle': 'tooltip', title: _('Select which group this guidance relates to.')})%>

diff --git a/app/views/layouts/_es5_scripts.html.erb b/app/views/layouts/_es5_scripts.html.erb index ca9b01a..fbcd0e7 100644 --- a/app/views/layouts/_es5_scripts.html.erb +++ b/app/views/layouts/_es5_scripts.html.erb @@ -25,14 +25,13 @@ <%#= javascript_include_tag 'dmproadmap/accordions.js' %> <%= javascript_include_tag 'dmproadmap/admin.js' %> <%= javascript_include_tag 'dmproadmap/forms.js' %> - <%= javascript_include_tag 'dmproadmap/utils.js' %> + <%#= javascript_include_tag 'dmproadmap/utils.js' %> <%= javascript_include_tag 'views/guidances/admin_edit.js' %> <%= javascript_include_tag 'views/home/index.js' %> <%= javascript_include_tag 'views/orgs/admin_edit.js' %> - <%= javascript_include_tag 'views/orgs/shibboleth_ds.js' %> <%= javascript_include_tag 'views/plans/available_templates.js' %> <%= javascript_include_tag 'views/registrations/sign_in_sign_up.js' %> <%= javascript_include_tag 'views/shared/login_form.js' %> diff --git a/app/views/orgs/shibboleth_ds.html.erb b/app/views/orgs/shibboleth_ds.html.erb index 4d6ee9d..0d6cbce 100644 --- a/app/views/orgs/shibboleth_ds.html.erb +++ b/app/views/orgs/shibboleth_ds.html.erb @@ -8,45 +8,38 @@
- <%= form_for 'shibboleth_ds', url: shibboleth_ds_path, html: {class: "shibboleth-ds-form roadmap-form"} do |f| %> -
-
- <%= f.label(:org_name, _('Look up your institution here')) %> - - <% if @orgs.length <= 10 %> - - - <% else %> - <%= render partial: "shared/accessible_combobox", - locals: {name: 'org_name', - id: 'org_name', - default_selection: nil, - models: @orgs, - attribute: 'name', - classes: 'fixed-width-large'} %> - <% end %> + <%= form_for 'shibboleth_ds', url: shibboleth_ds_path, html: {id: 'shibboleth_ds'} do |f| %> +
+ <%= f.label(:org_name, _('Look up your institution here')) %> + + <% if @orgs.length <= 10 %> + - <%= render partial: 'shared/accessible_submit_button', - locals: {id: 'submit-button', - val: _('Go'), - disabled_initially: true, - classes: 'small-input-button', - tooltip: _('Select an institution.'), - classes: 'inline left-indent'} %> + <% else %> + <%= render partial: "shared/accessible_combobox", + locals: {name: 'org_name', + id: 'org_name', + default_selection: nil, + models: @orgs, + attribute: 'name', + required: true, + classes: ''} %> + <% end %> + + <%= f.button(_('Go'), class: "btn btn-default", type: "submit") %> - <% if @orgs.length > 10 %> -

- - <%= _('or') %> - -
- <%= _('See the full list of participating institutions') %> -

- <% end %> + <% if @orgs.length > 10 %> +

+ - <%= _('or') %> - +
+ <%= _('See the full list of participating institutions') %> +

+ <% end %> -
-
+
<% end %>