Submit social housing lettings and sales data (CORE)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

12 lines
386 B

CLDC-3541 Update sales financial validations (#2546) * CLDC-3569 Update social homebuy errors (#2541) * Split questions * Update the error message * Add guidance * Add back the headers * Refactor depends_on * Refactor further * CLDC-3569 Update missed errors (#2548) * Update some skipped error messages * Remove repeating deposit question * CLDC-3571 Discounted ownership validation (#2547) * Rename discount to deposit discount * Split about price rtb questions * Update error message * Update guidance partial * Fix top_guidance_partial method * Split about_price_not_rtb * Update guidance partial and validation * Fix bulk upload test * Update deposit routed_to and guidance * Refactor guidance links into a helper (#2551) * Refactor guidance links into a helper * Refactor discounted ownership guidance * CLDC-3570 Validations all other shared ownership types (#2550) * Update "all other shared ownership" errors * CLDC-3571 Update outright sale financial validations (#2549) * Update outright sale validation message * Add outright sale guidance * Update duplicate page id * User guidance helper * Fix up financial equations content (#2552) * Tweak shared ownership validation wording * Add top_guidance_partial to missed shared ownership questions * Update discounted ownership validation message when there's no grant * Update discounted sale guidance and errors * Lint and update test * Update BU test * Update test * CLDC-3569 Update guidance for shared ownership without mortgage (#2562) * Update how we display errors for BU * Update guidance for shared ownership * Add header to mortgage used question * Update shared ownership guidance * Update spacing (#2569) * Fix spacing again (#2570) * Update discounted ownership guidance (#2582) * Update discounted ownership guidance * Add top guidance partial to outright sale * Update outright sale guidance content * Update model test --------- Co-authored-by: Manny Dinssa <44172848+Dinssa@users.noreply.github.com>
4 months ago
module GuidanceHelper
include GovukLinkHelper
include GovukVisuallyHiddenHelper
def question_link(question_id, log, user)
question = log.form.get_question(question_id, log)
return "" unless question.page.routed_to?(log, user)
"(#{govuk_link_to "Q#{question.question_number}", send("#{log.class.name.underscore}_#{question.page.id}_path", log)})".html_safe
end
end