public function display_field_update(MemberExtendedField $member_extended_field)
 {
     $fieldset = $member_extended_field->get_fieldset();
     $streams = $this->get_streams();
     if (!empty($streams)) {
         $newsletter_subscribe = NewsletterService::get_member_id_streams($member_extended_field->get_user_id());
         $fieldset->add_field(new FormFieldMultipleCheckbox($member_extended_field->get_field_name(), $member_extended_field->get_name(), $newsletter_subscribe, $streams, array('description' => $member_extended_field->get_description())));
     }
 }
 public function display_field_update(MemberExtendedField $member_extended_field)
 {
     $fieldset = $member_extended_field->get_fieldset();
     $options = array();
     $default_values = explode('|', $member_extended_field->get_value());
     foreach ($member_extended_field->get_possible_values() as $name => $parameters) {
         $options[] = new FormFieldMultipleCheckboxOption($name, stripslashes($parameters['title']));
     }
     $fieldset->add_field(new FormFieldMultipleCheckbox($member_extended_field->get_field_name(), $member_extended_field->get_name(), $default_values, $options, array('required' => (bool) $member_extended_field->get_required(), 'description' => $member_extended_field->get_description())));
 }
 public function display_field_update(MemberExtendedField $member_extended_field)
 {
     $fieldset = $member_extended_field->get_fieldset();
     $options = array();
     $default = $member_extended_field->get_value();
     foreach ($member_extended_field->get_possible_values() as $name => $parameters) {
         $options[] = new FormFieldRadioChoiceOption(stripslashes($parameters['title']), $name);
     }
     if (empty($default)) {
         $options = array_merge(array(new FormFieldSelectChoiceOption('', '')), $options);
         $default = '';
     }
     $fieldset->add_field(new FormFieldRadioChoice($member_extended_field->get_field_name(), $member_extended_field->get_name(), $default, $options, array('required' => (bool) $member_extended_field->get_required(), 'description' => $member_extended_field->get_description())));
 }
 public function display_field_update(MemberExtendedField $member_extended_field)
 {
     $fieldset = $member_extended_field->get_fieldset();
     $fieldset->add_field(new FormFieldCheckbox($member_extended_field->get_field_name(), $member_extended_field->get_name(), $member_extended_field->get_value(), array('description' => $member_extended_field->get_description(), 'required' => (bool) $member_extended_field->get_required())));
 }
 public function display_field_update(MemberExtendedField $member_extended_field)
 {
     $fieldset = $member_extended_field->get_fieldset();
     $fieldset->add_field(new FormFieldRichTextEditor($member_extended_field->get_field_name(), $member_extended_field->get_name(), $member_extended_field->get_value(), array('required' => (bool) $member_extended_field->get_required(), 'rows' => 5, 'cols' => 47, 'description' => $member_extended_field->get_description()), array($this->constraint($member_extended_field->get_regex()))));
 }
 public function display_field_update(MemberExtendedField $member_extended_field)
 {
     $fieldset = $member_extended_field->get_fieldset();
     $regex = $member_extended_field->get_regex();
     switch ($regex) {
         case 1:
             $field_class = 'FormFieldNumberEditor';
             $display_constraint = false;
             break;
         case 4:
             $field_class = 'FormFieldMailEditor';
             $display_constraint = false;
             break;
         case 5:
             $field_class = 'FormFieldUrlEditor';
             $display_constraint = false;
             break;
         case 8:
             $field_class = 'FormFieldTelEditor';
             $display_constraint = false;
             break;
         default:
             $field_class = 'FormFieldTextEditor';
             $display_constraint = true;
     }
     $fieldset->add_field(new $field_class($member_extended_field->get_field_name(), $member_extended_field->get_name(), $member_extended_field->get_value(), array('required' => (bool) $member_extended_field->get_required(), 'description' => $member_extended_field->get_description()), $display_constraint ? array($this->constraint($regex)) : array()));
 }
 public function display_field_update(MemberExtendedField $member_extended_field)
 {
     $fieldset = $member_extended_field->get_fieldset();
     $fieldset->add_field(new FormFieldSimpleSelectChoice($member_extended_field->get_field_name(), $member_extended_field->get_name(), $member_extended_field->get_value(), array(new FormFieldSelectChoiceOption('--', ''), new FormFieldSelectChoiceOption(LangLoader::get_message('male', 'main'), '1'), new FormFieldSelectChoiceOption(LangLoader::get_message('female', 'main'), '2')), array('description' => $member_extended_field->get_description(), 'required' => (bool) $member_extended_field->get_required())));
 }