Skip to content

Commit

Permalink
Merge pull request #705 from bitzesty/main
Browse files Browse the repository at this point in the history
Staging < main
  • Loading branch information
TheDancingClown authored Aug 7, 2024
2 parents 1a96c2c + 5c6d3ee commit d5b3fd2
Show file tree
Hide file tree
Showing 24 changed files with 92 additions and 41 deletions.
1 change: 1 addition & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -765,6 +765,7 @@ PLATFORMS
arm64-darwin-21
arm64-darwin-23
x86_64-darwin-22
x86_64-darwin-23
x86_64-linux

DEPENDENCIES
Expand Down
9 changes: 9 additions & 0 deletions app/assets/stylesheets/frontend/forms.scss
Original file line number Diff line number Diff line change
Expand Up @@ -1339,3 +1339,12 @@ fieldset.account-contact-preferences-other-ops {
}
}
}

.indented {
padding-left: 20px;
display: block;

&:first-child {
margin-top: 10px;
}
}
4 changes: 4 additions & 0 deletions app/helpers/application_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,10 @@ def landing_page?
].include?(action_name)
end

def exclude_footer?
%w[useful_information].include?(action_name)
end

def show_navigation_links?
current_user
end
Expand Down
12 changes: 9 additions & 3 deletions app/models/eligibility/basic.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@ class Eligibility::Basic < Eligibility
AWARD_NAME = 'General'
after_save :set_passed

property :involved_with_group,
boolean: true,
label: "Are you a volunteer, employee or trustee of the group, or in any way involved with the running of the organisation?",
accept: :false

property :based_in_uk,
boolean: true,
label: "Is the group based in the UK, the Channel Islands or the Isle of Man?",
Expand Down Expand Up @@ -30,7 +35,7 @@ class Eligibility::Basic < Eligibility

property :local_area,
boolean: true,
label: "Does it focus on benefitting a local area?",
label: "Does the group provide a specific and direct benefit to the local community?",
hint: "Please note, KAVS is for local volunteer groups.",
accept: :true

Expand All @@ -41,12 +46,12 @@ class Eligibility::Basic < Eligibility

property :benefits_animals_only,
boolean: true,
label: "Does it only benefit animals rather than people?",
label: "Is its main focus benefiting animals rather than people?",
accept: :false

property :current_holder,
values: %w[yes no i_dont_know],
label: "Has the group received a KAVS in the past?",
label: "Has the group received a KAVS/QAVS in the past?",
accept: :not_yes

def save_as_eligible!
Expand All @@ -59,6 +64,7 @@ def save_as_eligible!
self.provide_grants = false
self.benefits_animals_only = false
self.current_holder = "i_dont_know"
self.involved_with_group = false

save
end
Expand Down
6 changes: 6 additions & 0 deletions app/pdf_generators/qae_pdf_forms/general/question_pointer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,12 @@ def question_block
end

def render_pdf_hint
if question.form_hint.present?
form_pdf.indent 25.mm do
form_pdf.render_text question.form_hint,
style: :italic
end
end
if question.additional_pdf_context.present?
form_pdf.indent 25.mm do
form_pdf.render_text question.additional_pdf_context,
Expand Down
23 changes: 12 additions & 11 deletions app/views/accounts/useful_information.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,20 @@
.article-container
article.group role="article"
h2.govuk-heading-l Nomination guidance:
ul.govuk-list.govuk-list--bullet
li = "The deadline for submissions is #{Settings.current_submission_deadline.decorate.formatted_trigger_time}".html_safe
li = "Start #{link_to('a nomination', dashboard_path)} to see if you meet the eligibility criteria.".html_safe
li If you meet the eligibility criteria, you will be able to download a PDF version of the form. Please note, the PDF version of the form is for your reference only, you will have to fill in and submit the online version of the form.
li You do not need to complete the online nomination in one go, it is saved as you go and you can come back to it later.
p.govuk-body = "The deadline for submissions is #{Settings.current_submission_deadline.decorate.formatted_trigger_time}".html_safe
p.govuk-body = "Start #{link_to('a nomination', dashboard_path)} to see if you meet the eligibility criteria.".html_safe
p.govuk-body If you meet the eligibility criteria, you will be able to download a PDF version of the form. Please note, the PDF version of the form is for your reference only, you will have to fill in and submit the online version of the form.
p.govuk-body You do not need to complete the online nomination in one go, it is saved as you go and you can come back to it later.
p.govuk-body = "Once you have submitted your nomination, you will find out the outcome of your nomination when the award is announced on 14th November 2025. <strong>The Award will provide no update until then</strong>.".html_safe

h2.govuk-heading-l Need help?
h2.govuk-heading-l Lord-Lieutenants

h3.govuk-heading-m The King's Award for Voluntary Service Team
p.govuk-body If you need digital assistance with filling in the form or have any questions, please feel free to get in touch with The King's Award for Voluntary Service Team:
p.govuk-body = "By emailing #{mail_to('[email protected]')}".html_safe

h3.govuk-heading-m Lord-Lieutenants
p.govuk-body The King's Award for Voluntary Service Team works closely with Lord-Lieutenants. They are His Majesty's representatives in each lieutenancy area of the United Kingdom.
p.govuk-body You can get in touch with your local Lieutenancy to see how they can help you with your nomination.
p.govuk-body To get up to date contact details, we recommend that you google your local county lieutenancy.

h2.govuk-heading-l Need help?

p.govuk-body = "Visit the #{link_to("FAQs page", "https://kavs.dcms.gov.uk/make-a-nomination/faqs/", target: "_blank")} on our website".html_safe
p.govuk-body If you need digital assistance with filling in the form or have any questions, please feel free to get in touch with The King's Award for Voluntary Service Team:
p.govuk-body = "By emailing #{mail_to('[email protected]')}".html_safe
5 changes: 2 additions & 3 deletions app/views/content_only/_award_nickname.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,14 @@
p.govuk-body Complete the eligibility questionnaire
ul.govuk-list.govuk-list--bullet
li This is to help us check whether the volunteering group meets the basic eligibility criteria for an award.
li It will take about 10 minutes to complete.
li It will take about 5 minutes to complete.

li
p.govuk-body Complete the form
ul.govuk-list.govuk-list--bullet
li The form can be completed over a number of days.
li You can save and return to the form at any point before submitting it.
li It will ask for some basic facts about the group as well as brief descriptions of the group's work and the ways in which the volunteers are outstanding.
li You will be given more detailed instructions after the eligibility questionnaire.
li It will ask for some information across 4 sections: basic facts about the group, why the group/volunteers are outstanding, letters of support upload, and nominator details.

li
p.govuk-body
Expand Down
7 changes: 4 additions & 3 deletions app/views/content_only/award_info_qavs.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@ h1.govuk-heading-xl
h2.govuk-heading-l Useful Nomination Info Before You Begin

p.govuk-body
' The deadline for nominations is
= submission_deadline.decorate.formatted_trigger_time
' .
strong
| The deadline for nominations is
=<> submission_deadline.decorate.formatted_trigger_time
| .

= render "content_only/pdf_link"

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.question-body
= f.input :involved_with_group, as: :radio_buttons, label: @eligibility.class.label(step).html_safe
span.clear
2 changes: 1 addition & 1 deletion app/views/form_award_eligibilities/show.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ h1.govuk-heading-xl King's Award for Voluntary Service Nomination
- if @form_answer.eligible?
.eligibility-passed role="alert"
p.govuk-body-l Thank you. Based on your answers, the group meets the basic eligibility citeria. You can proceed with nominating.
p.govuk-body-l Please note, we will also evaluate the nomination after submission referring to the more detailed criteria outlined on our website.
p.govuk-body-l = "Please note, we will also evaluate the nomination after submission referring to the more detailed criteria outlined on our #{link_to('website', 'https://kavs.dcms.gov.uk/make-a-nomination/eligibility/', target: '_blank', title: 'opens in a new tab/window')}.".html_safe

- if (!step || step.to_s == "wicked_finish")
br
Expand Down
2 changes: 1 addition & 1 deletion app/views/layouts/application.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@

= yield

- unless landing_page?
- unless landing_page? || exclude_footer?
p.footer-helpline.govuk-body
' Need help? Email us at
= link_to "[email protected]", "mailto:[email protected]", class: 'govuk-link'
Expand Down
14 changes: 8 additions & 6 deletions app/views/qae_form/confirm.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
br
p.govuk-body We have sent you an email confirming your submission.

p.govuk-body Thank you for submitting your nomination to the King's Award for Voluntary Service and helping to celebrate the outstanding work of local volunteer groups across the UK.

p.govuk-body
| You can still edit your submitted nomination up until
=< application_deadline(:submission_end)
Expand All @@ -28,27 +30,27 @@
h2.govuk-heading-l
' What happens next

h3.govuk-heading-m September 2023
h3.govuk-heading-m December 2024

p.govuk-body Eligibility of submitted nominations is checked.

h3.govuk-heading-m December 2023 - March 2024
h3.govuk-heading-m January 2025 - April 2025

p.govuk-body Local Lieutenancies conduct due diligence and visit eligible groups.

h3.govuk-heading-m April 2024 - May 2024
h3.govuk-heading-m April 2025 - June 2025

p.govuk-body National Assessors consider recommended groups and decide on a shortlist.

h3.govuk-heading-m July 2024
h3.govuk-heading-m July 2025

p.govuk-body Royal Approval of shortlisted groups.

h3.govuk-heading-m 14 November 2024
h3.govuk-heading-m 14 November 2025

p.govuk-body Awards are officially announced on His Majesty The King's Birthday in The Gazette, GOV.UK and on the KAVS website.

h3.govuk-heading-m December 2024 - May 2025
h3.govuk-heading-m December 2025 - May 2026

p.govuk-body Local Lieutenancies present Awards and awarded groups are invited to the Royal Garden Parties.

Expand Down
7 changes: 4 additions & 3 deletions forms/award_years/v2025/qavs/qavs_step1.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def qavs_step1
text :nominee_name, "Name of group" do
sub_ref "A 1.1"
required
form_hint "It is important that the name is accurate and spelt correctly, as this will appear on the Award certificate if your nomination succeeds. You do not need to add a charity number."
form_hint "<strong>It is important that the name is accurate, concise and spelt correctly</strong>, as this will appear on the Award certificate if your nomination succeeds. <strong>Please do not</strong> capitalise the group's name, include charity numbers, or include special characters.".html_safe
style "large"
end

Expand All @@ -31,8 +31,9 @@ def qavs_step1
nominee_activities
end

dropdown :secondary_activity, "Please select the group's secondary area of activity (optional)" do
dropdown :secondary_activity, "Please select the group's secondary area of activity" do
sub_ref "A 1.4"
required
option "", ""
nominee_activities
end
Expand Down Expand Up @@ -62,7 +63,7 @@ def qavs_step1

textarea :social_media, "Social media" do
sub_ref "A 1.8"
form_hint "Social media accounts if known"
form_hint "If known, please insert a link to the group's social media below (Facebook, Instagram, Twitter, Linkedin)"
words_max 100
rows 2
end
Expand Down
11 changes: 10 additions & 1 deletion forms/award_years/v2025/qavs/qavs_step2.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,16 @@ def qavs_step2
header :recommendation, "About this section" do
help "About this section", %(
<p class='govuk-body'>
In this section, please explain how the nominated group has made a significant contribution in its area of activity. We are looking for groups that have given excellent service to their beneficiaries and communities; have delivered their service in innovative ways, and have shown other examples of selfless voluntary service that distinguish their work.
In this section, please explain how the nominated group has made a significant contribution in its area of activity. We are looking for groups that:
<span class='indented'>- Give excellent service to their beneficiaries and communities</span>
<span class='indented'>- Deliver their service in innovative ways,</span>
<span class='indented'>- Show other examples of selfless voluntary service that distinguish their work.</span>
</p>
<p class='govuk-body'>
Please avoid using 'we' or 'our' in this section as this gives an indication that the person making the nomination is involved in the running of the group's work. It is recommended that you use 'their' or 'the group's work'.
</p>
<p class='govuk-body'>
<strong>Please answer each question, noting the word limits, explaining what achievements make the nominated group stand out from others.</strong>
</p>
)
Expand Down
4 changes: 2 additions & 2 deletions forms/award_years/v2025/qavs/qavs_step4.rb
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def qavs_step4
required
text -> do
%(
I am neither a volunteer nor a paid member of the group.
I am neither a volunteer, employee or trustee of the group, or in any way involved with the running of the organisation
)
end
end
Expand Down Expand Up @@ -87,7 +87,7 @@ def qavs_step4
required
text -> do
%(
I confirm that, to the best of my knowledge and belief, the information in this form is true and correct. I have discussed the nomination with the group. It is happy to be nominated and is aware that it will be contacted by representatives of the Award and asked for further information, as part of the assessment process.
I confirm that, to the best of my knowledge and belief, the information in this form is true and correct. I have discussed the nomination with the group. It is happy to be nominated and is aware that it will be contacted by representatives of the Award and asked for further information, as part of the assessment process. I acknowledge that any false information provided may result in the withdrawal of this nomination from the Award.
)
end
end
Expand Down
1 change: 1 addition & 0 deletions spec/factories/eligibility.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
current_step { :current_holder }
answers { {
kind: "application",
involved_with_group: false,
based_in_uk: true,
are_majority_volunteers: true,
has_at_least_three_people: true,
Expand Down
5 changes: 3 additions & 2 deletions spec/features/admin/form_answers/filtering_by_status_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,9 @@
assert_results_number(4)
assign_activity(@forms.first, "ART")

# Untick sport activity filter
click_status_option("Sport")
# Untick sport(primary) and disability(secondary) activity filter
click_status_option "Sport"
click_status_option "Disability"
assert_results_number(1)
end
end
3 changes: 2 additions & 1 deletion spec/features/assessor/filtering_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,9 @@
it "filters by activity" do
assert_results_number(4)
assign_activity(@forms.first, "ART")
# Untick sport activity filter
# Untick sport(primary) and disability(secondary) activity filter
click_status_option "Sport"
click_status_option "Disability"
assert_results_number(1)
end

Expand Down
3 changes: 2 additions & 1 deletion spec/features/lieutenant/filtering_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,9 @@
it "filters by activity" do
assert_results_number(4)
assign_activity(@forms.first, "ART")
# Untick sport activity filter
# Untick sport(primary) and disability(secondary) activity filter
click_status_option "Sport"
click_status_option "Disability"
assert_results_number(1)
end
end
2 changes: 1 addition & 1 deletion spec/features/users/eligibility_form_fulfillment_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
click_link("Start a new nomination")

click_button("Start eligibility questionnaire")
form_choice(%w[Yes])
form_choice(%w[No Yes])
expect(page).to have_content("How many years has the group been in operation?")
fill_in("How many years has the group been in operation?", with: 3)
click_button "Continue"
Expand Down
1 change: 1 addition & 0 deletions spec/fixtures/form_answer_qavs.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@
"nominee_name": "Bit Zesty",
"nominee_established_date": "2010",
"nominee_activity": "SPO",
"secondary_activity": "DIS",
"nominee_address_building": "94",
"nominee_address_street": "White Lion Street",
"nominee_address_city": "London",
Expand Down
1 change: 1 addition & 0 deletions spec/fixtures/form_answer_qavs_with_la.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@
"nominee_name": "Bit Zesty",
"nominee_established_date": "2010",
"nominee_activity": "SPO",
"secondary_activity": "DIS",
"nominee_address_building": "94",
"nominee_address_street": "White Lion Street",
"nominee_address_city": "London",
Expand Down
5 changes: 4 additions & 1 deletion spec/models/eligibility/basic_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@
expect(eligibility).not_to be_eligible
end

it 'is eligible in the middle of the survey' do
it 'is not eligible in the middle of the survey' do
eligibility.involved_with_group = false
eligibility.current_step = :based_in_uk
eligibility.national_organisation = false
eligibility.based_in_uk = true
Expand All @@ -35,6 +36,7 @@
end

it 'is eligible when all questions are answered correctly' do
eligibility.involved_with_group = false
eligibility.based_in_uk = true
eligibility.are_majority_volunteers = true
eligibility.benefits_animals_only = false
Expand Down Expand Up @@ -73,6 +75,7 @@

it 'returns all questions for new eligibility' do
expect(eligibility.questions).to eq([
:involved_with_group,
:based_in_uk,
:years_operating,
:has_at_least_three_people,
Expand Down
2 changes: 1 addition & 1 deletion spec/models/form_answer_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@
form_answer.document = form_answer.document.merge(nominee_name: nil)
form_answer.save!

expect(form_answer.fill_progress.round(2)).to eq(0.95)
expect(form_answer.fill_progress.round(2)).to eq(0.96)
end
end
end
Expand Down

0 comments on commit d5b3fd2

Please sign in to comment.