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

refactor(Sensei_Quiz): conditional output JS for action buttons #12

Open
wants to merge 1 commit into
base: cxl
Choose a base branch
from

Conversation

pawelkmpt
Copy link
Collaborator

Do not print custom JS handling buttons click event if there are not buttons to output.

It happens when user passes a quiz. JS was added to primary field in Action Bar and prevented displaying any button as primary.

Before
Screenshot 2023-03-23 at 13 33 38

After
Screenshot 2023-03-23 at 13 34 08

Do not print custom JS handling buttons click event if there are not
buttons to output.

It happens when user passes a quiz. JS was added to `primary` field in
Action Bar and prevented displaying any button as primary.
@pawelkmpt pawelkmpt requested a review from lkraav March 23, 2023 12:34
@pawelkmpt pawelkmpt self-assigned this Mar 23, 2023
Copy link

@lkraav lkraav left a comment

Choose a reason for hiding this comment

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

Looking back at this script, it's difficult to remember in what scenario there's multiple submit buttons. Or is it always, because at minimum Reset + Submit? Maybe this script comment could be upgraded in this PR.

@pawelkmpt
Copy link
Collaborator Author

Looking back at this script, it's difficult to remember in what scenario there's multiple submit buttons. Or is it always, because at minimum Reset + Submit? Maybe this script comment could be upgraded in this PR.

It's two by default: save quiz and submit.

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.

2 participants