From 0fd80a21af98adac58ec12c9d0718e2e27039980 Mon Sep 17 00:00:00 2001 From: bhavi Date: Thu, 7 Sep 2017 16:35:16 -0500 Subject: [PATCH 1/9] adding bootstrap classes to the form --- .../registrations/_personal_details.html.erb | 61 ++++++++++--------- app/views/devise/registrations/edit.html.erb | 28 ++++----- 2 files changed, 43 insertions(+), 46 deletions(-) diff --git a/app/views/devise/registrations/_personal_details.html.erb b/app/views/devise/registrations/_personal_details.html.erb index 5ed5eb3252..a506ae04c1 100644 --- a/app/views/devise/registrations/_personal_details.html.erb +++ b/app/views/devise/registrations/_personal_details.html.erb @@ -1,4 +1,4 @@ -<%= 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, class: "form-horizontal"}) do |f| %>

@@ -9,46 +9,47 @@

-
+
<%= _('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: 'required') %> - <%= f.email_field(:email, class: 'left-indent required input-small', +
+ <%= f.label(:email, _('Email'), class: 'required col-sm-2 control-label') %> + <%= f.email_field(:email, class: 'required form-control', title: _('Please enter your current password below when changing your email address.'), value: @user.email) %> - +
-
- <%= f.label(:firstname, _('First name'), class: 'required') %> - <%= f.text_field(:firstname, class: 'input-small required left-indent', value: @user.firstname) %> +
+ <%= f.label(:firstname, _('First name'), class: 'required col-sm-2 control-label') %> + <%= f.text_field(:firstname, class: 'required form-control', 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(:surname, _('Last name'), class: 'required col-sm-2 control-label') %> + <%= f.text_field(:surname, class: 'required form-control', value: @user.surname) %>
-
- <%= f.label(:recovery_email, _('Recovery email'), class: 'required') %> - <%= f.email_field(:recovery_email, class: 'left-indent required input-small', +
+ <%= f.label(:recovery_email, _('Recovery email'), class: 'required col-sm-2 control-label') %> + <%= f.email_field(:recovery_email, class: ' required form-control', title: _('This email will be used to recover your account if you change institutions'), value: @user.recovery_email) %> + class="error-tooltip-right ">
-
- <%= f.label(:password, _('Password'), class: 'required') %> - <%= f.password_field(:password, class: 'left-indent required input-small') %> +
+ <%= f.label(:password, _('Password'), class: 'required col-sm-2 control-label') %> + <%= f.password_field(:password, class: ' required form-control') %> + class="error-tooltip-right ">
-
+
<%= f.label(:org_name, _('Organisation')) %> <%= render partial: "shared/accessible_combobox", locals: {name: "#{resource_name}[org_name]", @@ -56,22 +57,22 @@ default_selection: @default_org, models: @orgs, attribute: 'name', - classes: 'left-indent input-large'} %> + classes: ' 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.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')) %> + <%= 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') %> @@ -79,7 +80,7 @@ <% end %> <% @identifier_schemes.each do |scheme| %> -
+
<% if scheme.name == 'shibboleth' %>