Skip to content
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

[LTD-5728] Prevent 'other' radio showing as only option for advice picklist fields #2278

Merged
merged 5 commits into from
Jan 6, 2025

Conversation

currycoder
Copy link
Contributor

@currycoder currycoder commented Dec 18, 2024

Aim

This change ensures that the "Other" option is suppressed when there are no picklist options to choose from for picklist fields in the advice flows. In this situation, rather than seeing the "Other" radio input and an empty textbox, the user just sees the textbox. This should be much clearer.

LTD-5728

@currycoder currycoder force-pushed the LTD-5728-limit-picklist-other branch from 5e529a4 to 3711eff Compare December 18, 2024 16:47
@currycoder currycoder marked this pull request as ready for review December 20, 2024 10:35
@currycoder currycoder force-pushed the LTD-5728-limit-picklist-other branch from 9e64ed2 to 2d230f6 Compare December 20, 2024 10:36
Comment on lines -100 to -105
approval_radios = forms.ChoiceField(
label="What is your reason for approving?",
required=False,
widget=forms.RadioSelect,
choices=(),
)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh this was included in this form by mistake before?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes I believe so. We do not need it at this stage in the wizard

saruniitr
saruniitr previously approved these changes Dec 20, 2024
@currycoder currycoder force-pushed the LTD-5728-limit-picklist-other branch 2 times, most recently from 2ff1228 to 362e720 Compare December 20, 2024 15:58
@currycoder currycoder requested a review from saruniitr December 20, 2024 15:58
@currycoder currycoder dismissed saruniitr’s stale review December 20, 2024 15:59

Radically changed structure subsequent to review

@currycoder currycoder force-pushed the LTD-5728-limit-picklist-other branch from 362e720 to 48ca460 Compare December 20, 2024 16:42
caseworker/advice/forms/approval.py Outdated Show resolved Hide resolved
Copy link
Contributor

@depsiatwal depsiatwal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

all looks good to me

@currycoder currycoder force-pushed the LTD-5728-limit-picklist-other branch from 48ca460 to 8956e15 Compare January 6, 2025 10:43
@currycoder currycoder merged commit a8a9a87 into dev Jan 6, 2025
12 checks passed
@currycoder currycoder deleted the LTD-5728-limit-picklist-other branch January 6, 2025 13:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants