diff --git a/app/views/devise/registrations/_external_identifier_orcid.html.erb b/app/views/devise/registrations/_external_identifier_orcid.html.erb index 76c6649..b5e9acb 100644 --- a/app/views/devise/registrations/_external_identifier_orcid.html.erb +++ b/app/views/devise/registrations/_external_identifier_orcid.html.erb @@ -1,15 +1,13 @@ -
- <% 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: "") %> +<% 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: "") %> +<% else %> + <% if scheme.user_landing_url.nil? %> + <%= _("Your account has been linked to #{scheme.description}.") %> <% 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: "") %> - <% 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 (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: "") %> <% end %> -
\ No newline at end of file + <% 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?")} %> +<% end %> diff --git a/app/views/devise/registrations/_external_identifier_shibboleth.html.erb b/app/views/devise/registrations/_external_identifier_shibboleth.html.erb index 65ca8fb..9daa7f1 100644 --- a/app/views/devise/registrations/_external_identifier_shibboleth.html.erb +++ b/app/views/devise/registrations/_external_identifier_shibboleth.html.erb @@ -1,21 +1,19 @@ -
- <% if id.nil? || id.identifier == '' %> - <%= link_to "#{_("Link account with #{scheme.description} ID")}", - Rails.application.routes.url_helpers.send( - "user_#{scheme.name.downcase}_omniauth_authorize_path" - ), - title: t("identifier_schemes.schemes.#{scheme.name}.connect_tooltip", default: "") - %> +<% if id.nil? || id.identifier == '' %> + <%= link_to "#{_("Link account with #{scheme.description} ID")}", + Rails.application.routes.url_helpers.send( + "user_#{scheme.name.downcase}_omniauth_authorize_path" + ), + 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 %> - <% 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', - 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, - data: {confirm: _("Are you sure you want to unlink #{scheme.description} ID?")} %> + <%= link_to "#{_("Your account has been linked to #{scheme.description}.")}", "#{scheme.user_landing_url}/#{id.identifier}", target: '_blank', + title: t("identifier_schemes.schemes.#{scheme.name}.connect_tooltip", default: "") %> <% end %> -
\ No newline at end of file + <% 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?")} %> +<% end %> diff --git a/app/views/devise/registrations/_password_details.html.erb b/app/views/devise/registrations/_password_details.html.erb index a5b7937..26cf54b 100644 --- a/app/views/devise/registrations/_password_details.html.erb +++ b/app/views/devise/registrations/_password_details.html.erb @@ -1,44 +1,43 @@ -<%= form_for(resource, as: resource_name, url: registration_path(resource_name, tab: 'password-details-tab'), html: {method: :put, class: "roadmap-form white_background"}) do |f| %> -
- <%= _('If you would like to change your password please complete the following fields.') %> +<%= form_for(resource, as: resource_name, url: registration_path(resource_name, tab: 'password-details-tab'), html: {method: :put, id: "password_details_registration_form", class: "form-horizontal"}) do |f| %> - <%= hidden_field_tag :skip_personal_details, "true" %> +

<%= _('If you would like to change your password please complete the following fields.') %>

-
- <%= f.label(:current_password, _('Current password'), class: 'required') %> - <%= f.password_field(:current_password, class: 'left-indent required input-medium') %> - -
+ <%= hidden_field_tag :skip_personal_details, "true" %> -
- <%= f.label(:password, _('New password'), class: 'required') %> - <%= f.password_field(:password, class: 'left-indent required input-medium', id: 'user_new_password') %> - +
+ <%= f.label(:current_password, _('Current password'), class: 'col-sm-2 control-label') %> +
+ <%= f.password_field(:current_password, class: 'form-control', "aria-required": true ) %>
+
-
- <%= f.label(:password_confirmation, _('Password confirmation'), class: 'required') %> - <%= f.password_field(:password_confirmation, class: 'left-indent required input-medium') %> - +
+ <%= f.label(:password, _('New password'), class: 'col-sm-2 control-label') %> +
+ <%= f.password_field(:password, class: 'form-control', "aria-required": true , id: 'user_new_password') %>
+
-
- <%= label_tag(:password_show, _('Show passwords')) %> - <%= check_box_tag(:password_show, "1", false, class: 'left-indent') %> +
+ <%= f.label(:password_confirmation, _('Password confirmation'), class: 'col-sm-2 control-label') %> +
+ <%= f.password_field(:password_confirmation, class: 'form-control', "aria-required": true, ) %>
- -
-
-
 
- <%= 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')} %> +
+ +
+
+
+ +
-
-<% end %> \ No newline at end of file + + +
+
+ <%= f.button(_('Save'), class: "btn btn-default", type: "submit") %> +
+
+<% end %> diff --git a/app/views/devise/registrations/_personal_details.html.erb b/app/views/devise/registrations/_personal_details.html.erb index 5ed5eb3..e08b028 100644 --- a/app/views/devise/registrations/_personal_details.html.erb +++ b/app/views/devise/registrations/_personal_details.html.erb @@ -1,121 +1,122 @@ -<%= form_for(resource, as: resource_name, url: registration_path(resource_name, tab: 'personal-details-tab'), html: {method: :put, class: "roadmap-form white_background"}) do |f| %> +<%= form_for(resource, as: resource_name, url: registration_path(resource_name, tab: 'personal-details-tab'), html: {method: :put, id: "personal_details_registration_form", class: "form-horizontal"}) 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.") %> +

-
-

- <%= _("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" %> + +
+ <%= 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) %> +
-
- -
- <%= _('You can edit any of the details below.') %> +
+ <%= f.label(:firstname, _('First name'), class: "col-sm-2 control-label") %> +
+ <%= f.text_field(:firstname, class: 'form-control', "aria-required": true, value: @user.firstname) %> +
+
- <%= hidden_field_tag :unlink_flag, "false", id: "unlink_flag" %> - <%= hidden_field_tag :skip_personal_details, "false" %> +
+ <%= f.label(:surname, _('Last name'), class: "col-sm-2 control-label") %> +
+ <%= f.text_field(:surname, class: 'form-control', "aria-required": true, value: @user.surname) %> +
+
-
- <%= f.label(:email, _('Email'), class: 'required') %> - <%= f.email_field(:email, class: 'left-indent required input-small', - title: _('Please enter your current password below when changing your email address.'), - value: @user.email) %> - -
+
+ <%= 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.label(:firstname, _('First name'), class: 'required') %> - <%= f.text_field(:firstname, class: 'input-small required left-indent', value: @user.firstname) %> -
-
- <%= f.label(:surname, _('Last name'), class: 'required') %> - <%= f.text_field(:surname, class: 'input-small required left-indent', value: @user.surname) %> -
+
+ <%= f.label(:password, _('Password'), class: "col-sm-2 control-label") %> +
+ <%= f.password_field(:password, class: 'form-control', "aria-required": true) %> +
+
-
- <%= f.label(:recovery_email, _('Recovery email'), class: 'required') %> - <%= f.email_field(:recovery_email, class: 'left-indent required input-small', - title: _('This email will be used to recover your account if you change institutions'), - value: @user.recovery_email) %> - -
+
+ <%= f.label(:org_name, _('Organisation'), class: "col-sm-2 control-label") %> +
+ <%= 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: 'form-control'} %> -
- <%= f.label(:password, _('Password'), class: 'required') %> - <%= f.password_field(:password, class: 'left-indent required input-small') %> - -
- -
- <%= f.label(:org_name, _('Organisation')) %> - <%= 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 input-large'} %> +
+ +
<% other_organisations = Org.where("parent_id IS ? AND is_other = ?", nil, true).pluck(:id) %> -
- <%= f.label _('Organisation name'), for: :other_organisation %> - <%= f.text_field :other_organisation, :autocomplete => "off", :class => 'left-indent input-medium has-tooltip', 'data-toggle' => "tooltip", 'data-container' => "body", 'title' => _('Please enter the name of your organisation.') %> +
+ <%= 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.') %>
-
+
+
- <% if MANY_LANGUAGES %> -
- <% lang_id = current_user.language.nil? ? Language.id_for(FastGettext.default_locale) : current_user.language.id %> - <%= f.label(:language_id, _('Language')) %> - <%= select_tag("user[language_id]", + <% if MANY_LANGUAGES %> +
+ <% lang_id = current_user.language.nil? ? Language.id_for(FastGettext.default_locale) : current_user.language.id %> + <%= f.label(:language_id, _('Language'), class: "col-sm-2 control-label") %> +
+ <%= select_tag("user[language_id]", options_from_collection_for_select(@languages, "id", "name", lang_id), - class: 'input-small') %> -
- <% end %> - - <% @identifier_schemes.each do |scheme| %> -
- <% if scheme.name == 'shibboleth' %> - - <% else %> - <%= label_tag(:scheme_name, scheme.name.capitalize ) %> - <% 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 %>
- <%= label_tag(:api_information, _('API Information')) %> -
<%= 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')} %> + class: "form-control") %>
+
+ <% end %> -
+ <% @identifier_schemes.each do |scheme| %> +
+ <% if scheme.name == 'shibboleth' %> + + <% else %> + <%= label_tag(:scheme_name, scheme.name.capitalize, class: "col-sm-2 control-label") %> + <% 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'), 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")%>
+
+ <% end %> + +
+
+ <%= f.button(_('Save'), class: "btn btn-default", type: "submit") %> +
<% end %> + + diff --git a/app/views/devise/registrations/edit.html.erb b/app/views/devise/registrations/edit.html.erb index 219bee5..c93f4a1 100644 --- a/app/views/devise/registrations/edit.html.erb +++ b/app/views/devise/registrations/edit.html.erb @@ -6,35 +6,31 @@
-
-
    -