Towards supporting Smarty5 (replace addDate by datepicker) #736
+39
−36
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes a few jcalendar/smarty5 issues on the "Create new Mandate" form, but it still has a bug, which unfortunately I could not figure out.
To reproduce: enable smarty5 (by default in CiviCRM 5.80+), enable SEPA ext, and then create a new mandate. The popup will fail with a network error, and the error will be
Syntax error in template "file:CRM/common/jcalendar.tpl"
.This PR includes:
$form->addDate
by$form->add('datepicker', ...
jcalendar
from the tpl files (it does not work on smarty5)CRM.utils.formatDate()
for formatting dates$
andts
without thedomain
(but didn't change everything)This PR has a bug:
sdd_recalculate_fields
recalculates all fields, and also updates them, which causes recursive updates if we want to trigger "change" so that things like selecting the earliest rcur start date works. I don't know enough about the logic of the code to be sure that I will not be introducing bugs.