-
-
Notifications
You must be signed in to change notification settings - Fork 815
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
dev/core#904 - undo part of 13333 #14145
Conversation
(Standard links)
|
@demeritcowboy This is pretty vague. What Civi version. How does it "break"? |
@mattwire Create a new case and at the bottom of the new case form click "Save and New". It doesn't go to a new case form. I believe this would have the same problem on any form that has more than one submit button. It can be reproduced on dmaster.demo. |
Ok, @demeritcowboy I can reproduce because of the silly way opencase tries to detect the 2nd button. We definitely don't want to remove submitOnce from the "save" button and I feel like not redirecting to a new case is less serious that accidently creating multiple cases... However the actual failure occurs here: https://github.com/civicrm/civicrm-core/blob/master/CRM/Case/Form/Activity/OpenCase.php#L350 We can differentiate between the two buttons by checking for the existence of |
Hi @mattwire I looked but I don't see that there's anything to differentiate in the submitted values either in $form or $params. In js/common.js submitOnce() where it calls form.submit(), I think maybe that's the equivalent of clicking the default button, regardless of what was clicked. Maybe in the meantime we can compromise and just remove it from the "Save and New" button and leave it on the "Save" button? That way both buttons will still work for now. |
87d2629
to
16f1c97
Compare
@demeritcowboy We'll run into this issue anywhere else there are more than one submit buttons (just activities currently I think). Can you try this?
|
I ** AM ** willing to help out here and try some things, but that should probably be against master. All I'm asking for the RC is to remove the thing that made the button stop working until it can be looked at closer. To be honest I'm not sure how this turned into my problem to solve, but I do promise to test that javascript and take a run at it. @mattwire |
@demeritcowboy Save/Save and New submitOnce only on "New case" currently but we want to add it elsewhere where we have the same problem eg. "New Membership" so would be good to fix properly. I'm going to merge this based on @eileenmcnaughton comments but would be really happy if you were able to find some time to review the proposed js change and PR it for master so we can have it fixed properly. |
@mattwire The js doesn't work as-is but I have some ideas. Will keep you posted. |
Overview
See https://lab.civicrm.org/dev/core/issues/904. The Save and New button on a new case doesn't work fully after 13333.