-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Training with disabilities view on courses #4358
Conversation
035bf16
to
91f3fa1
Compare
@@ -8,5 +8,4 @@ def param_form_key | |||
end | |||
|
|||
def goto_preview? = params.dig(param_form_key, :goto_preview) == 'true' | |||
def goto_provider? = params.dig(param_form_key, :goto_provider) == 'true' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is no longer needed after the refactor 91f3fa1
@@ -14,8 +14,8 @@ def goto_provider_value(param_form_key:, params:) | |||
params[:goto_provider] || params.dig(param_form_key, :goto_provider) | |||
end | |||
|
|||
def goto_provider?(param_form_key:, params:) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No longer needed
flash[:success] = I18n.t('success.published') | ||
redirect_to(details_publish_provider_recruitment_cycle_path(provider.provider_code, provider.recruitment_cycle_year)) | ||
end | ||
redirect_to @about_form.update_success_path |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is so much cleaner, nice one!
) | ||
end | ||
end | ||
alias back_path update_success_path |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
<% else %> | ||
<%= govuk_back_link_to(details_publish_provider_recruitment_cycle_path(@provider.provider_code, @provider.recruitment_cycle_year)) %> | ||
<% end %> | ||
<%= govuk_back_link_to(@about_form.back_path) %> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✨
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work taking the time to refactor this goto behaviour. I've tested the back links and other functionality in the review app and it all looks good to me. 👍
91f3fa1
to
3aa46e4
Compare
The course show page on find and the preview page on publish contains too much information that might be off-putting for the user. This commit tries to fix this by putting this section into its own view accessible from the course page
There are a few `goto` methods that tell the about your organisation form where to redirect the user after update or when the user clicks the back links. Basically, both back links and update success methods can go to the same path based on the `goto` param. Because of this and the ever growing of these `goto` params I moved some logic that calculates the redirection in the about_your_organisation_form. This way it can be tested properly.
3aa46e4
to
d30f7bf
Compare
Looks good to me! |
Context
The course show page on find and the preview page on publish contains
too much information that might be off-putting for the user.
This commit tries to fix this by putting this section into its own view
accessible from the course page
Changes proposed in this pull request
347fce8 This implements the view/controller/routes changes
91f3fa1 This is a bit of a refactor of the
goto
methods that tell theabout_your_organisation
form where to redirectDescription of 91f3fa1:
There are a few
goto
methods that tell the about your organisationform where to redirect the user after update or when the user clicks the
back links.
Basically, both back links and update success methods can go to the same
path based on the
goto
param.Because of this and the ever growing of these
goto
params I moved somelogic that calculates the redirection in the
about_your_organisation_form. This way it can be tested properly.
Guidance to review
Review the code and check if the training for disabilities page works
Checklist
Peek.2024-07-11.09-49.mp4