diff --git a/public/main/auth/inscription.php b/public/main/auth/inscription.php index 953e0ddec5..691532e115 100644 --- a/public/main/auth/inscription.php +++ b/public/main/auth/inscription.php @@ -477,6 +477,7 @@ if (false === $userAlreadyRegisteredShowTerms && false, [], $requiredFields, + true ); $extraFieldsLoaded = true; } diff --git a/public/main/inc/lib/formvalidator/Element/DatePicker.php b/public/main/inc/lib/formvalidator/Element/DatePicker.php index bf18d7a9d6..40820ed9d6 100644 --- a/public/main/inc/lib/formvalidator/Element/DatePicker.php +++ b/public/main/inc/lib/formvalidator/Element/DatePicker.php @@ -42,8 +42,17 @@ class DatePicker extends HTML_QuickForm_text } $label = $this->getLabel(); + $requiredFields = api_get_setting('registration.required_extra_fields_in_inscription', true); + if (!empty($requiredFields) && $requiredFields['options']) { + $requiredFields = $requiredFields['options']; + } + $variable = str_replace('extra_', '',$id); + $requiredSymbol = ''; + if (in_array($variable, $requiredFields)) { + $requiredSymbol = '*'; + } return ' -
'.$label.'
+
'.$requiredSymbol.$label.'
_getAttrString($this->_attributes).' class="form-control border" type="text" value="'.$value.'" placeholder="'.get_lang('Select date ..').'" data-input>