diff --git a/app/views/devise/registrations/_external_identifier_shibboleth.html.erb b/app/views/devise/registrations/_external_identifier_shibboleth.html.erb index 39078c1..0fa1626 100644 --- a/app/views/devise/registrations/_external_identifier_shibboleth.html.erb +++ b/app/views/devise/registrations/_external_identifier_shibboleth.html.erb @@ -16,6 +16,7 @@ <%= link_to ''.html_safe, destroy_user_identifier_path(id), method: :delete, title: _("Unlink your account from #{scheme.description}. You can link again at any time."), + 'data-toggle': "modal", 'dialog-width': "450px", data: {confirm: _("Are you sure you want to unlink #{scheme.description} ID?")} %> <% end %> \ No newline at end of file diff --git a/app/views/devise/registrations/_password_details.html.erb b/app/views/devise/registrations/_password_details.html.erb index 02e38c4..6fd93fc 100644 --- a/app/views/devise/registrations/_password_details.html.erb +++ b/app/views/devise/registrations/_password_details.html.erb @@ -7,7 +7,7 @@
+ class="left-indent required input-medium" value="" />
@@ -15,7 +15,7 @@
+ class="left-indent required input-medium" value="" />
@@ -24,29 +24,25 @@ + class="left-indent required input-medium" value="" />
-
- - -
+ + +
+ +
+
+ + <%= render partial: 'shared/accessible_submit_button', + locals: {id: 'update', + val: 'Save', + disabled_initially: false, + classes: 'small-input-button left-indent', + tooltip: _('Enter all of the required information above')} %>
- -
- - <%= render partial: 'shared/accessible_submit_button', - locals: {id: 'update', - val: 'Save', - disabled_initially: false, - classes: 'small-input-button', - tooltip: _('Enter all of the required information above')} %> - <%= link_to 'Cancel', '#', style: 'text-decoration:none;' %> -
<% end %> \ No newline at end of file diff --git a/app/views/devise/registrations/_personal_details.html.erb b/app/views/devise/registrations/_personal_details.html.erb index 7899829..be39742 100644 --- a/app/views/devise/registrations/_personal_details.html.erb +++ b/app/views/devise/registrations/_personal_details.html.erb @@ -1,137 +1,131 @@ <%= form_for(resource, as: resource_name, url: registration_path(resource_name), html: {method: :put, class: "roadmap-form white_background"}) do |f| %> -
-

- <%= _("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.") %> -

-
- -
- -
- <%= _('You can edit any of the details below.') %> - - <%= hidden_field_tag :unlink_flag, "false", id: "unlink_flag" %> - <%= hidden_field_tag :skip_personal_details, "false" %> - -
- - - -
- -
- - -
-
- - -
- -
- - - -
- -
- - - -
- -
- - <%= render partial: "shared/accessible_combobox", - locals: {name: "#{resource_name}[org_name]", - id: "#{resource_name}_org_name", - default_selection: @default_org, - models: @orgs, - attribute: 'name', - classes: 'fixed-width-large left-indent'} %> -
- - <% if MANY_LANGUAGES %> -
- <% lang = current_user.language.nil? ? FastGettext.default_locale : current_user.language.abbreviation %> - - -
- <% end %> - - <% @identifier_schemes.each do |scheme| %> -
- <% if scheme.name == 'shibboleth' %> - - <% else %> - - <% end %> -
- <%= render partial: "external_identifier_#{scheme.name}", - locals: { scheme: scheme, - id: current_user.identifier_for(scheme)} %> -
-
- <% end %> - - <% unless @user.api_token.blank? %> -
- <%= f.label :api_token, _('API token') %> -
<%= @user.api_token %>
- - -
<%= link_to( _('How to use the API'), controller: "token_permission_types", action: "index")%>
-
- <% end %> - -
-
- - <%= render partial: 'shared/accessible_submit_button', - locals: {id: 'update', - val: 'Save', - disabled_initially: true, - classes: 'small-input-button', - tooltip: _('Enter all of the required information above')} %> - <%= link_to 'Cancel', '#', style: 'text-decoration:none;' %> +
+

+ <%= _("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.") %> +

-
+ +
+ +
+ <%= _('You can edit any of the details below.') %> + + <%= hidden_field_tag :unlink_flag, "false", id: "unlink_flag" %> + <%= hidden_field_tag :skip_personal_details, "false" %> + +
+ + + +
+ +
+ + +
+
+ + +
+ +
+ + + +
+ +
+ + + +
+ +
+ + <%= render partial: "shared/accessible_combobox", + locals: {name: "#{resource_name}[org_name]", + id: "#{resource_name}_org_name", + default_selection: @default_org, + models: @orgs, + attribute: 'name', + classes: 'left-indent'} %> +
+ + <% if MANY_LANGUAGES %> +
+ <% lang = current_user.language.nil? ? FastGettext.default_locale : current_user.language.abbreviation %> + + +
+ <% end %> + + <% @identifier_schemes.each do |scheme| %> +
+ <% if scheme.name == 'shibboleth' %> + + <% else %> + + <% end %> +
+ <%= render partial: "external_identifier_#{scheme.name}", + locals: { scheme: scheme, + id: current_user.identifier_for(scheme)} %> +
+
+ <% end %> + + <% unless @user.api_token.blank? %> +
+ <%= f.label :api_token, _('API token') %> +
<%= @user.api_token %>
+ + +
<%= link_to( _('How to use the API'), controller: "token_permission_types", action: "index")%>
+
+ <% end %> + +
+
+ + <%= render partial: 'shared/accessible_submit_button', + locals: {id: 'update', + val: 'Save', + disabled_initially: true, + classes: 'small-input-button left-indent', + tooltip: _('Enter all of the required information above')} %> +
+ +
+
<% end %> - \ No newline at end of file + diff --git a/app/views/devise/registrations/edit.html.erb b/app/views/devise/registrations/edit.html.erb index ca84c15..5fa5a66 100644 --- a/app/views/devise/registrations/edit.html.erb +++ b/app/views/devise/registrations/edit.html.erb @@ -1,6 +1,8 @@ <% javascript "views/devise/registrations/edit.js" %>

<%= _('Edit profile') %>

+ +
+ +
+
+
+ + +
+ +
-
-
- -
- -
(<%= _('Limited to finished plans') %>)
-
-
/><%= raw display_visibility('privately_visible') %>
-
/><%= raw display_visibility('organisationally_visible') %>
-
/><%= raw display_visibility('publicly_visible') %>
-
-
- -
-
<%= _('Plan Guidance Configuration') %>
-

<%= _('To help you write your plan, %{application_name} can show you guidance from a variety of organisations.') % {application_name: Rails.configuration.branding[:application][:name]} %>

-
-

<% _('Select up to 3 organisations to see their guidance.') %>

- +
+
+ +
+ +
(<%= _('Limited to finished plans') %>)
+
+
/><%= raw display_visibility('privately_visible') %>
+
/><%= raw display_visibility('organisationally_visible') %>
+
/><%= raw display_visibility('publicly_visible') %>
+
+
+ +
+
<%= _('Plan Guidance Configuration') %>
+

<%= _('To help you write your plan, %{application_name} can show you guidance from a variety of organisations.') % {application_name: Rails.configuration.branding[:application][:name]} %>

+
+

<% _('Select up to 3 organisations to see their guidance.') %>

+ <%= @important_ggs.inspect %> -
-
+
+
<% end %> \ No newline at end of file diff --git a/app/views/users/_notification_preferences.html.erb b/app/views/users/_notification_preferences.html.erb index 9b79290..cdcb003 100644 --- a/app/views/users/_notification_preferences.html.erb +++ b/app/views/users/_notification_preferences.html.erb @@ -1,67 +1,66 @@

- <%= link_to 'Select all', '#', id: 'select_all' %> | - <%= link_to 'Deselect all', '#', id: 'deselect_all' %> + <%= link_to 'Select all', '#', id: 'select_all' %> | + <%= link_to 'Deselect all', '#', id: 'deselect_all' %>

- <%= form_tag(user_update_preferences_path, html: {method: :put, class: "roadmap-form"}) do |f| %> + <%= form_tag(user_update_preferences_path, html: {method: :put, class: "roadmap-form"}) do |f| %> - <%= hidden_field_tag :user_id, @user.id %> + <%= hidden_field_tag :user_id, @user.id %> -

All Users

-
- <%= check_box_tag 'prefs[users][new_comment]', true, @user.prefs[:users][:new_comment] %> - <%= label_tag 'prefs[users][new_comment]', 'A new comment has been added to my DMP', :class => 'checkbox-label' %> -
-
- <%= check_box_tag 'prefs[users][added_as_coowner]', true, @user.prefs[:users][:added_as_coowner] %> - <%= label_tag 'prefs[users][added_as_coowner]', 'A plan has been shared with me', :class => 'checkbox-label' %> -
-
- <%= check_box_tag 'prefs[users][admin_privileges]', true, @user.prefs[:users][:admin_privileges] %> - <%= label_tag 'prefs[users][admin_privileges]', 'Admin privileges granted to me', :class => 'checkbox-label' %> -
+

All Users

+
+ <%= check_box_tag 'prefs[users][new_comment]', true, @user.prefs[:users][:new_comment] %> + <%= label_tag 'prefs[users][new_comment]', 'A new comment has been added to my DMP', :class => 'checkbox-label' %> +
+
+ <%= check_box_tag 'prefs[users][added_as_coowner]', true, @user.prefs[:users][:added_as_coowner] %> + <%= label_tag 'prefs[users][added_as_coowner]', 'A plan has been shared with me', :class => 'checkbox-label' %> +
+
+ <%= check_box_tag 'prefs[users][admin_privileges]', true, @user.prefs[:users][:admin_privileges] %> + <%= label_tag 'prefs[users][admin_privileges]', 'Admin privileges granted to me', :class => 'checkbox-label' %> +
-
-

DMP owners and co-owners

-
- <%= check_box_tag 'prefs[owners_and_coowners][visibility_changed]', true, @user.prefs[:owners_and_coowners][:visibility_changed] %> - <%= label_tag 'prefs[owners_and_coowners][visibility_changed]', "My DMP's visibility has changed", :class => 'checkbox-label' %> -
+
+

DMP owners and co-owners

+
+ <%= check_box_tag 'prefs[owners_and_coowners][visibility_changed]', true, @user.prefs[:owners_and_coowners][:visibility_changed] %> + <%= label_tag 'prefs[owners_and_coowners][visibility_changed]', "My DMP's visibility has changed", :class => 'checkbox-label' %> +
-
-

DMP administrators

-
- <%= check_box_tag 'prefs[admins][template_published]', true, @user.prefs[:admins][:template_published] %> - <%= label_tag 'prefs[admins][template_published]', 'An organisational template is published', :class => 'checkbox-label' %> -
-
- <%= check_box_tag 'prefs[admins][template_unpublished]', true, @user.prefs[:admins][:template_unpublished] %> - <%= label_tag 'prefs[admins][template_unpublished]', 'An organisational template is unpublished', :class => 'checkbox-label' %> -
-
- <%= check_box_tag 'prefs[admins][feedback_requested]', true, @user.prefs[:admins][:feedback_requested] %> - <%= label_tag 'prefs[admins][feedback_requested]', 'A user has requested feedback on a DMP', :class => 'checkbox-label' %> -
+
+

DMP administrators

+
+ <%= check_box_tag 'prefs[admins][template_published]', true, @user.prefs[:admins][:template_published] %> + <%= label_tag 'prefs[admins][template_published]', 'An organisational template is published', :class => 'checkbox-label' %> +
+
+ <%= check_box_tag 'prefs[admins][template_unpublished]', true, @user.prefs[:admins][:template_unpublished] %> + <%= label_tag 'prefs[admins][template_unpublished]', 'An organisational template is unpublished', :class => 'checkbox-label' %> +
+
+ <%= check_box_tag 'prefs[admins][feedback_requested]', true, @user.prefs[:admins][:feedback_requested] %> + <%= label_tag 'prefs[admins][feedback_requested]', 'A user has requested feedback on a DMP', :class => 'checkbox-label' %> +
-
-
- - <%= submit_tag 'Save', class: 'btn btn-primary' %> - <%= link_to 'Cancel', '#', style: 'text-decoration:none;' %> -
- <% end %> +
+
+ + <%= submit_tag 'Save', class: 'btn btn-primary' %> +
+ <% end %>
\ No newline at end of file diff --git a/lib/assets/javascripts/dmproadmap/utils.js b/lib/assets/javascripts/dmproadmap/utils.js index 33ab2df..240510d 100644 --- a/lib/assets/javascripts/dmproadmap/utils.js +++ b/lib/assets/javascripts/dmproadmap/utils.js @@ -21,9 +21,10 @@ // Display tooltips when the item has focus or hover $("[data-toggle='tooltip']").on('focus', function(e){ - var y = $(this).width() + 35; - $(this).parent().append('
' + $(this).attr('data-content') + '' + $(this).attr('data-content') + '