[TikiWiki-commits] [Git][tikiwiki/tiki][29.x] [BP][FIX] add trackerinput smarty function param fieldId to work similarly to...
"Baraka Kinywa \(@bkinywa24\) via TikiWiki-cvs" <[email protected]>
| Newsgroups | gmane.comp.cms.tiki.cvs |
|---|---|
| Message-ID | <68b806e255653_2cdcfc885d1@gitlab-sidekiq-low-urgency-cpu-bound-v2-dc78c9688-dgsq7.mail> |
Baraka Kinywa pushed to branch 29.x at Tiki Wiki CMS Groupware / Tiki
Commits:
e49b7ca2 by MAGENE Sem Joel at 2025-09-03T12:06:20+03:00
[BP][FIX] add trackerinput smarty function param fieldId to work similarly to...
---
* [FIX] add trackerinput smarty function param fieldId to work similarly to trackeroutput where users can pass the field ID to get an input element for
(cherry picked from commit b5a5346f5d79d1038a576e155ddba9e325fc5d42)
See merge request tikiwiki/tiki!8482
- - - - -
1 changed file:
- lib/smarty_tiki/FunctionHandler/TrackerInput.php
Changes:
=====================================
lib/smarty_tiki/FunctionHandler/TrackerInput.php
=====================================
@@ -16,7 +16,17 @@ class TrackerInput extends Base
{
$trklib = \TikiLib::lib('trk');
- $field = $params['field'];
+ if (isset($params['fieldId'])) {
+ $field = $trklib->get_tracker_field($params['fieldId']);
+ $field['ins_id'] = "ins_{$params['fieldId']}";
+ $handler = $trklib->get_field_handler($field, $item);
+ if ($handler) {
+ $field = array_merge($field, $handler->getFieldData());
+ }
+ } else {
+ $field = $params['field'];
+ }
+
if (isset($params['item'])) {
$item = $params['item'];
} elseif (! empty($params['itemId'])) {
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/e49b7ca20f21721ac82ca6d15951b4b26f777891
--
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/e49b7ca20f21721ac82ca6d15951b4b26f777891
You're receiving this email because of your account on gitlab.com.
_______________________________________________
TikiWiki-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tikiwiki-cvs