-
-
Notifications
You must be signed in to change notification settings - Fork 825
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
[NFC] Preferences form template cleanup #13046
[NFC] Preferences form template cleanup #13046
Conversation
This is part of disentangling the invoicing mess out of the shared code
Contribute.tpl no longer relies on basicForm.tpl so we can clean that up now
Contribute.tpl no longer shares this form
(Standard links)
|
@mattwire almost there for the cleanup round - ping |
@eileenmcnaughton I don't understand why but the checkbox to show/hide tax/invoicing settings seems to have changed it's ID following this PR to
|
Hi @mattwire How about below code to hide/show invoice block
|
@pradpnayak Yes, much better and cleaner. I've just tested your version and it works perfectly. |
@JoeMurray / @Edzelopez / @monishdeb You might need to update your extension code like EasyBatch, Edit Line Item, Close Accounting Period etc which add's some settings using jQuery and CiviCRM hooks on Contribute Settings page. Thanks |
@mattwire @pradpnayak can we merge this & then @pradpnayak's version as a follow up? There is one more PR based on this #13047 which isolates that form |
also @pradpnayak you may not have seen this https://lab.civicrm.org/dev/core/issues/495 - if I can get the last fix-ups merged I'll work on that & it will give better options for extensions |
(but agree @pradpnayak's is an improvement) |
@eileenmcnaughton Ok, I see it is currently broken in master too. In which case let's merge this and resolve see if the jquery is fixed by #13047 (but still be good to update to use @pradpnayak changes afterwards). |
& yes agree re @pradpnayak improvement - also, I don't understand WHY the id changed - but at the moment I think merge #13047 & then look at that |
I just tested on my local machine on current state of code. It appears that labels for field is printed twice. Is this something fixed in your other PR? |
@pradpnayak let's hope so :-) |
@eileenmcnaughton I am going to test #13047 now |
thanks @pradpnayak |
Overview
Moves code around to a more logical place.
Before
When the invoicing code was added it was added to the preferences template...badly. Instead of adding code related to invoicing to the relevant preferences template it was added to a shared template, wrapped in 'ifs'.
After
Code specific to only one preference form moved back to it's own template & shared code simplified.
Technical Details
Just moves code around - no change. Note each commit is a distinct small step in this process
Comments
There are still a couple of things to fix on the php side on this form - but this neither creates or fixes those issues.