diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 27731cc..2c30573 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -17,10 +17,10 @@
On your local machine, add a remote that points to the original DMPRoadmap codebase. This will allow you to pull down the latest changes and sync up your forked repository
-Run the following from your local clone of the repository to setup a remote that will allow you to pull down the latest changes from DMPRoadmap. Then pull down the contributions branch:
+Run the following from your local clone of the repository to setup a remote that will allow you to pull down the latest changes from DMPRoadmap. Then pull down the development branch:
```bash
git remote add upstream https://github.com/DMPRoadmap/roadmap.git
-git fetch contributions
+git fetch development
```
### Pulling down the latest changes from DMPRoadmap into your fork
@@ -31,12 +31,12 @@
### Create a new feature/bug fix/translations branch
-You should always base your new branch off of the contributions branch. We keep this branch up to date with the latest release. Checkout the contributions branch, sync it with DMPRoadmap and then push the latest up to your own fork:
+You should always base your new branch off of the development branch. We keep this branch up to date with the latest release. Checkout the development branch, sync it with DMPRoadmap and then push the latest up to your own fork:
```bash
-git checkout contributions
-git pull upstream contributions
-git push origin contributions
+git checkout development
+git pull upstream development
+git push origin development
git checkout -b [my-branch]
```
@@ -50,7 +50,7 @@
When you are finished making changes, we ask that all contributors squash their commits into a single git commit. This helps us keep the git history clean and makes it easier to revert any changes if necessary.
-_Note that if this is your first time rebasing a branch we recommend making a buckup of the branch first since a rebase creates the potential for you to lose your changes if its done incorrectly: `git checkout -b [feature branch]-bak && git checkout [feature branch]`_
+_Note that if this is your first time rebasing a branch we recommend making a backup of the branch first since a rebase creates the potential for you to lose your changes if its done incorrectly: `git checkout -b [feature branch]-bak && git checkout [feature branch]`_
To rebase your feature branch you should follow this example:
@@ -130,7 +130,7 @@
Once your changes are complete, push your branch up to your fork, `git push origin [my-branch]`
-Then login to Github and go to your fork. Select your branch from the list and click 'New Pull Request'. On the page that opens, select the 'contributions' branch on the DMPRoadmap section.
+Then login to Github and go to your fork. Select your branch from the list and click 'New Pull Request'. On the page that opens, select the 'development' branch on the DMPRoadmap section.
Then review your code and provide us with detailed comments about what the changes are doing (e.g. adding a new feature, fixing a recorded bug, etc.). If you are working off of one of our Github issues, then please note that in the PR message with a `Fixes #1234`.
@@ -142,11 +142,11 @@
### Acceptence of your PR
-Once your code has been approved a member of the core development team will merge it into the contributions branch and then into development when we are ready to include it in a sprint.
+Once your code has been approved a member of the core development team will merge it into the development branchand include it in an upcoming release.
At this point its a good idea to delete the branch from your fork in Github and also delete it from your local machine via:
```bash
-git checkout contributions
+git checkout development
git branch -D [my-branch]
```
diff --git a/app/controllers/concerns/paginable.rb b/app/controllers/concerns/paginable.rb
index 0c58199..ef6fcc9 100644
--- a/app/controllers/concerns/paginable.rb
+++ b/app/controllers/concerns/paginable.rb
@@ -96,7 +96,7 @@
if @paginable_params[:sort_field] == sort_field
className = upcasing_sort_direction == 'ASC'? 'fa-sort-asc' : 'fa-sort-desc'
end
- return raw("")
+ return raw("Sort by #{sort_field.split('.').first}")
end
# Returns the sort url for a given sort_field.
def sort_link_url(sort_field)
diff --git a/app/controllers/org_admin/questions_controller.rb b/app/controllers/org_admin/questions_controller.rb
index 555b105..69d008b 100644
--- a/app/controllers/org_admin/questions_controller.rb
+++ b/app/controllers/org_admin/questions_controller.rb
@@ -1,7 +1,7 @@
module OrgAdmin
class QuestionsController < ApplicationController
include Versionable
-
+
respond_to :html
after_action :verify_authorized
@@ -9,32 +9,32 @@
def show
question = Question.includes(:annotations, :question_options, section: { phase: :template }).find(params[:id])
authorize question
- render partial: 'show', locals: {
- template: question.section.phase.template,
+ render partial: 'show', locals: {
+ template: question.section.phase.template,
section: question.section,
- question: question
+ question: question
}
end
-
+
# GET /org_admin/templates/[:template_id]/phases/[:phase_id]/sections/[:section_id]/question/[:id]/edit
def edit
question = Question.includes(:annotations, :question_options, section: { phase: :template }).find(params[:id])
authorize question
- render partial: 'edit', locals: {
- template: question.section.phase.template,
+ render partial: 'edit', locals: {
+ template: question.section.phase.template,
section: question.section,
- question: question
+ question: question
}
end
-
+
# GET /org_admin/templates/[:template_id]/phases/[:phase_id]/sections/[:section_id]/questions/new
def new
section = Section.includes(:questions, phase: :template).find(params[:section_id])
nbr = section.questions.maximum(:number)
question = Question.new({ section_id: section.id, question_format: QuestionFormat.find_by(title: 'Text area'), number: nbr.present? ? nbr + 1 : 1 })
authorize question
- render partial: 'form', locals: {
- template: section.phase.template,
+ render partial: 'form', locals: {
+ template: section.phase.template,
section: section,
question: question,
method: 'post',
@@ -66,12 +66,15 @@
authorize question
begin
question = get_modifiable(question)
- # Need to reattach the incoming annotation's and question_options to the
+ # Need to reattach the incoming annotation's and question_options to the
# modifiable (versioned) question
attrs = question_params
attrs = transfer_associations(question) if question.id != params[:id]
# If the user unchecked all of the themes set the association to an empty array
- attrs[:theme_ids] = [] unless attrs[:theme_ids].present?
+ # add check for number present to ensure this is not just an annotation
+ if attrs[:theme_ids].blank? && attrs[:number].present?
+ attrs[:theme_ids] = []
+ end
if question.update!(attrs)
flash[:notice] = success_message(_('question'), _('updated'))
else
@@ -83,14 +86,14 @@
end
if question.section.phase.template.customization_of.present?
redirect_to org_admin_template_phase_path({
- template_id: question.section.phase.template.id,
- id: question.section.phase.id,
+ template_id: question.section.phase.template.id,
+ id: question.section.phase.id,
section: question.section.id
})
else
redirect_to edit_org_admin_template_phase_path({
- template_id: question.section.phase.template.id,
- id: question.section.phase.id,
+ template_id: question.section.phase.template.id,
+ id: question.section.phase.id,
section: question.section.id
})
end
@@ -112,8 +115,8 @@
flash[:alert] = _('Unable to create a new version of this template.')
end
redirect_to edit_org_admin_template_phase_path({
- template_id: section.phase.template.id,
- id: section.phase.id,
+ template_id: section.phase.template.id,
+ id: section.phase.id,
section: section.id
})
end
@@ -122,23 +125,23 @@
def question_params
params.require(:question).permit(:number, :text, :question_format_id, :option_comment_display, :default_value, question_options_attributes: [:id, :number, :text, :is_default, :_destroy], annotations_attributes: [:id, :text, :org_id, :org, :type], theme_ids: [])
end
-
- # When a template gets versioned by changes to one of its questions we need to loop
+
+ # When a template gets versioned by changes to one of its questions we need to loop
# through the incoming params and ensure that the annotations and question_options
# get attached to the new question
def transfer_associations(question)
attrs = question_params
if attrs[:annotations_attributes].present?
attrs[:annotations_attributes].each_key do |key|
- old_annotation = question.annotations.select do |a|
- a.org_id.to_s == attrs[:annotations_attributes][key][:org_id] && a.type.to_s == attrs[:annotations_attributes][key][:type]
+ old_annotation = question.annotations.select do |a|
+ a.org_id.to_s == attrs[:annotations_attributes][key][:org_id] && a.type.to_s == attrs[:annotations_attributes][key][:type]
end
attrs[:annotations_attributes][key][:id] = old_annotation.first.id unless old_annotation.empty?
end
end
# TODO: This question_options id swap feel fragile. We cannot really match on any of the
# data elements because the user may have changed them so we rely on its position
- # within the array/query since they should be equivalent.
+ # within the array/query since they should be equivalent.
if attrs[:question_options_attributes].present?
attrs[:question_options_attributes].each_key do |key|
attrs[:question_options_attributes][key][:id] = question.question_options[key.to_i].id.to_s if question.question_options[key.to_i].present?
@@ -147,4 +150,4 @@
attrs
end
end
-end
\ No newline at end of file
+end
diff --git a/app/controllers/orgs_controller.rb b/app/controllers/orgs_controller.rb
index 6376398..fc734e3 100644
--- a/app/controllers/orgs_controller.rb
+++ b/app/controllers/orgs_controller.rb
@@ -29,11 +29,11 @@
# Only allow super admins to change the org types and shib info
if current_user.can_super_admin?
# Handle Shibboleth identifiers if that is enabled
- if Rails.application.config.shibboleth_use_filtered_discovery_service
+ if Rails.application.config.shibboleth_use_filtered_discovery_service && params[:shib_id].present?
shib = IdentifierScheme.find_by(name: 'shibboleth')
shib_settings = @org.org_identifiers.select{ |ids| ids.identifier_scheme == shib}.first
- if params[:shib_id].present? || params[:shib_domain].present?
+ if !params[:shib_id].blank?
shib_settings = OrgIdentifier.new(org: @org, identifier_scheme: shib) unless shib_settings.present?
shib_settings.identifier = params[:shib_id]
shib_settings.attrs = {domain: params[:shib_domain]}
@@ -81,7 +81,7 @@
session['org_id'] = params[:org_name]
scheme = IdentifierScheme.find_by(name: 'shibboleth')
- shib_entity = OrgIdentifier.where(org_id: params[:org_name], identifier_scheme: scheme)
+ shib_entity = OrgIdentifier.where(org_id: params['shib-ds'][:org_id], identifier_scheme: scheme)
if !shib_entity.empty?
# Force SSL
@@ -104,6 +104,6 @@
private
def org_params
params.require(:org).permit(:name, :abbreviation, :logo, :contact_email, :contact_name, :remove_logo, :org_type,
- :feedback_enabled, :feedback_email_subject, :feedback_email_msg, :banner_text)
+ :feedback_enabled, :feedback_email_msg)
end
end
diff --git a/app/controllers/plans_controller.rb b/app/controllers/plans_controller.rb
index 6cba2fb..a5deb9a 100644
--- a/app/controllers/plans_controller.rb
+++ b/app/controllers/plans_controller.rb
@@ -3,6 +3,8 @@
require 'pp'
helper PaginableHelper
helper SettingsTemplateHelper
+ include FeedbacksHelper
+
after_action :verify_authorized, except: [:overview]
def index
@@ -165,6 +167,7 @@
guidance_groups_ids = plan.guidance_groups.collect(&:id)
guidance_groups = GuidanceGroup.where(published: true, id: guidance_groups_ids)
+
# Since the answers have been pre-fetched through plan (see Plan.load_for_phase)
# we create a hash whose keys are question id and value is the answer associated
answers = plan.answers.reduce({}){ |m, a| m[a.question_id] = a; m }
@@ -354,18 +357,19 @@
end
def request_feedback
- plan = Plan.find(params[:id])
- authorize plan
+ @plan = Plan.find(params[:id])
+ authorize @plan
alert = _('Unable to submit your request for feedback at this time.')
begin
- if plan.request_feedback(current_user)
- redirect_to share_plan_path(plan), notice: _('Your request for feedback has been submitted.')
+ if @plan.request_feedback(current_user)
+ redirect_to share_plan_path(@plan),
+ notice: _(request_feedback_flash_notice)
else
- redirect_to share_plan_path(plan), alert: alert
+ redirect_to share_plan_path(@plan), alert: alert
end
rescue Exception
- redirect_to share_plan_path(plan), alert: alert
+ redirect_to share_plan_path(@plan), alert: alert
end
end
@@ -451,4 +455,15 @@
end
plan.delete(src_plan_key)
end
+
+ # Flash notice for successful feedback requests
+ #
+ # @return [String]
+ def request_feedback_flash_notice
+ # Use the generic feedback confirmation message unless the Org has
+ # specified one
+ text = current_user.org.feedback_email_msg ||
+ feedback_confirmation_default_message
+ feedback_constant_to_text(text, current_user, @plan, current_user.org)
+ end
end
diff --git a/app/controllers/roles_controller.rb b/app/controllers/roles_controller.rb
index 3d69e9e..bd73760 100644
--- a/app/controllers/roles_controller.rb
+++ b/app/controllers/roles_controller.rb
@@ -7,7 +7,7 @@
registered = true
@role = Role.new(role_params)
authorize @role
-
+
access_level = params[:role][:access_level].to_i
@role.set_access_level(access_level)
message = ''
@@ -30,7 +30,8 @@
if @role.save
if registered
deliver_if(recipients: user, key: 'users.added_as_coowner') do |r|
- UserMailer.sharing_notification(@role, r, current_user).deliver_now
+ UserMailer.sharing_notification(@role, r, inviter: current_user)
+ .deliver_now
end
end
flash[:notice] = message
@@ -73,7 +74,7 @@
end
redirect_to controller: 'plans', action: 'share', id: @role.plan.id
end
-
+
# This function makes user's role on a plan inactive - i.e. "removes" this from their plans
def deactivate
role = Role.find(params[:id])
diff --git a/app/helpers/feedbacks_helper.rb b/app/helpers/feedbacks_helper.rb
new file mode 100644
index 0000000..15fca1b
--- /dev/null
+++ b/app/helpers/feedbacks_helper.rb
@@ -0,0 +1,18 @@
+module FeedbacksHelper
+ def feedback_confirmation_default_subject
+ _('%{application_name}: Your plan has been submitted for feedback')
+ end
+
+ def feedback_confirmation_default_message
+ _('
Hello %{user_name}.
'\
+ '
Your plan "%{plan_name}" has been submitted for feedback from an administrator at your organisation. '\
+ 'If you have questions pertaining to this action, please contact us at %{organisation_email}.
')
+ end
+
+ def feedback_constant_to_text(text, user, plan, org)
+ _("#{text}") % {application_name: Rails.configuration.branding[:application][:name],
+ user_name: user.name,
+ plan_name: plan.title,
+ organisation_email: org.contact_email}
+ end
+end
diff --git a/app/helpers/mailer_helper.rb b/app/helpers/mailer_helper.rb
index a7ee2df..d837693 100644
--- a/app/helpers/mailer_helper.rb
+++ b/app/helpers/mailer_helper.rb
@@ -1,21 +1,5 @@
module MailerHelper
include PermsHelper
- def feedback_confirmation_default_subject
- _('%{application_name}: Your plan has been submitted for feedback')
- end
-
- def feedback_confirmation_default_message
- _('
Hello %{user_name}.
'\
- '
Your plan "%{plan_name}" has been submitted for feedback from an administrator at your organisation. '\
- 'If you have questions pertaining to this action, please contact us at %{organisation_email}.
')
- end
-
- def feedback_constant_to_text(text, user, plan, org)
- _("#{text}") % {application_name: Rails.configuration.branding[:application][:name],
- user_name: user.name,
- plan_name: plan.title,
- organisation_email: org.contact_email}
- end
# Returns an unordered HTML list with the permissions associated to the user passed
def privileges_list(user)
@@ -23,7 +7,7 @@
names = name_and_text
r= "
"
user.perms.each do |p|
- r+="
#{names[p.name.to_sym]}
" if names.has_key?(p.name.to_sym)
+ r+="
#{names[p.name.to_sym]}
" if names.has_key?(p.name.to_sym)
end
r+= "
"
end
diff --git a/app/helpers/orgs_helper.rb b/app/helpers/orgs_helper.rb
new file mode 100644
index 0000000..f106fa1
--- /dev/null
+++ b/app/helpers/orgs_helper.rb
@@ -0,0 +1,19 @@
+module OrgsHelper
+ # frozen_string_literal: true
+
+ DEFAULT_EMAIL = '%{organisation_email}'
+
+ # Tooltip string for Org feedback form.
+ #
+ # @param org [Org] The current Org we're updating feedback form for.
+ # @return [String] The tooltip message
+ def tooltip_for_org_feedback_form(org)
+ email = org.contact_email.presence || DEFAULT_EMAIL
+ _("SAMPLE MESSAGE: A data librarian from %{org_name} will respond to your request within 48
+ hours. If you have questions pertaining to this action please contact us
+ at %{organisation_email}.") % {
+ organisation_email: email,
+ org_name: org.name
+ }
+ end
+end
diff --git a/app/mailers/user_mailer.rb b/app/mailers/user_mailer.rb
index 6a16a99..3dcd176 100644
--- a/app/mailers/user_mailer.rb
+++ b/app/mailers/user_mailer.rb
@@ -1,95 +1,97 @@
class UserMailer < ActionMailer::Base
include MailerHelper
helper MailerHelper
+ helper FeedbacksHelper
+
default from: Rails.configuration.branding[:organisation][:email]
-
+
def welcome_notification(user)
@user = user
FastGettext.with_locale FastGettext.default_locale do
- mail(to: @user.email,
+ mail(to: @user.email,
subject: _('Welcome to %{tool_name}') %{ :tool_name => Rails.configuration.branding[:application][:name] })
end
end
- def sharing_notification(role, user, current_user)
+ def sharing_notification(role, user, inviter:)
@role = role
@user = user
- @current_user = current_user
- FastGettext.with_locale FastGettext.default_locale do
- mail(to: @role.user.email,
- subject: d_('dmpopidor', '%{user_name} has shared a Data Management Plan with you in %{tool_name}') %{
- :user_name => current_user.name(false),
- :tool_name => Rails.configuration.branding[:application][:name]
- })
+ @inviter = inviter
+ subject = d_('dmpopidor', '%{user_name} has shared a Data Management Plan with you in %{tool_name}') % {
+ :user_name => @inviter.name(false),
+ :tool_name => Rails.configuration.branding[:application][:name]
+ }
+ FastGettext.with_locale FastGettext.default_locale do
+ mail(to: @role.user.email, subject: subject)
end
end
-
+
def permissions_change_notification(role, user)
@role = role
@user = user
if user.active?
FastGettext.with_locale FastGettext.default_locale do
- mail(to: @role.user.email,
+ mail(to: @role.user.email,
subject: _('Changed permissions on a Data Management Plan in %{tool_name}') %{ :tool_name => Rails.configuration.branding[:application][:name] })
end
end
end
-
+
def plan_access_removed(user, plan, current_user)
@user = user
@plan = plan
@current_user = current_user
if user.active?
FastGettext.with_locale FastGettext.default_locale do
- mail(to: @user.email,
+ mail(to: @user.email,
subject: "#{_('Permissions removed on a DMP in %{tool_name}') %{ :tool_name => Rails.configuration.branding[:application][:name] }}")
end
end
end
-
+
def feedback_notification(recipient, plan, requestor)
@user = requestor
-
+
if @user.org.present? && recipient.active?
@org = @user.org
@plan = plan
@recipient = recipient
-
+
FastGettext.with_locale FastGettext.default_locale do
- mail(to: recipient.email,
+ mail(to: recipient.email,
subject: _("%{application_name}: %{user_name} requested feedback on a plan") % {application_name: Rails.configuration.branding[:application][:name], user_name: @user.name(false)})
end
end
end
-
+
def feedback_complete(recipient, plan, requestor)
@requestor = requestor
- @user = recipient
- @plan = plan
-
+ @user = recipient
+ @plan = plan
+ @phase = plan.phases.first
if recipient.active?
FastGettext.with_locale FastGettext.default_locale do
- mail(to: recipient.email,
+ mail(to: recipient.email,
subject: _("%{application_name}: Expert feedback has been provided for %{plan_title}") % {application_name: Rails.configuration.branding[:application][:name], plan_title: @plan.title})
end
end
end
-
+
def feedback_confirmation(recipient, plan, requestor)
user = requestor
if user.org.present? && recipient.active?
org = user.org
plan = plan
-
+
# Use the generic feedback confirmation message unless the Org has specified one
subject = (org.feedback_email_subject.present? ? org.feedback_email_subject : feedback_confirmation_default_subject)
message = (org.feedback_email_msg.present? ? org.feedback_email_msg : feedback_confirmation_default_message)
@body = feedback_constant_to_text(message, user, plan, org)
-
+
FastGettext.with_locale FastGettext.default_locale do
- mail(to: recipient.email,
+ mail(to: recipient.email,
subject: feedback_constant_to_text(subject, user, plan, org))
end
end
@@ -105,7 +107,7 @@
end
end
end
-
+
# @param commenter - User who wrote the comment
# @param plan - Plan for which the comment is associated to
def new_comment(commenter, plan)
@@ -123,7 +125,7 @@
end
def admin_privileges(user)
- @user = user
+ @user = user
if user.active?
FastGettext.with_locale FastGettext.default_locale do
mail(to: user.email, subject:
diff --git a/app/models/plan.rb b/app/models/plan.rb
index 79c50b6..55a18eb 100644
--- a/app/models/plan.rb
+++ b/app/models/plan.rb
@@ -194,11 +194,6 @@
end
if self.save!
- # Send an email confirmation to the owners and co-owners
- owners = User.joins(:roles).where('roles.plan_id =? AND roles.access IN (?)', self.id, Role.access_values_for(:administrator))
- deliver_if(recipients: owners, key: 'users.feedback_requested') do |r|
- UserMailer.feedback_confirmation(r, self, user).deliver_now
- end
# Send an email to the org-admin contact
if user.org.contact_email.present?
contact = User.new(email: user.org.contact_email, firstname: user.org.contact_name)
diff --git a/app/views/branded/guidance_groups/admin_new.html.erb b/app/views/branded/guidance_groups/admin_new.html.erb
index a5aa0ac..72550f7 100644
--- a/app/views/branded/guidance_groups/admin_new.html.erb
+++ b/app/views/branded/guidance_groups/admin_new.html.erb
@@ -13,17 +13,17 @@
<%= f.label _('Name'), for: :name, class: "control-label" %>
<%= f.text_field :name, as: :string, class: "form-control", 'aria-required': true, 'data-toggle': 'tooltip', title: _('Add an appropriate name for your guidance group. This name will tell the end user where the guidance has come from. We suggest you use the organisation or department name e.g. "OU" or "Maths & Stats"') %>
-
-
- <%= 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: "control-label" %>
-
-
-
- <%= 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.") %>
- <%= f.label _('Optional Subset'), for: :optional_subset, class: "control-label" %><%= _(' (e.g. School/ Department) ') %>
-
<%= render partial: 'org_admin/shared/theme_selector',
- locals: { f: f, all_themes: themes, as_radio: true, required: true,
- popover_message: _('Select one theme that is relevant to this guidance. This will display your generic organisation-level guidance, or any Schools/Departments for which you create guidance groups, across all templates that have questions with the corresponding theme tags.') } %>
+ locals: { f: f, all_themes: themes, as_radio: false, required: true,
+ popover_message: _('Select one or more themes that are relevant to this guidance. This will display your generic organisation-level guidance, or any Schools/Departments for which you create guidance groups, across all templates that have questions with the corresponding theme tags.') } %>
<%= f.label _('Guidance group'), for: :guidance_group_id, class: 'control-label' %>
<%= f.collection_select(:guidance_group_id, guidance_groups,
diff --git a/app/views/branded/layouts/application.html.erb b/app/views/branded/layouts/application.html.erb
index c150644..c99e53d 100644
--- a/app/views/branded/layouts/application.html.erb
+++ b/app/views/branded/layouts/application.html.erb
@@ -102,6 +102,7 @@
VALIDATION_MESSAGE_PASSWORDS_MATCH: _('The passwords must match.'),
VALIDATION_MESSAGE_RADIO: _('Please choose one of the options.'),
VALIDATION_MESSAGE_CHECKBOX: _('Please check the box to continue.'),
+ VALIDATION_MESSAGE_MULTI_CHECKBOX: _('Please select at least one of the options to continue.'),
VALIDATION_MESSAGE_SELECT: _('Please select a value from the list.'),
VALIDATION_MESSAGE_TEXT: _('This field is required.'),
diff --git a/app/views/branded/org_admin/plans/index.html.erb b/app/views/branded/org_admin/plans/index.html.erb
index 1c87179..aa33830 100644
--- a/app/views/branded/org_admin/plans/index.html.erb
+++ b/app/views/branded/org_admin/plans/index.html.erb
@@ -1,4 +1,4 @@
-<% title _('%{org_name} Plans') % { org_name: current_user.org.name } %>
+<% title "#{current_user.org.name} Plans" %>
<%= f.text_field(:title, class: "form-control", "aria-required": true, 'data-toggle': 'tooltip',
title: _('If applying for funding, state the name exactly as in the grant proposal.')) %>
<%= f.hidden_field :visibility %>
- <%= f.label(:is_test, raw("#{check_box_tag(:is_test,1, @plan.is_test?)} #{_('mock project for testing, practice, or educational purposes')}"), class: 'control-label') %>
+ <%= f.label(:is_test, raw("#{check_box_tag(:is_test,1, @plan.is_test? , "aria-label": "is_test")} #{_('mock project for testing, practice, or educational purposes')}"), class: 'control-label') %>
<%= f.text_field(:identifier, class: "form-control", "aria-required": false, 'data-toggle': "tooltip",
title: _('A pertinent ID as determined by the funder and/or organisation.')) %>