From: colemanw Date: Wed, 7 Feb 2024 00:55:43 +0000 (-0500) Subject: Fix dev/core#4949 ScheduleReminder form required field error X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=f59b7adc87979bb838ddab1a90d0c2e1e4295082;p=civicrm-core.git Fix dev/core#4949 ScheduleReminder form required field error --- diff --git a/templates/CRM/Admin/Form/ScheduleReminders.tpl b/templates/CRM/Admin/Form/ScheduleReminders.tpl index f9db4a0f72..df5a7d92d1 100644 --- a/templates/CRM/Admin/Form/ScheduleReminders.tpl +++ b/templates/CRM/Admin/Form/ScheduleReminders.tpl @@ -201,8 +201,12 @@ $label = $('label[for=' + fieldSpec.name + ']', $form); $label.text(fieldSpec.label); if (fieldSpec.required) { - $label.append(' *') + $label.append(' *'); } + // 'required' css class gets picked up by jQuery validate (but only in popup mode) + // In full-page mode there is no clientside validation & this doesn't have any effect. + // TODO: Would be nice for those things to be more consistent & also to use real html validation not jQuery. + $field.toggleClass('required', fieldSpec.required); $field.removeClass('loading'); // Show field and update option list if applicable if (fieldSpec.options) {