[TikiWiki-commits] [Git][tikiwiki/tiki][29.x] [FIX] trackers: Exclude AutoIncrement and GeographicFeature type fields from...
"Jonny Bradley \(@jonnybradley\) via TikiWiki-cvs" <[email protected]>
| Newsgroups | gmane.comp.cms.tiki.cvs |
|---|---|
| Message-ID | <6995f57e3262a_3b186d844517@gitlab-sidekiq-low-urgency-cpu-bound-v2-68c86796b8-tkfvn.mail> |
Jonny Bradley pushed to branch 29.x at Tiki Wiki CMS Groupware / Tiki Commits: 4ff85426 by Jonny Bradley at 2026-02-18T17:22:47+00:00 [FIX] trackers: Exclude AutoIncrement and GeographicFeature type fields from... --- * [FIX] trackers: Exclude AutoIncrement and GeographicFeature type fields from mandatory validation as they don't have a value in the default edit form (as seen on Cartograf upgrades) See merge request tikiwiki/tiki!9600 (cherry picked from commit 2c84c5a4262c6e19d332135a590cc5638830284a) e31e6813 [FIX] trackers: Exclude AutoIncrement and GeographicFeature type fields from... Co-authored-by: Jonny Bradley <[email protected]> - - - - - 2 changed files: - lib/trackers/trackerlib.php - lib/validatorslib.php Changes: ===================================== lib/trackers/trackerlib.php ===================================== @@ -3035,7 +3035,8 @@ class TrackerLib extends TikiLib $f['errorMsg'] = tra('Confirmation %0 do not match', $f['name']); $erroneous_values[] = $f; } - if ($f['type'] != 'q' and isset($f['isMandatory']) && $f['isMandatory'] == 'y') { + // exclude AutoIncrement and GeographicFeature type fields as they are read-only in the default edit form + if (! in_array($f['type'], ['q', 'GF']) && isset($f['isMandatory']) && $f['isMandatory'] == 'y') { if (($f['type'] == 'e' || in_array($f['fieldId'], $categorized_fields)) && empty($f['value'])) { // category: value is now categ id's $mandatory_fields[] = $f; } elseif (in_array($f['type'], ['a', 't']) && ($this->is_multilingual($f['fieldId']) == 'y')) { ===================================== lib/validatorslib.php ===================================== @@ -103,7 +103,8 @@ class Validators $validationjs .= $field_name . 'Hour: {required_in_group: [' . $date_ins_num . ', "select[name^=\'' . $field_name . '\']"]}, ' . $field_name . 'Minute: {required_in_group: [' . $date_ins_num . ', "select[name^=\'' . $field_name . '\']"], '; } - } else { + } elseif (! in_array($field_value['type'], ['q', 'GF'])) { + // exclude AutoIncrement and GeographicFeature type fields as they are read-only in the default edit form if ($field_value['isMultilingual'] == 'y') { $required_script = "required: function(e) { "; $condition = ""; View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/4ff85426c14be6594774c512141e02c072c5f8d6 -- View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/4ff85426c14be6594774c512141e02c072c5f8d6 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