public function edit_field_html(array $raw_properties = array())
        {
            if (isset($raw_properties['user_id'])) {
                unset($raw_properties['user_id']);
            }
            // HTML5 required attribute.
            if (bp_get_the_profile_field_is_required()) {
                $raw_properties['required'] = 'required';
            }
            $field = new BP_XProfile_Field(bp_get_the_profile_field_id());
            $options = $field->get_children(true);
            if (count($options) > 0) {
                $step = 1 / pow(10, (int) $options[0]->name);
            } else {
                $step = 0.01;
            }
            $html = $this->get_edit_field_html_elements(array_merge(array('type' => 'number', 'step' => $step, 'value' => bp_get_the_profile_field_edit_value()), $raw_properties));
            $label = sprintf('<label for="%s">%s%s</label>', bp_get_the_profile_field_input_name(), bp_get_the_profile_field_name(), bp_get_the_profile_field_is_required() ? ' ' . esc_html__('(required)', 'buddypress') : '');
            // Label.
            echo apply_filters('bxcft_field_label', $label, bp_get_the_profile_field_id(), bp_get_the_profile_field_type(), bp_get_the_profile_field_input_name(), bp_get_the_profile_field_name(), bp_get_the_profile_field_is_required());
            // Errors.
            do_action(bp_get_the_profile_field_errors_action());
            // Input.
            ?>
            <input <?php 
            echo $html;
            ?>
 />
        <?php 
        }
        public function edit_field_html(array $raw_properties = array())
        {
            if (isset($raw_properties['user_id'])) {
                unset($raw_properties['user_id']);
            }
            // HTML5 required attribute.
            if (bp_get_the_profile_field_is_required()) {
                $raw_properties['required'] = 'required';
            }
            $input_name = bp_get_the_profile_field_input_name();
            $html = $this->get_edit_field_html_elements(array_merge(array('type' => 'text', 'value' => bp_get_the_profile_field_edit_value()), $raw_properties));
            ?>
            <label for="<?php 
            echo $input_name;
            ?>
"><?php 
            echo bp_the_profile_field_name() . (bp_get_the_profile_field_is_required() ? esc_html_e('(required)', 'buddypress') : '');
            ?>
</label>
            <?php 
            do_action(bp_get_the_profile_field_errors_action());
            ?>
            <input id="textHierarchy" <?php 
            echo $html;
            ?>
 readonly>
						<input type="button" id="openHierarchy" value="지역(선거구) 선택" class="btn" style="height: 40px;">

<div id="layerHierarchy">
	<div class="selectHierarchy popup-list valign-outer" style="display:block">
		<div class="valign-middle contents">
			<div class="center-block">
				<ul class="nav nav-tabs">
					<li class="tab1"><a href="#">선거구 선택</a></li>
				</ul>
				<div id="divHierarchy" >
				</div>
				<span id="submitHierarchy" class="btn btn-default">SUBMIT</span>
				<span id="closeHierarchy" class="btn btn-default">CLOSE</span>
			</div>
		</div>
	</div>
</div>

       <?php 
        }
        public function edit_field_html(array $raw_properties = array())
        {
            if (isset($raw_properties['user_id'])) {
                unset($raw_properties['user_id']);
            }
            // HTML5 required attribute.
            if (bp_get_the_profile_field_is_required()) {
                $raw_properties['required'] = 'required';
            }
            $html = $this->get_edit_field_html_elements(array_merge(array('type' => 'url', 'value' => bp_get_the_profile_field_edit_value()), $raw_properties));
            $label = sprintf('<label for="%s">%s%s</label>', bp_get_the_profile_field_input_name(), bp_get_the_profile_field_name(), bp_get_the_profile_field_is_required() ? ' ' . esc_html__('(required)', 'buddypress') : '');
            // Label.
            echo apply_filters('bxcft_field_label', $label, bp_get_the_profile_field_id(), bp_get_the_profile_field_type(), bp_get_the_profile_field_input_name(), bp_get_the_profile_field_name(), bp_get_the_profile_field_is_required());
            // Errors.
            do_action(bp_get_the_profile_field_errors_action());
            // Input.
            ?>
            <input <?php 
            echo $html;
            ?>
 />
        <?php 
        }
        public function edit_field_html(array $raw_properties = array())
        {
            if (isset($raw_properties['user_id'])) {
                unset($raw_properties['user_id']);
            }
            // HTML5 required attribute.
            if (bp_get_the_profile_field_is_required()) {
                $raw_properties['required'] = 'required';
            }
            $field = new BP_XProfile_Field(bp_get_the_profile_field_id());
            $args = array('type' => 'number', 'value' => bp_get_the_profile_field_edit_value());
            $options = $field->get_children(true);
            if ($options) {
                foreach ($options as $o) {
                    if (strpos($o->name, 'min_') !== false) {
                        $args['min'] = str_replace('min_', '', $o->name);
                    }
                    if (strpos($o->name, 'max_') !== false) {
                        $args['max'] = str_replace('max_', '', $o->name);
                    }
                }
            }
            $html = $this->get_edit_field_html_elements(array_merge($args, $raw_properties));
            $label = sprintf('<label for="%s">%s%s</label>', bp_get_the_profile_field_input_name(), bp_get_the_profile_field_name(), bp_get_the_profile_field_is_required() ? ' ' . esc_html__('(required)', 'buddypress') : '');
            // Label.
            echo apply_filters('bxcft_field_label', $label, bp_get_the_profile_field_id(), bp_get_the_profile_field_type(), bp_get_the_profile_field_input_name(), bp_get_the_profile_field_name(), bp_get_the_profile_field_is_required());
            // Errors.
            do_action(bp_get_the_profile_field_errors_action());
            // Input.
            ?>
            <input <?php 
            echo $html;
            ?>
 />
        <?php 
        }
Exemple #5
0
					<div class="form-group">
                        <label class="control-label col-xs-12 col-md-3" for="<?php 
                bp_the_profile_field_input_name();
                ?>
"><?php 
                bp_the_profile_field_name();
                ?>
 <?php 
                if (bp_get_the_profile_field_is_required()) {
                    _e('(required)', 'firmasite');
                }
                ?>
</label>
                        <div class="col-xs-12 col-md-9">
                            <?php 
                echo firmasite_wp_editor(bp_get_the_profile_field_edit_value(), bp_get_the_profile_field_input_name(), bp_get_the_profile_field_input_name());
                ?>
                            <?php 
                /*<textarea rows="5" cols="40" name="<?php bp_the_profile_field_input_name(); ?>" id="<?php bp_the_profile_field_input_name(); ?>" <?php if ( bp_get_the_profile_field_is_required() ) : ?>aria-required="true"<?php endif; ?>><?php bp_the_profile_field_edit_value(); ?></textarea>*/
                ?>
 
                            <?php 
                firmasite_profile_field_custom_change_field_visibility();
                ?>
                        </div>
                    </div>
				<?php 
            }
            ?>

				<?php 
        public function edit_field_html(array $raw_properties = array())
        {
            $user_id = bp_displayed_user_id();
            if (isset($raw_properties['user_id'])) {
                $user_id = (int) $raw_properties['user_id'];
                unset($raw_properties['user_id']);
            }
            // HTML5 required attribute.
            if (bp_get_the_profile_field_is_required()) {
                $raw_properties['required'] = 'required';
            }
            $html = $this->get_edit_field_html_elements(array_merge(array('multiple' => 'multiple', 'id' => bp_get_the_profile_field_input_name() . '[]', 'name' => bp_get_the_profile_field_input_name() . '[]'), $raw_properties));
            ?>
            <label for="<?php 
            bp_the_profile_field_input_name();
            ?>
"><?php 
            bp_the_profile_field_name();
            ?>
 <?php 
            if (bp_get_the_profile_field_is_required()) {
                esc_html_e('(required)', 'buddypress');
            }
            ?>
</label>
            <?php 
            do_action(bp_get_the_profile_field_errors_action());
            ?>
            <select <?php 
            echo $html;
            ?>
>
                <?php 
            bp_the_profile_field_options("user_id={$user_id}");
            ?>
            </select>
        <?php 
        }
        public function edit_field_html(array $raw_properties = array())
        {
            // user_id is a special optional parameter that certain other fields
            // types pass to {@link bp_the_profile_field_options()}.
            if (isset($raw_properties['user_id'])) {
                unset($raw_properties['user_id']);
            }
            $r = bp_parse_args($raw_properties, array('cols' => 40, 'rows' => 5));
            ?>
	
			<div class="form-group">
				<label class="control-label col-sm-3" for="<?php 
            bp_the_profile_field_input_name();
            ?>
">
					<?php 
            bp_the_profile_field_name();
            ?>
					<?php 
            if (bp_get_the_profile_field_is_required()) {
                ?>
						<?php 
                esc_html_e('(required)', 'firmasite');
                ?>
					<?php 
            }
            ?>
				</label>
				<div class="col-sm-9">
					<?php 
            do_action(bp_get_the_profile_field_errors_action());
            ?>
			
					<?php 
            echo firmasite_wp_editor(bp_get_the_profile_field_edit_value(), bp_get_the_profile_field_input_name(), bp_get_the_profile_field_input_name());
            ?>
					<?php 
            /*<textarea <?php echo $this->get_edit_field_html_elements( $r ); ?>><?php bp_the_profile_field_edit_value(); ?></textarea>*/
            ?>
				</div>
			</div>
			<?php 
        }
        public function edit_field_html(array $raw_properties = array())
        {
            $user_id = bp_displayed_user_id();
            // user_id is a special optional parameter that we pass to {@link bp_the_profile_field_options()}.
            if (isset($raw_properties['user_id'])) {
                $user_id = (int) $raw_properties['user_id'];
                unset($raw_properties['user_id']);
            }
            // HTML5 required attribute.
            if (bp_get_the_profile_field_is_required()) {
                $raw_properties['required'] = 'required';
            }
            $day_html = $this->get_edit_field_html_elements(array_merge(array('id' => bp_get_the_profile_field_input_name() . '_day', 'name' => bp_get_the_profile_field_input_name() . '_day'), $raw_properties));
            $month_html = $this->get_edit_field_html_elements(array_merge(array('id' => bp_get_the_profile_field_input_name() . '_month', 'name' => bp_get_the_profile_field_input_name() . '_month'), $raw_properties));
            $year_html = $this->get_edit_field_html_elements(array_merge(array('id' => bp_get_the_profile_field_input_name() . '_year', 'name' => bp_get_the_profile_field_input_name() . '_year'), $raw_properties));
            $label = sprintf('<label for="%s_day">%s%s</label>', bp_get_the_profile_field_input_name(), bp_get_the_profile_field_name(), bp_get_the_profile_field_is_required() ? ' ' . esc_html__('(required)', 'buddypress') : '');
            // Label.
            echo apply_filters('bxcft_field_label', $label, bp_get_the_profile_field_id(), bp_get_the_profile_field_type(), bp_get_the_profile_field_input_name(), bp_get_the_profile_field_name(), bp_get_the_profile_field_is_required());
            // Errors
            do_action(bp_get_the_profile_field_errors_action());
            // Input.
            ?>
            <select <?php 
            echo $day_html;
            ?>
>
                <?php 
            bp_the_profile_field_options(array('type' => 'day', 'user_id' => $user_id));
            ?>
            </select>

            <select <?php 
            echo $month_html;
            ?>
>
                <?php 
            bp_the_profile_field_options(array('type' => 'month', 'user_id' => $user_id));
            ?>
            </select>

            <select <?php 
            echo $year_html;
            ?>
>
                <?php 
            bp_the_profile_field_options(array('type' => 'year', 'user_id' => $user_id));
            ?>
            </select>
        <?php 
        }
 /**
  * Get a sanitised and escaped string of the edit field's HTML elements and attributes.
  *
  * Must be used inside the {@link bp_profile_fields()} template loop.
  * This method was intended to be static but couldn't be because php.net/lsb/ requires PHP >= 5.3.
  *
  * @param array $properties Optional key/value array of attributes for this edit field.
  * @return string
  * @since BuddyPress (2.0.0)
  */
 protected function get_edit_field_html_elements(array $properties = array())
 {
     $properties = array_merge(array('id' => bp_get_the_profile_field_input_name(), 'name' => bp_get_the_profile_field_input_name()), $properties);
     if (bp_get_the_profile_field_is_required()) {
         $properties['aria-required'] = 'true';
     }
     $html = '';
     $properties = (array) apply_filters('bp_xprofile_field_edit_html_elements', $properties, get_class($this));
     foreach ($properties as $name => $value) {
         $html .= sprintf('%s="%s" ', sanitize_key($name), esc_attr($value));
     }
     return $html;
 }
    /**
     * Output HTML for this field type on the wp-admin Profile Fields screen.
     *
     * Must be used inside the {@link bp_profile_fields()} template loop.
     *
     * @since 2.0.0
     *
     * @param array $raw_properties Optional key/value array of permitted attributes that you want to add.
     */
    public function admin_field_html(array $raw_properties = array())
    {
        $day_r = bp_parse_args($raw_properties, array('id' => bp_get_the_profile_field_input_name() . '_day', 'name' => bp_get_the_profile_field_input_name() . '_day'));
        $month_r = bp_parse_args($raw_properties, array('id' => bp_get_the_profile_field_input_name() . '_month', 'name' => bp_get_the_profile_field_input_name() . '_month'));
        $year_r = bp_parse_args($raw_properties, array('id' => bp_get_the_profile_field_input_name() . '_year', 'name' => bp_get_the_profile_field_input_name() . '_year'));
        ?>

		<label for="<?php 
        bp_the_profile_field_input_name();
        ?>
_day" class="screen-reader-text"><?php 
        esc_html_e('Select day', 'buddypress');
        ?>
</label>
		<select <?php 
        echo $this->get_edit_field_html_elements($day_r);
        ?>
>
			<?php 
        bp_the_profile_field_options(array('type' => 'day'));
        ?>
		</select>

		<label for="<?php 
        bp_the_profile_field_input_name();
        ?>
_month" class="screen-reader-text"><?php 
        esc_html_e('Select month', 'buddypress');
        ?>
</label>
		<select <?php 
        echo $this->get_edit_field_html_elements($month_r);
        ?>
>
			<?php 
        bp_the_profile_field_options(array('type' => 'month'));
        ?>
		</select>

		<label for="<?php 
        bp_the_profile_field_input_name();
        ?>
_year" class="screen-reader-text"><?php 
        esc_html_e('Select year', 'buddypress');
        ?>
</label>
		<select <?php 
        echo $this->get_edit_field_html_elements($year_r);
        ?>
>
			<?php 
        bp_the_profile_field_options(array('type' => 'year'));
        ?>
		</select>

	<?php 
    }
 /**
  * Get a sanitised and escaped string of the edit field's HTML elements and attributes.
  *
  * Must be used inside the {@link bp_profile_fields()} template loop.
  * This method was intended to be static but couldn't be because php.net/lsb/ requires PHP >= 5.3.
  *
  * @since 2.0.0
  *
  * @param array $properties Optional key/value array of attributes for this edit field.
  *
  * @return string
  */
 protected function get_edit_field_html_elements(array $properties = array())
 {
     $r = bp_parse_args($properties, array('id' => bp_get_the_profile_field_input_name(), 'name' => bp_get_the_profile_field_input_name()));
     if (bp_get_the_profile_field_is_required()) {
         $r['aria-required'] = 'true';
     }
     /**
      * Filters the edit html elements and attributes.
      *
      * @since 2.0.0
      *
      * @param array  $r     Array of parsed arguments.
      * @param string $value Class name for the current class instance.
      */
     $r = (array) apply_filters('bp_xprofile_field_edit_html_elements', $r, get_class($this));
     return bp_get_form_field_attributes(sanitize_key(bp_get_the_profile_field_name()), $r);
 }
Exemple #12
0
										</select>
									</div>

								<?php 
                        }
                        ?>
								</td>
                               <!-- <td class="second" style="width:250px;">
                                <p>
                                <?php 
                        if (bp_get_the_profile_field_input_name() == 'field_2') {
                            ?>
                                Your selection here will detemine which language to show menus and settings in.
                                <?php 
                        } else {
                            if (bp_get_the_profile_field_input_name() == 'field_7') {
                                ?>
                                
                                <?php 
                            }
                        }
                        ?>
                                </p>
                                </td> -->
                            </tr>	
								<?php 
                        do_action('bp_custom_profile_edit_fields');
                        ?>

								<p class="description"></p>
						<?php 
        public function edit_field_html(array $raw_properties = array())
        {
            if (isset($raw_properties['user_id'])) {
                unset($raw_properties['user_id']);
            }
            // HTML5 required attribute.
            if (bp_get_the_profile_field_is_required()) {
                $raw_properties['required'] = 'required';
            }
            $input_name = bp_get_the_profile_field_input_name();
            $html = $this->get_edit_field_html_elements(array_merge(array('id' => $input_name, 'type' => 'text', 'value' => bp_get_the_profile_field_edit_value()), $raw_properties));
            ?>
            <label for="<?php 
            echo $input_name;
            ?>
"><?php 
            echo bp_the_profile_field_name() . (bp_get_the_profile_field_is_required() ? esc_html_e('(required)', 'buddypress') : '');
            ?>
</label>
            <?php 
            do_action(bp_get_the_profile_field_errors_action());
            ?>
            <input <?php 
            echo $html;
            ?>
 readonly>
						<input type="button" id="billing_postcode_search" value="우편번호 찾기" class="btn" onclick="openDaumPostcode();" style="height: 40px;">

    <div id="layerAddress" style="display:none;border:5px solid;position:fixed;width:500px;height:500px;left:50%;margin-left:-250px;top:50%;margin-top:-250px;overflow:hidden">
        <img src="http://i1.daumcdn.net/localimg/localimages/07/postcode/320/close.png" id="btnCloseLayer" style="cursor:pointer;position:absolute;right:-3px;top:-3px" onclick="closeDaumPostcode()">
    </div>

    <script>
        // 우편번호 찾기 화면을 넣을 element
        var element = document.getElementById('layerAddress');

        function closeDaumPostcode() {
            // iframe을 넣은 element를 안보이게 한다.
            element.style.display = 'none';
        }

        function openDaumPostcode() {
            new daum.Postcode({
                oncomplete: function(data) {
                    // 팝업에서 검색결과 항목을 클릭했을때 실행할 코드를 작성하는 부분. 우편번호와 주소 정보를 해당 필드에 넣고, 커서를 상세주소 필드로 이동한다.
                    document.getElementById("<?php 
            echo $input_name;
            ?>
").value = data.address;
                    //document.getElementById("zip1").value = data.postcode1;
                    //document.getElementById("zip2").value = data.postcode2;
                    //document.getElementById("addr1").value = data.address;
                    //document.getElementById("addr2").focus();
                // iframe을 넣은 element를 안보이게 한다.
                    element.style.display = 'none';
                },
                width : '100%',
                height : '100%'
            }).embed(element);

            // iframe을 넣은 element를 보이게 한다.
            element.style.display = 'block';
        }
    </script>

       <?php 
        }
    /**
     * Output the edit field HTML for this field type.
     *
     * Must be used inside the {@link bp_profile_fields()} template loop.
     *
     * @since 2.0.0
     *
     * @param array $raw_properties Optional key/value array of
     *                              {@link http://dev.w3.org/html5/markup/textarea.html permitted attributes}
     *                              that you want to add.
     */
    public function edit_field_html(array $raw_properties = array())
    {
        // User_id is a special optional parameter that certain other fields
        // types pass to {@link bp_the_profile_field_options()}.
        if (isset($raw_properties['user_id'])) {
            unset($raw_properties['user_id']);
        }
        $richtext_enabled = bp_xprofile_is_richtext_enabled_for_field();
        ?>

		<label for="<?php 
        bp_the_profile_field_input_name();
        ?>
">
			<?php 
        bp_the_profile_field_name();
        ?>
			<?php 
        bp_the_profile_field_required_label();
        ?>
		</label>

		<?php 
        /** This action is documented in bp-xprofile/bp-xprofile-classes */
        do_action(bp_get_the_profile_field_errors_action());
        if (!$richtext_enabled) {
            $r = wp_parse_args($raw_properties, array('cols' => 40, 'rows' => 5));
            ?>

			<textarea <?php 
            echo $this->get_edit_field_html_elements($r);
            ?>
><?php 
            bp_the_profile_field_edit_value();
            ?>
</textarea>

			<?php 
        } else {
            /**
             * Filters the arguments passed to `wp_editor()` in richtext xprofile fields.
             *
             * @since 2.4.0
             *
             * @param array $args {
             *     Array of optional arguments. See `wp_editor()`.
             *     @type bool $teeny         Whether to use the teeny version of TinyMCE. Default true.
             *     @type bool $media_buttons Whether to show media buttons. Default false.
             *     @type bool $quicktags     Whether to show the quicktags buttons. Default true.
             *     @type int  $textarea_rows Number of rows to display in the editor. Defaults to 1 in the
             *                               'admin' context, and 10 in the 'edit' context.
             * }
             * @param string $context The display context. 'edit' when the markup is intended for the
             *                        profile edit screen, 'admin' when intended for the Profile Fields
             *                        Dashboard panel.
             */
            $editor_args = apply_filters('bp_xprofile_field_type_textarea_editor_args', array('teeny' => true, 'media_buttons' => false, 'quicktags' => true, 'textarea_rows' => 10), 'edit');
            wp_editor(bp_get_the_profile_field_edit_value(), bp_get_the_profile_field_input_name(), $editor_args);
        }
    }
Exemple #15
0
    /**
     * Renders BuddyPress account extra fields.
     *
     * @since 3.5
     *
     * @access private
     */
    private function _render_buddypress_account_extra_fields()
    {
        if (!bp_is_active('xprofile')) {
            return;
        }
        do_action('bp_before_signup_profile_fields');
        ?>
<div class="register-section" id="profile-details-section">
			<h4><?php 
        _e('Profile Details', 'membership');
        ?>
</h4>

			<?php 
        if (bp_has_profile('profile_group_id=1&hide_empty_fields=0')) {
            ?>
				<?php 
            while (bp_profile_groups()) {
                bp_the_profile_group();
                ?>
					<?php 
                while (bp_profile_fields()) {
                    bp_the_profile_field();
                    ?>

						<?php 
                    $field_name = bp_get_the_profile_field_input_name();
                    ?>
						<?php 
                    $field_name_esc = esc_attr($field_name);
                    ?>
						<?php 
                    $field_type = bp_get_the_profile_field_type();
                    ?>

						<div class="editfield">
							<?php 
                    if ('textbox' == $field_type) {
                        ?>
								<label for="<?php 
                        echo $field_name_esc;
                        ?>
">
									<?php 
                        if (bp_get_the_profile_field_is_required()) {
                            ?>
										<?php 
                            printf(_x('%s (required)', '{Profile field} (required)', 'membership'), bp_get_the_profile_field_name());
                            ?>
									<?php 
                        } else {
                            ?>
										<?php 
                            bp_the_profile_field_name();
                            ?>
									<?php 
                        }
                        ?>
								</label>
								<?php 
                        do_action("bp_{$field_name}_errors");
                        ?>
								<input type="text" name="<?php 
                        echo $field_name_esc;
                        ?>
" id="<?php 
                        echo $field_name_esc;
                        ?>
" value="<?php 
                        bp_the_profile_field_edit_value();
                        ?>
" />
							<?php 
                    }
                    ?>

							<?php 
                    if ('textarea' == $field_type) {
                        ?>
								<label for="<?php 
                        echo $field_name_esc;
                        ?>
">
									<?php 
                        if (bp_get_the_profile_field_is_required()) {
                            ?>
										<?php 
                            printf(_x('%s (required)', '{Profile field} (required)', 'membership'), bp_get_the_profile_field_name());
                            ?>
									<?php 
                        } else {
                            ?>
										<?php 
                            bp_the_profile_field_name();
                            ?>
									<?php 
                        }
                        ?>
								</label>
								<?php 
                        do_action("bp_{$field_name}_errors");
                        ?>
								<textarea rows="5" cols="40" name="<?php 
                        echo $field_name_esc;
                        ?>
" id="<?php 
                        echo $field_name_esc;
                        ?>
"><?php 
                        bp_the_profile_field_edit_value();
                        ?>
</textarea>
							<?php 
                    }
                    ?>

							<?php 
                    if ('selectbox' == $field_type) {
                        ?>
								<label for="<?php 
                        echo $field_name_esc;
                        ?>
">
									<?php 
                        if (bp_get_the_profile_field_is_required()) {
                            ?>
										<?php 
                            printf(_x('%s (required)', '{Profile field} (required)', 'membership'), bp_get_the_profile_field_name());
                            ?>
									<?php 
                        } else {
                            ?>
										<?php 
                            bp_the_profile_field_name();
                            ?>
									<?php 
                        }
                        ?>
								</label>
								<?php 
                        do_action("bp_{$field_name}_errors");
                        ?>
								<select name="<?php 
                        echo $field_name_esc;
                        ?>
" id="<?php 
                        echo $field_name_esc;
                        ?>
">
									<?php 
                        bp_the_profile_field_options();
                        ?>
								</select>
							<?php 
                    }
                    ?>

							<?php 
                    if ('multiselectbox' == $field_type) {
                        ?>
								<label for="<?php 
                        echo $field_name_esc;
                        ?>
">
									<?php 
                        if (bp_get_the_profile_field_is_required()) {
                            ?>
										<?php 
                            printf(_x('%s (required)', '{Profile field} (required)', 'membership'), bp_get_the_profile_field_name());
                            ?>
									<?php 
                        } else {
                            ?>
										<?php 
                            bp_the_profile_field_name();
                            ?>
									<?php 
                        }
                        ?>
								</label>
								<?php 
                        do_action("bp_{$field_name}_errors");
                        ?>
								<select name="<?php 
                        echo $field_name_esc;
                        ?>
" id="<?php 
                        echo $field_name_esc;
                        ?>
" multiple="multiple">
									<?php 
                        bp_the_profile_field_options();
                        ?>
								</select>
							<?php 
                    }
                    ?>

							<?php 
                    if ('radio' == $field_type) {
                        ?>
								<div class="radio">
									<span class="label">
										<?php 
                        if (bp_get_the_profile_field_is_required()) {
                            ?>
											<?php 
                            printf(_x('%s (required)', '{Profile field} (required)', 'membership'), bp_get_the_profile_field_name());
                            ?>
										<?php 
                        } else {
                            ?>
											<?php 
                            bp_the_profile_field_name();
                            ?>
										<?php 
                        }
                        ?>
									</span>

									<?php 
                        do_action("bp_{$field_name}_errors");
                        ?>
									<?php 
                        bp_the_profile_field_options();
                        ?>

									<?php 
                        if (!bp_get_the_profile_field_is_required()) {
                            ?>
										<a class="clear-value" href="javascript:clear( '<?php 
                            echo $field_name_esc;
                            ?>
' );"><?php 
                            _e('Clear', 'membership');
                            ?>
</a>
									<?php 
                        }
                        ?>
								</div>
							<?php 
                    }
                    ?>

							<?php 
                    if ('checkbox' == $field_type) {
                        ?>
								<div class="checkbox">
									<span class="label">
										<?php 
                        if (bp_get_the_profile_field_is_required()) {
                            ?>
											<?php 
                            printf(_x('%s (required)', '{Profile field} (required)', 'membership'), bp_get_the_profile_field_name());
                            ?>
										<?php 
                        } else {
                            ?>
											<?php 
                            bp_the_profile_field_name();
                            ?>
										<?php 
                        }
                        ?>
									</span>

									<?php 
                        do_action("bp_{$field_name}_errors");
                        ?>
									<?php 
                        bp_the_profile_field_options();
                        ?>
								</div>
							<?php 
                    }
                    ?>

							<?php 
                    if ('datebox' == $field_type) {
                        ?>
								<div class="datebox">
									<label for="<?php 
                        echo $field_name_esc;
                        ?>
_day">
										<?php 
                        if (bp_get_the_profile_field_is_required()) {
                            ?>
											<?php 
                            printf(_x('%s (required)', '{Profile field} (required)', 'membership'), bp_get_the_profile_field_name());
                            ?>
										<?php 
                        } else {
                            ?>
											<?php 
                            bp_the_profile_field_name();
                            ?>
										<?php 
                        }
                        ?>
									</label>

									<?php 
                        do_action("bp_{$field_name}_errors");
                        ?>

									<select name="<?php 
                        echo $field_name_esc;
                        ?>
_day" id="<?php 
                        echo $field_name_esc;
                        ?>
_day">
										<?php 
                        bp_the_profile_field_options('type=day');
                        ?>
									</select>

									<select name="<?php 
                        echo $field_name_esc;
                        ?>
_month" id="<?php 
                        echo $field_name_esc;
                        ?>
_month">
										<?php 
                        bp_the_profile_field_options('type=month');
                        ?>
									</select>

									<select name="<?php 
                        echo $field_name_esc;
                        ?>
_year" id="<?php 
                        echo $field_name_esc;
                        ?>
_year">
										<?php 
                        bp_the_profile_field_options('type=year');
                        ?>
									</select>
								</div>
							<?php 
                    }
                    ?>

							<?php 
                    do_action('bp_custom_profile_edit_fields_pre_visibility');
                    ?>

							<?php 
                    if (bp_current_user_can('bp_xprofile_change_field_visibility')) {
                        ?>
								<p class="field-visibility-settings-toggle" id="field-visibility-settings-toggle-<?php 
                        bp_the_profile_field_id();
                        ?>
">
									<?php 
                        printf(_x('This field can be seen by: %s', 'This field can be seen by: {Administrator}', 'membership'), '<span class="current-visibility-level">' . bp_get_the_profile_field_visibility_level_label() . '</span>');
                        ?>
 <a href="#" class="visibility-toggle-link"><?php 
                        _ex('Change', 'Change profile field visibility level', 'membership');
                        ?>
</a>
								</p>

								<div class="field-visibility-settings" id="field-visibility-settings-<?php 
                        bp_the_profile_field_id();
                        ?>
">
									<fieldset>
										<legend><?php 
                        _e('Who can see this field?', 'membership');
                        ?>
</legend>
										<?php 
                        bp_profile_visibility_radio_buttons();
                        ?>
									</fieldset>
									<a class="field-visibility-settings-close" href="#"><?php 
                        _e('Close', 'membership');
                        ?>
</a>
								</div>
							<?php 
                    } else {
                        ?>
								<p class="field-visibility-settings-notoggle" id="field-visibility-settings-toggle-<?php 
                        bp_the_profile_field_id();
                        ?>
">
									<?php 
                        printf(__('This field can be seen by: <span class="current-visibility-level">%s</span>', 'membership'), bp_get_the_profile_field_visibility_level_label());
                        ?>
								</p>
							<?php 
                    }
                    ?>

							<?php 
                    do_action('bp_custom_profile_edit_fields');
                    ?>
							<p class="description"><?php 
                    bp_the_profile_field_description();
                    ?>
</p>
						</div>
					<?php 
                }
                ?>
					<input type="hidden" name="signup_profile_field_ids" id="signup_profile_field_ids" value="<?php 
                bp_the_profile_group_field_ids();
                ?>
">
				<?php 
            }
            ?>
			<?php 
        }
        ?>
		</div><!-- #profile-details-section --><?php 
        do_action('bp_after_signup_profile_fields');
    }
 public function edit_field_options_html(array $args = array())
 {
     $options = $this->field_obj->get_children();
     $checkbox_acceptance = maybe_unserialize(BP_XProfile_ProfileData::get_value_byid($this->field_obj->id, $args['user_id']));
     if (!empty($_POST['field_' . $this->field_obj->id])) {
         $new_checkbox_acceptance = $_POST['field_' . $this->field_obj->id];
         $checkbox_acceptance = $checkbox_acceptance != $new_checkbox_acceptance ? $new_checkbox_acceptance : $checkbox_acceptance;
     }
     $html = '<input type="checkbox" name="check_acc_' . bp_get_the_profile_field_input_name() . '" id="check_acc_' . bp_get_the_profile_field_input_name() . '"';
     if ($checkbox_acceptance == 1) {
         $html .= ' checked="checked"';
     }
     if (isset($args['required']) && $args['required']) {
         $html .= ' required="required" aria-required="true"';
     }
     $html .= ' value="1" /> ';
     $html .= '<input type="hidden" name="' . bp_get_the_profile_field_input_name() . '" id="' . bp_get_the_profile_field_input_name() . '"';
     if ($checkbox_acceptance == 1) {
         $html .= ' value="1" /> ';
     } else {
         $html .= ' value="0" /> ';
     }
     if ($options) {
         foreach ($options as $option) {
             $html .= rawurldecode($option->name);
         }
     }
     // Javascript.
     $html .= '
         <script>
             jQuery(document).ready(function() {
                 jQuery("#check_acc_' . bp_get_the_profile_field_input_name() . '").click(function() {
                     if (jQuery(this).is(":checked")) {
                         jQuery("#' . bp_get_the_profile_field_input_name() . '").val("1");
                     } else {
                         jQuery("#' . bp_get_the_profile_field_input_name() . '").val("0");
                     }
                 });
             });
         </script>
     ';
     echo apply_filters('bp_get_the_profile_field_checkbox_acceptance', $html, $args['type'], $this->field_obj->id, $checkbox_acceptance);
 }
        public function edit_field_html(array $raw_properties = array())
        {
            if (isset($raw_properties['user_id'])) {
                unset($raw_properties['user_id']);
            }
            // HTML5 required attribute.
            if (bp_get_the_profile_field_is_required()) {
                $raw_properties['required'] = 'required';
            }
            $input_name = bp_get_the_profile_field_input_name();
            $html = $this->get_edit_field_html_elements(array_merge(array('type' => 'text', 'value' => bp_get_the_profile_field_edit_value()), $raw_properties));
            ?>
            <label for="<?php 
            echo $input_name;
            ?>
"><?php 
            echo bp_the_profile_field_name() . (bp_get_the_profile_field_is_required() ? esc_html_e('(required)', 'buddypress') : '');
            ?>
</label>
            <?php 
            do_action(bp_get_the_profile_field_errors_action());
            ?>
            <input id="textDistrict" <?php 
            echo $html;
            ?>
 readonly>
						<input type="button" id="openDistrict" value="지역(선거구) 선택" class="btn" style="height: 40px;">

<style>
/*{{{districtSetting */
#layerDistrict {
	display:none;
	background-color: white;
	border:5px solid;
	position:fixed;
	left:50%;
	top:50%;
	min-width:500px;
	min-height:300px;
	margin-left:-250px;
	margin-top:-150px;
	overflow:auto;
}
.selectDistrict .nav-tabs a {
  font-size: 18px;
}
.selectDistrict .contents {
  width: 480px;
  padding: 10px;
  border: 1px solid #ddd;
  border-top: 0px none;
}
.selectDistrict select {
  width: 100%;
  height: 40px;
  font-size: 18px;
	margin: 5px 0 5px 0;
  padding: 0;
}
.selectDistrict span {
	margin: 5px 0;
  width: 49%;
  font-size: 20px;
	font-style: bold;
}
/*}}}*/
</style>

<div id="layerDistrict">
	<div class="selectDistrict popup-list valign-outer" style="display:block">
		<div class="valign-middle contents">
			<div class="center-block">
				<ul class="nav nav-tabs">
					<li class="tab1"><a href="#">선거구 선택</a></li>
				</ul>
				<div id="divDistrict" >
				</div>
				<span id="submitDistrict" class="btn btn-default">SUBMIT</span>
				<span id="closeDistrict" class="btn btn-default">CLOSE</span>
			</div>
		</div>
	</div>
</div>

       <?php 
        }
function bp_the_profile_field_input_name()
{
    echo bp_get_the_profile_field_input_name();
}
Exemple #19
0
    /**
     * Renders Buddypress profile field
     *
     * @param object $bp_field.
     * @param boolean $returm.
     * @author peshkov@UD
     */
    protected function render_bp_field($bp_field, $return = false)
    {
        global $field;
        $field = $bp_field;
        $type = bp_get_the_profile_field_type();
        ob_start();
        switch ($type) {
            case 'textbox':
                ?>
        <div class="bp textbox">
        <input type="text" name="bp[<?php 
                bp_the_profile_field_input_name();
                ?>
]" id="<?php 
                bp_the_profile_field_input_name();
                ?>
" value="<?php 
                bp_the_profile_field_edit_value();
                ?>
" <?php 
                if (bp_get_the_profile_field_is_required()) {
                    ?>
aria-required="true"<?php 
                }
                ?>
/>
        </div>
        <?php 
                break;
            case 'textarea':
                ?>
        <div class="bp textarea">
        <textarea rows="5" cols="40" name="bp[<?php 
                bp_the_profile_field_input_name();
                ?>
]" id="<?php 
                bp_the_profile_field_input_name();
                ?>
" <?php 
                if (bp_get_the_profile_field_is_required()) {
                    ?>
aria-required="true"<?php 
                }
                ?>
><?php 
                bp_the_profile_field_edit_value();
                ?>
</textarea>
        </div>
        <?php 
                break;
            case 'selectbox':
                ?>
        <div class="bp selectbox">
        <select name="bp[<?php 
                bp_the_profile_field_input_name();
                ?>
]" id="<?php 
                bp_the_profile_field_input_name();
                ?>
" <?php 
                if (bp_get_the_profile_field_is_required()) {
                    ?>
aria-required="true"<?php 
                }
                ?>
>
          <?php 
                bp_the_profile_field_options();
                ?>
        </select>
        </div>
        <?php 
                break;
            case 'multiselectbox':
                $input_type = bp_get_the_profile_field_input_name();
                preg_match('/field_[0-9]+/', $input_type, $matches);
                if ($matches) {
                    $input_type = $matches[0];
                }
                ?>
        <div class="bp multiselectbox">
        <select name="bp[<?php 
                echo $input_type;
                ?>
][]" id="<?php 
                echo $input_type;
                ?>
" multiple="multiple" <?php 
                if (bp_get_the_profile_field_is_required()) {
                    ?>
aria-required="true"<?php 
                }
                ?>
>
          <?php 
                bp_the_profile_field_options();
                ?>
        </select>
        <?php 
                if (!bp_get_the_profile_field_is_required()) {
                    ?>
          <a class="bp-clear-value" href="javascript:bp_clear_profile_field( '<?php 
                    echo $input_type;
                    ?>
' );"><?php 
                    _e('Clear', ud_get_wp_crm()->domain);
                    ?>
</a>
        <?php 
                }
                ?>
        </div>
        <?php 
                break;
            case 'radio':
                ?>
        <div class="bp radio">
        <?php 
                $options = bp_get_the_profile_field_options();
                $options = preg_replace('/(name=[\\"\'])(field\\_[0-9]+)/', '$1bp[$2]', $options);
                echo $options;
                ?>
        <?php 
                if (!bp_get_the_profile_field_is_required()) {
                    ?>
          <a class="bp-clear-value" href="javascript:bp_clear_profile_field( '<?php 
                    bp_the_profile_field_input_name();
                    ?>
' );"><?php 
                    _e('Clear', ud_get_wp_crm()->domain);
                    ?>
</a>
        <?php 
                }
                ?>
        </div>
        <?php 
                break;
            case 'checkbox':
                ?>
        <div class="bp checkbox">
        <?php 
                $options = bp_get_the_profile_field_options();
                $options = preg_replace('/(name=[\\"\'])(field\\_[0-9]+)/', '$1bp[$2]', $options);
                echo $options;
                ?>
        </div>
        <?php 
                break;
            case 'datebox':
                ?>
        <div class="bp datebox">
          <select name="bp[<?php 
                bp_the_profile_field_input_name();
                ?>
_day]" id="<?php 
                bp_the_profile_field_input_name();
                ?>
_day" <?php 
                if (bp_get_the_profile_field_is_required()) {
                    ?>
aria-required="true"<?php 
                }
                ?>
>
            <?php 
                bp_the_profile_field_options('type=day');
                ?>
          </select>
          <select name="bp[<?php 
                bp_the_profile_field_input_name();
                ?>
_month]" id="<?php 
                bp_the_profile_field_input_name();
                ?>
_month" <?php 
                if (bp_get_the_profile_field_is_required()) {
                    ?>
aria-required="true"<?php 
                }
                ?>
>
            <?php 
                bp_the_profile_field_options('type=month');
                ?>
          </select>
          <select name="bp[<?php 
                bp_the_profile_field_input_name();
                ?>
_year]" id="<?php 
                bp_the_profile_field_input_name();
                ?>
_year" <?php 
                if (bp_get_the_profile_field_is_required()) {
                    ?>
aria-required="true"<?php 
                }
                ?>
>
            <?php 
                bp_the_profile_field_options('type=year');
                ?>
          </select>
        </div>
        <?php 
                break;
        }
        $return = ob_get_contents();
        ob_end_clean();
        if ($return) {
            return $return;
        } else {
            echo $return;
        }
    }
    /**
     * Output HTML for this field type on the wp-admin Profile Fields screen.
     *
     * Must be used inside the {@link bp_profile_fields()} template loop.
     *
     * @param array $raw_properties Optional key/value array of permitted attributes that you want to add.
     * @since 2.0.0
     */
    public function admin_field_html(array $raw_properties = array())
    {
        bp_the_profile_field_options();
        if (bp_get_the_profile_field_is_required()) {
            return;
        }
        ?>

		<a class="clear-value" href="javascript:clear( '<?php 
        echo esc_js(bp_get_the_profile_field_input_name());
        ?>
' );">
			<?php 
        esc_html_e('Clear', 'buddypress');
        ?>
		</a>

		<?php 
    }
    /**
     * Output HTML for this field type on the wp-admin Profile Fields screen.
     *
     * Must be used inside the {@link bp_profile_fields()} template loop.
     *
     * @param array $raw_properties Optional key/value array of permitted attributes that you want to add.
     * @since 2.0.0
     */
    public function admin_field_html(array $raw_properties = array())
    {
        $day_r = bp_parse_args($raw_properties, array('id' => bp_get_the_profile_field_input_name() . '_day', 'name' => bp_get_the_profile_field_input_name() . '_day'));
        $month_r = bp_parse_args($raw_properties, array('id' => bp_get_the_profile_field_input_name() . '_month', 'name' => bp_get_the_profile_field_input_name() . '_month'));
        $year_r = bp_parse_args($raw_properties, array('id' => bp_get_the_profile_field_input_name() . '_year', 'name' => bp_get_the_profile_field_input_name() . '_year'));
        ?>

		<select <?php 
        echo $this->get_edit_field_html_elements($day_r);
        ?>
>
			<?php 
        bp_the_profile_field_options(array('type' => 'day'));
        ?>
		</select>

		<select <?php 
        echo $this->get_edit_field_html_elements($month_r);
        ?>
>
			<?php 
        bp_the_profile_field_options(array('type' => 'month'));
        ?>
		</select>

		<select <?php 
        echo $this->get_edit_field_html_elements($year_r);
        ?>
>
			<?php 
        bp_the_profile_field_options(array('type' => 'year'));
        ?>
		</select>

	<?php 
    }
									<div class="datebox">
										<label for="<?php 
                            bp_the_profile_field_input_name();
                            ?>
_day"><?php 
                            bp_the_profile_field_name();
                            ?>
 <?php 
                            if (bp_get_the_profile_field_is_required()) {
                                _e('(required)', 'buddypress');
                            }
                            ?>
</label>
										<?php 
                            do_action('bp_' . bp_get_the_profile_field_input_name() . '_errors');
                            ?>

										<select name="<?php 
                            bp_the_profile_field_input_name();
                            ?>
_day" id="<?php 
                            bp_the_profile_field_input_name();
                            ?>
_day">
											<?php 
                            bp_the_profile_field_options('type=day');
                            ?>
										</select>

										<select name="<?php 
        public function edit_field_html(array $raw_properties = array())
        {
            if (isset($raw_properties['user_id'])) {
                unset($raw_properties['user_id']);
            }
            $html = $this->get_edit_field_html_elements(array_merge(array('type' => 'file', 'accept' => 'image/*'), $raw_properties));
            $uploads = wp_upload_dir();
            // Label.
            $label = sprintf('<label for="%s">%s%s</label>', bp_get_the_profile_field_input_name(), bp_get_the_profile_field_name(), bp_get_the_profile_field_is_required() ? esc_html('(required)', 'buddypress') : '');
            // Input file.
            $input = sprintf('<input type="hidden" name="%1$s" id="%1$s" value="%2$s" /><input %3$s />', bp_get_the_profile_field_input_name(), bp_get_the_profile_field_edit_value() != '' && bp_get_the_profile_field_edit_value() != '-' ? bp_get_the_profile_field_edit_value() : '-', $html);
            // Actual image.
            if (bp_get_the_profile_field_edit_value() != '' && bp_get_the_profile_field_edit_value() != '-') {
                $actual_image = sprintf('<img src="%1$s" alt="%2$s" /><label for="%2$s_deleteimg"><input type="checkbox" name="%2$s_deleteimg" id="%2$s_deleteimg" value="1" /> %3$s</label><input type="hidden" name="%2$s_hiddenimg" id="%2$s_hiddenimg" value="%4$s" />', $uploads['baseurl'] . bp_get_the_profile_field_edit_value(), bp_get_the_profile_field_input_name(), __('Check this to delete this image', 'bxcft'), bp_get_the_profile_field_edit_value());
            } elseif (bp_get_profile_field_data(array('field' => bp_get_the_profile_field_id())) != '' && bp_get_profile_field_data(array('field' => bp_get_the_profile_field_id())) != '-') {
                $actual_image = sprintf('%1$s<label for="%2$s_deleteimg"><input type="checkbox" name="%2$s_deleteimg" id="%2$s_deleteimg" value="1" /> %3$s</label><input type="hidden" name="%2$s_hiddenimg" id="%2$s_hiddenimg" value="%4$s" />', strip_tags(bp_get_profile_field_data(array('field' => bp_get_the_profile_field_id()))), bp_get_the_profile_field_input_name(), __('Check this to delete this image', 'bxcft'), isset($_POST['field_' . bp_get_the_profile_field_id() . '_hiddenimg']) ? $_POST['field_' . bp_get_the_profile_field_id() . '_hiddenimg'] : '');
            } else {
                $actual_image = '';
            }
            echo apply_filters('bxcft_field_label', $label, bp_get_the_profile_field_id(), bp_get_the_profile_field_type(), bp_get_the_profile_field_input_name(), bp_get_the_profile_field_name(), bp_get_the_profile_field_is_required());
            do_action(bp_get_the_profile_field_errors_action());
            echo apply_filters('bxcft_field_input', $input, bp_get_the_profile_field_id(), bp_get_the_profile_field_type(), bp_get_the_profile_field_input_name(), bp_get_the_profile_field_is_required());
            echo apply_filters('bxcft_field_actual_image', $actual_image, bp_get_the_profile_field_id(), bp_get_the_profile_field_type(), bp_get_the_profile_field_input_name(), bp_get_the_profile_field_edit_value());
            ?>
            <script type="text/javascript">
                if (jQuery('#profile-edit-form').length > 0) {
                    jQuery('#profile-edit-form').attr('enctype', 'multipart/form-data');
                }
                if (jQuery('#your-profile').length > 0) {
                    jQuery('#your-profile').attr('enctype', 'multipart/form-data');
                }
            <?php 
            if (bp_get_the_profile_field_edit_value() != '' && bp_get_the_profile_field_edit_value() != '-') {
                ?>
                jQuery('#field_<?php 
                echo bp_get_the_profile_field_id();
                ?>
_deleteimg').change(function() {
                    if (jQuery(this).is(':checked') && jQuery('input#field_<?php 
                echo bp_get_the_profile_field_id();
                ?>
[type=file]').val() === '') {
                        jQuery('input#field_<?php 
                echo bp_get_the_profile_field_id();
                ?>
[type=hidden]').val('');
                    } else {
                        jQuery('input#field_<?php 
                echo bp_get_the_profile_field_id();
                ?>
[type=hidden]').val('<?php 
                echo bp_get_the_profile_field_edit_value();
                ?>
');
                    }
                });
            <?php 
            }
            ?>
                jQuery('input#field_<?php 
            echo bp_get_the_profile_field_id();
            ?>
[type=file]').change(function() {
                    if (jQuery(this).val() !== '') {
                        jQuery('input#field_<?php 
            echo bp_get_the_profile_field_id();
            ?>
[type=hidden]').val('-');
                    } else {
                        jQuery('input#field_<?php 
            echo bp_get_the_profile_field_id();
            ?>
[type=hidden]').val('');
                    }
                });
            </script>
        <?php 
        }
    /**
     * Output the edit field HTML for this field type.
     *
     * Must be used inside the {@link bp_profile_fields()} template loop.
     *
     * @since 2.0.0
     *
     * @param array $raw_properties Optional key/value array of
     *                              {@link http://dev.w3.org/html5/markup/select.html permitted attributes}
     *                              that you want to add.
     */
    public function edit_field_html(array $raw_properties = array())
    {
        // User_id is a special optional parameter that we pass to
        // {@link bp_the_profile_field_options()}.
        if (isset($raw_properties['user_id'])) {
            $user_id = (int) $raw_properties['user_id'];
            unset($raw_properties['user_id']);
        } else {
            $user_id = bp_displayed_user_id();
        }
        $r = bp_parse_args($raw_properties, array('multiple' => 'multiple', 'id' => bp_get_the_profile_field_input_name() . '[]', 'name' => bp_get_the_profile_field_input_name() . '[]'));
        ?>

		<label for="<?php 
        bp_the_profile_field_input_name();
        ?>
[]">
			<?php 
        bp_the_profile_field_name();
        ?>
			<?php 
        bp_the_profile_field_required_label();
        ?>
		</label>

		<?php 
        /** This action is documented in bp-xprofile/bp-xprofile-classes */
        do_action(bp_get_the_profile_field_errors_action());
        ?>

		<select <?php 
        echo $this->get_edit_field_html_elements($r);
        ?>
>
			<?php 
        bp_the_profile_field_options(array('user_id' => $user_id));
        ?>
		</select>

		<?php 
        if (!bp_get_the_profile_field_is_required()) {
            ?>

			<a class="clear-value" href="javascript:clear( '<?php 
            echo esc_js(bp_get_the_profile_field_input_name());
            ?>
[]' );">
				<?php 
            esc_html_e('Clear', 'buddypress');
            ?>
			</a>

		<?php 
        }
        ?>
	<?php 
    }
    protected function _element_html_radio($raw_properties = array(), $user_id = null)
    {
        ?>

		<div class="radio">

			<label for="<?php 
        bp_the_profile_field_input_name();
        ?>
">
				<?php 
        bp_the_profile_field_name();
        ?>
				<?php 
        bp_the_profile_field_required_label();
        ?>
			</label>

			<?php 
        /** This action is documented in bp-xprofile/bp-xprofile-classes */
        do_action(bp_get_the_profile_field_errors_action());
        ?>

			<?php 
        bp_the_profile_field_options(array('user_id' => $user_id));
        if (!bp_get_the_profile_field_is_required()) {
            ?>

				<a class="clear-value" href="javascript:clear( '<?php 
            echo esc_js(bp_get_the_profile_field_input_name());
            ?>
' );">
					<?php 
            esc_html_e('Clear', 'buddypress');
            ?>
				</a>

			<?php 
        }
        ?>

		</div>
		<?php 
    }