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

Skip adding script when it won't have anything to run on #25882

Merged
merged 1 commit into from
Mar 20, 2023

Conversation

highfalutin
Copy link
Contributor

Overview

In the Tagset template, only load a script for form controls if those controls exist.

Before

Script was always added to the page.

After

Script is only inserted when necessary.

Comments

I'd also like to get rid of the whole empty table that's created when there's no tagset data:

  • templates/CRM/Case/Form/Activity.tpl:244
  • templates/CRM/Case/Form/Case.tpl:108

Probably using this model? templates/CRM/Activity/Form/Activity.tpl:168

But that can be a separate PR

@civibot civibot bot added the master label Mar 20, 2023
@civibot
Copy link

civibot bot commented Mar 20, 2023

(Standard links)

@colemanw colemanw merged commit a48af7f into civicrm:master Mar 20, 2023
@colemanw
Copy link
Member

The bigger changes might require discussion but this seems like a no-brainer.

@highfalutin highfalutin deleted the tagset-tpl branch March 20, 2023 22:00
@highfalutin
Copy link
Contributor Author

thanks @colemanw, see #25884 which leverages @eileenmcnaughton's #22154

@eileenmcnaughton
Copy link
Contributor

@highfalutin do you test these things with smarty noisiness tuned up? ie turning the smarty default modifier mode on?

@highfalutin
Copy link
Contributor Author

@eileenmcnaughton I haven't been consistent about doing that, but just tested this PR again after setting define('CIVICRM_SMARTY_DEFAULT_ESCAPE', TRUE); and it's all good.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants