diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index dcc6d08..85f55f1 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -7,7 +7,7 @@ * Comment on the Github issue (or create one if one does not exist) and let us know that you're working on it. * Fork the project (if you have not already) or rebase your fork so that it is up to date with the current repository's **`development`** branch * Create a new branch in your fork. This will ensure that you are able to work at your own pace and continue to pull in any updates made to this project. - * Make your changes in the new branch. When you have finished your work, squash all the commits on the branch that you are working on: + * Make your changes in the new branch. When you have finished your work (e.g. 3 commits), squash all the commits on the branch that you are working on: ```bash git rebase -i HEAD~n # Where n is the number of commits you want to squash ``` @@ -27,6 +27,7 @@ # Rebase 6c51182..59df9aa onto 6c51182 ``` + Then, change `pick` to `squash` for the 2nd and 3rd commits (to squash them into the single first commit). * To make sure that your version of the **`development`** branch is still up to date with this project, switch to it and synchronise: ```bash git checkout development diff --git a/app/views/guidance_groups/admin_edit.html.erb b/app/views/guidance_groups/admin_edit.html.erb index 3f3e3f5..c390fc6 100644 --- a/app/views/guidance_groups/admin_edit.html.erb +++ b/app/views/guidance_groups/admin_edit.html.erb @@ -6,33 +6,54 @@
- <%= form_for(@guidance_group, url: admin_update_guidance_group_path(@guidance_group), html: {method: :put, class: 'roadmap-form bordered'}) do |f| %> -
-
- <%= f.label _('Name'), for: :name %> - <%= 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.') %> + <%= form_for(@guidance_group, url: admin_update_guidance_group_path(@guidance_group), html: {method: :put, id: "admin_update_guidance_group_form", class: "form-horizontal"}) do |f| %> + +
+ <%= f.label _('Name'), for: :name, class: "col-sm-2 control-label" %> +
+ <%= f.text_field :name, as: :string, class: "form-control" %> +
+
-
- <%= f.label _('Published'), for: :published %> - <%= 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 _('Published'), for: :published, class: "col-sm-2 control-label" %> +
+ <%= 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.label _('Optional Subset'), for: :optional_subset %> - <%= 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') %> +
+ <%= f.label _('Optional Subset'), for: :optional_subset, class: "col-sm-2 control-label" %> +
+ <%= f.check_box :optional_subset %> <%= _('e.g. School/ Department') %> +
+
- -
-
-
 
- <%= f.submit _('Save'), class: 'btn btn-primary', role:"button" %> - <% if @guidance_group.published == false then %> - <%= f.submit _('Publish'), name: "save_publish", class: "btn btn-primary", role:"button" %> - <% end %> +
+
+ <%= f.submit _('Save'), class: 'btn btn-primary' %> + <% if @guidance_group.published == false then %> + <%= f.submit _('Publish'), name: "save_publish", class: "btn btn-primary" %> + <% end %> +
-
+ <% end %>
diff --git a/app/views/guidance_groups/admin_new.html.erb b/app/views/guidance_groups/admin_new.html.erb index 3893fe1..9ade9d6 100644 --- a/app/views/guidance_groups/admin_new.html.erb +++ b/app/views/guidance_groups/admin_new.html.erb @@ -6,24 +6,37 @@
- <%= form_for :guidance_group, url: {action: "admin_create"}, html: {class: 'roadmap-form bordered'} do |f| %> -
-
- <%= f.label _('Name'), for: :name %> - <%= 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.') %> + <%= form_for :guidance_group, url: {action: "admin_create"}, id: 'admin_create_guidance_group_form', class: "form-horizontal" do |f| %> +
+ <%= f.label _('Name'), for: :name, class: "col-sm-2 control-label" %> +
+ <%= f.text_field :name, as: :string, class: "form-control" %> +
+
-
- <%= f.label _('Optional Subset'), for: :optional_subset %> - <%= 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') %> + +
+ <%= f.label _('Optional Subset'), for: :optional_subset, class: "col-sm-2 control-label" %> +
+ <%= f.check_box :optional_subset %> <%= _('e.g. School/ Department') %> +
+
-
-
-
 
- <%= f.submit _('Save'), name: "draft", class: "btn btn-primary", role:"button"%> +
+
+ <%= f.submit _('Save'), name: "draft", class: 'btn btn-primary' %> +
-
<% end %>
diff --git a/app/views/layouts/_es5_scripts.html.erb b/app/views/layouts/_es5_scripts.html.erb index fbcd0e7..2cc8522 100644 --- a/app/views/layouts/_es5_scripts.html.erb +++ b/app/views/layouts/_es5_scripts.html.erb @@ -33,6 +33,7 @@ <%= javascript_include_tag 'views/home/index.js' %> <%= javascript_include_tag 'views/orgs/admin_edit.js' %> <%= javascript_include_tag 'views/plans/available_templates.js' %> + <%= javascript_include_tag 'views/plans/index.js' %> <%= javascript_include_tag 'views/registrations/sign_in_sign_up.js' %> <%= javascript_include_tag 'views/shared/login_form.js' %> <%= javascript_include_tag 'views/shared/register_form.js' %> diff --git a/app/views/orgs/admin_edit.html.erb b/app/views/orgs/admin_edit.html.erb index d13180e..daef359 100644 --- a/app/views/orgs/admin_edit.html.erb +++ b/app/views/orgs/admin_edit.html.erb @@ -7,7 +7,7 @@
<%= form_for(@org, url: admin_update_org_path(@org), html: { multipart: true, method: :put, id: "edit_org_details_form", class: "form-horizontal" } ) do |f| %> - +
<%= f.label :name, 'Organization Name', class: "col-sm-2 control-label" %>
diff --git a/lib/assets/javascripts/application.js b/lib/assets/javascripts/application.js index f51454c..89cf27c 100644 --- a/lib/assets/javascripts/application.js +++ b/lib/assets/javascripts/application.js @@ -9,6 +9,7 @@ import './views/devise/registrations/edit'; import './views/notes/index'; import './views/orgs/shibboleth_ds'; + import './views/phases/edit'; import './views/phases/show'; import './views/plans/download';