/**
     * 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);
        }
    }
    /**
     * Output the edit field HTML for this field type.
     *
     * Must be used inside the {@link bp_profile_fields()} template loop.
     *
     * @param array $raw_properties Optional key/value array of
     *                              {@link http://dev.w3.org/html5/markup/input.number.html permitted attributes}
     *                              that you want to add.
     *
     * @since 2.1.0
     */
    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('type' => 'text', 'inputmode' => 'url', 'value' => esc_url(bp_get_the_profile_field_edit_value())));
        ?>

		<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());
        ?>

		<input <?php 
        echo $this->get_edit_field_html_elements($r);
        ?>
>

		<?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';
                $required = true;
            } else {
                $required = false;
            }
            ?>
            <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());
            ?>
            <?php 
            bp_the_profile_field_options("user_id={$user_id}&required={$required}");
            ?>
        <?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/input.checkbox.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();
        }
        ?>

		<fieldset class="checkbox">
			<legend>
				<?php 
        bp_the_profile_field_name();
        ?>
				<?php 
        bp_the_profile_field_required_label();
        ?>
			</legend>

			<?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));
        ?>

		</fieldset>

		<?php 
    }
    /**
     * Output the edit field HTML for this field type.
     *
     * Must be used inside the {@link bp_profile_fields()} template loop.
     *
     * @param array $raw_properties Optional key/value array of {@link http://dev.w3.org/html5/markup/input.radio.html permitted attributes} that you want to add.
     * @since 2.0.0
     */
    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();
        }
        ?>

		<div class="radio">

			<label 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)', 'buddypress');
            ?>
				<?php 
        }
        ?>
			</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 
    }
    /**
     * Output the edit field HTML for this field type.
     *
     * Must be used inside the {@link bp_profile_fields()} template loop.
     *
     * @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.
     * @since 2.0.0
     */
    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 
        if (bp_get_the_profile_field_is_required()) {
            _e('(required)', 'buddypress');
        }
        ?>
</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 
    }
        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 
        }
    /**
     * Output the edit field HTML for this field type.
     *
     * Must be used inside the {@link bp_profile_fields()} template loop.
     *
     * @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.
     * @since BuddyPress (2.0.0)
     */
    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();
        }
        ?>

		<label 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)', 'buddypress');
            ?>
			<?php 
        }
        ?>
		</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($raw_properties);
        ?>
>
			<?php 
        bp_the_profile_field_options(array('user_id' => $user_id));
        ?>
		</select>

		<?php 
    }
    /**
     * Output the edit field HTML for this field type.
     *
     * Must be used inside the {@link bp_profile_fields()} template loop.
     *
     * @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.
     * @since 2.0.0
     */
    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));
        ?>

		<label 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)', 'buddypress');
            ?>
			<?php 
        }
        ?>
		</label>

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

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

		<?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' => 'color', 'value' => bp_get_the_profile_field_edit_value()), $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());
            ?>
            <input <?php 
            echo $html;
            ?>
>
            <script>
                if (!Modernizr.inputtypes.color) {
                    // No html5 field colorpicker => Calling jscolor.
                    jQuery('input#<?php 
            bp_the_profile_field_input_name();
            ?>
').addClass('color');
                }
            </script>
       <?php 
        }
    /**
     * Display the global fields on the users public profile.
     *
     * @since  1.0
     *
     */
    public function display_global_profile_fields()
    {
        global $profile_template;
        $this->write_log($profile_template);
        if ($profile_template->field->visibility_level == 'global') {
            $this->write_log($profile_template->field->visibility_level);
            $global_field_value = bp_xprofile_get_meta($profile_template->field->id, 'field', 'global_value');
            if (!empty($global_field_value) || '0' === $global_field_value) {
                $value = maybe_unserialize($global_field_value);
            } else {
                $value = false;
            }
            if (!empty($value) || '0' === $value) {
                ?>

				<tr<?php 
                bp_field_css_class();
                ?>
>

					<td class="label"><?php 
                bp_the_profile_field_name();
                ?>
</td>

					<td class="data"><?php 
                echo $value;
                ?>
</td>

				</tr>

			<?php 
            }
        }
    }
Exemplo n.º 12
0
/**
 * Handles the WYSIWYG display of each profile field on the edit screen.
 *
 * @since 1.5.0
 *
 * @param object $admin_field Admin field.
 * @param object $admin_group Admin group object.
 * @param string $class       Classes to append to output.
 */
function xprofile_admin_field($admin_field, $admin_group, $class = '')
{
    global $field;
    $field = $admin_field;
    ?>

	<fieldset id="draggable_field_<?php 
    echo esc_attr($field->id);
    ?>
"class="sortable<?php 
    echo ' ' . $field->type;
    if (!empty($class)) {
        echo ' ' . $class;
    }
    ?>
">
		<legend>
			<span>
				<?php 
    bp_the_profile_field_name();
    ?>

				<?php 
    if (empty($field->can_delete)) {
        esc_html_e('(Primary)', 'buddypress');
    }
    ?>
				<?php 
    bp_the_profile_field_required_label();
    ?>
				<?php 
    if (bp_xprofile_get_meta($field->id, 'field', 'signup_position')) {
        esc_html_e('(Sign-up)', 'buddypress');
    }
    ?>
				<?php 
    if (bp_get_member_types()) {
        echo $field->get_member_type_label();
    }
    ?>

				<?php 
    /**
     * Fires at end of legend above the name field in base xprofile group.
     *
     * @since 2.2.0
     *
     * @param BP_XProfile_Field $field Current BP_XProfile_Field
     *                                 object being rendered.
     */
    do_action('xprofile_admin_field_name_legend', $field);
    ?>
			</span>
		</legend>
		<div class="field-wrapper">

			<?php 
    if (in_array($field->type, array_keys(bp_xprofile_get_field_types()))) {
        $field_type = bp_xprofile_create_field_type($field->type);
        $field_type->admin_field_html();
    } else {
        /**
         * Fires after the input if the current field is not in default field types.
         *
         * @since 1.5.0
         *
         * @param BP_XProfile_Field $field Current BP_XProfile_Field
         *                                 object being rendered.
         * @param int               $value Integer 1.
         */
        do_action('xprofile_admin_field', $field, 1);
    }
    ?>

			<?php 
    if ($field->description) {
        ?>

				<p class="description"><?php 
        echo esc_attr($field->description);
        ?>
</p>

			<?php 
    }
    ?>

			<div class="actions">
				<a class="button edit" href="users.php?page=bp-profile-setup&amp;group_id=<?php 
    echo esc_attr($admin_group->id);
    ?>
&amp;field_id=<?php 
    echo esc_attr($field->id);
    ?>
&amp;mode=edit_field"><?php 
    _e('Edit', 'buddypress');
    ?>
</a>

				<?php 
    if ($field->can_delete) {
        ?>

					<div class="delete-button">
						<a class="confirm submit-delete deletion" href="users.php?page=bp-profile-setup&amp;field_id=<?php 
        echo esc_attr($field->id);
        ?>
&amp;mode=delete_field"><?php 
        _e('Delete', 'buddypress');
        ?>
</a>
					</div>

				<?php 
    }
    ?>

				<?php 
    /**
     * Fires at end of field management links in xprofile management admin.
     *
     * @since 2.2.0
     *
     * @param BP_XProfile_Group $group BP_XProfile_Group object
     *                                 for the current group.
     */
    do_action('xprofile_admin_field_action', $field);
    ?>

			</div>
		</div>
	</fieldset>

<?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('type' => 'text', 'inputmode' => 'url', 'value' => esc_url(bp_get_the_profile_field_edit_value())));
            $r['class'] = $r['class'] . ' form-control';
            ?>
	
			<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());
            ?>
	
					<input <?php 
            echo $this->get_edit_field_html_elements($r);
            ?>
>
				</div>
			</div>
	
	
			<?php 
        }
Exemplo n.º 14
0
    public static function form_settings_xprofile_fields($gmw_forms, $formID, $section, $option)
    {
        global $bp;
        if (!bp_is_active('xprofile')) {
            _e('Buddypress xprofile fields component is deactivated.  You will need to activate in in order to use this feature.', 'GMW');
            return;
        }
        if (function_exists('bp_has_profile')) {
            if (bp_has_profile('hide_empty_fields=0')) {
                $dateboxes = array();
                $dateboxes[0] = '';
                while (bp_profile_groups()) {
                    bp_the_profile_group();
                    while (bp_profile_fields()) {
                        bp_the_profile_field();
                        if (bp_get_the_profile_field_type() == 'datebox' || bp_get_the_profile_field_type() == 'birthdate') {
                            $dateboxes[] = bp_get_the_profile_field_id();
                        } else {
                            $field_id = bp_get_the_profile_field_id();
                            ?>
                                <input type="checkbox" name="<?php 
                            echo 'gmw_forms[' . $formID . '][' . $section . '][profile_fields][]';
                            ?>
" value="<?php 
                            echo $field_id;
                            ?>
" <?php 
                            if (isset($gmw_forms[$formID][$section]['profile_fields']) && in_array($field_id, $gmw_forms[$formID][$section]['profile_fields'])) {
                                echo ' checked=checked';
                            }
                            ?>
/>
                                <label><?php 
                            bp_the_profile_field_name();
                            ?>
</label>
                                <br />
                                <?php 
                        }
                    }
                }
                ?>

                    <label><strong style="margin:5px 0px;float:left;width:100%"><?php 
                _e('Choose the "Age Range" Field', 'GMW');
                ?>
</strong></label><br />
                    <select name="<?php 
                echo 'gmw_forms[' . $formID . '][' . $section . '][profile_fields_date]';
                ?>
">
                        <?php 
                foreach ($dateboxes as $datebox) {
                    $field = new BP_XProfile_Field($datebox);
                    $selected = $gmw_forms[$formID][$section]['profile_fields_date'] == $datebox ? 'selected="selected"' : '';
                    ?>
                            <option value="<?php 
                    echo $datebox;
                    ?>
" <?php 
                    echo $selected;
                    ?>
 ><?php 
                    echo $field->name;
                    ?>
</option>
                        <?php 
                }
                ?>
                    </select> 
                    <?php 
            }
        }
    }
Exemplo n.º 15
0
									</div>

								<?php 
                        }
                        ?>

								<?php 
                        if ('datebox' == bp_get_the_profile_field_type()) {
                            ?>

									<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 
Exemplo n.º 16
0
    function bp_mtc_screen_two_content()
    {
        global $bp, $wpdb, $creds, $profile_template, $groups;
        ?>
    <p>Please select any tags that you would like to include in your followed content.</p>

<?php 
        if (bp_has_profile()) {
            while (bp_profile_groups()) {
                bp_the_profile_group();
                if ('mtc' == bp_get_the_profile_group_name()) {
                    ?>
<form action="<?php 
                    bp_the_profile_group_edit_form_action();
                    ?>
" method="post" id="profile-edit-form" class="standard-form <?php 
                    bp_the_profile_group_slug();
                    ?>
">


	   <?php 
                    while (bp_profile_fields()) {
                        bp_the_profile_field();
                        ?>

			<fieldset<?php 
                        bp_field_css_class('editfield');
                        ?>
>

        

					<div class="checkbox">
						<span class="label"><?php 
                        bp_the_profile_field_name();
                        ?>
 <?php 
                        if (bp_get_the_profile_field_is_required()) {
                            _e('(required)', 'buddypress');
                        }
                        ?>
</span>

						<?php 
                        bp_the_profile_field_options();
                        ?>
					</div>

				



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

				<p class="description"><?php 
                        bp_the_profile_field_description();
                        ?>
</p>
			</fieldset>

		 <?php 
                    }
                    ?>



	<div class="submit">
		<input type="submit" name="profile-group-edit-submit" id="profile-group-edit-submit" value="<?php 
                    _e('Save selection', 'buddypress');
                    ?>
 " />
	</div>

	<input type="hidden" name="field_ids" id="field_ids" value="<?php 
                    bp_the_profile_group_field_ids();
                    ?>
" />
	<?php 
                    wp_nonce_field('bp_xprofile_edit');
                    ?>

</form>
<?php 
                }
            }
        }
        ?>


  <?php 
        /* 
           if ( function_exists('xprofile_get_profile') ) : 
        	  if ( bp_has_profile() ) : 
        
        		  while ( bp_profile_groups() ) : bp_the_profile_group(); 
               print_r(bp_get_the_profile_group_name()); 
        
             endwhile; 
            endif; 
           
          endif; */
        ?>
  
  <?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/input.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();
        }
        $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'));
        ?>

		<div class="datebox">

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

			<?php 
        /**
         * Fires after field label and displays associated errors for the field.
         *
         * This is a dynamic hook that is dependent on the associated
         * field ID. The hooks will be similar to `bp_field_12_errors`
         * where the 12 is the field ID. Simply replace the 12 with
         * your needed target ID.
         *
         * @since 1.8.0
         */
        do_action(bp_get_the_profile_field_errors_action());
        ?>

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

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

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

		</div>
	<?php 
    }
Exemplo n.º 18
0
				<?php endif; ?>

				<?php if ( 'checkbox' == bp_get_the_profile_field_type() ) : ?>

					<div class="checkbox">
						<span class="label"><?php bp_the_profile_field_name() ?> <?php if ( bp_get_the_profile_field_is_required() ) : ?><?php _e( '(required)', 'buddypress' ) ?><?php endif; ?></span>

						<?php bp_the_profile_field_options() ?>
					</div>

				<?php endif; ?>

				<?php if ( 'datebox' == bp_get_the_profile_field_type() ) : ?>

					<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() ) : ?><?php _e( '(required)', 'buddypress' ) ?><?php endif; ?></label>

						<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 bp_the_profile_field_input_name() ?>_month" id="<?php bp_the_profile_field_input_name() ?>_month">
							<?php bp_the_profile_field_options( 'type=month' ) ?>
						</select>

						<select name="<?php bp_the_profile_field_input_name() ?>_year" id="<?php bp_the_profile_field_input_name() ?>_year">
							<?php bp_the_profile_field_options( 'type=year' ) ?>
						</select>
					</div>

				<?php endif; ?>
        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 
        }
Exemplo n.º 20
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');
    }
Exemplo n.º 21
0
/**
 * Handles the WYSIWYG display of each profile field on the edit screen
 */
function xprofile_admin_field($admin_field, $admin_group, $class = '')
{
    global $field;
    $field = $admin_field;
    ?>

	<fieldset id="field_<?php 
    echo esc_attr($field->id);
    ?>
" class="sortable<?php 
    echo ' ' . $field->type;
    if (!empty($class)) {
        echo ' ' . $class;
    }
    ?>
">
		<legend><span><?php 
    bp_the_profile_field_name();
    ?>
 <?php 
    if (!$field->can_delete) {
        ?>
 <?php 
        _e('(Primary)', 'buddypress');
    }
    ?>
 <?php 
    if (bp_get_the_profile_field_is_required()) {
        _e('(Required)', 'buddypress');
    }
    ?>
</span></legend>
		<div class="field-wrapper">

			<?php 
    if (in_array($field->type, array_keys(bp_xprofile_get_field_types()))) {
        $field_type = bp_xprofile_create_field_type($field->type);
        $field_type->admin_field_html();
    } else {
        do_action('xprofile_admin_field', $field, 1);
    }
    ?>

			<?php 
    if ($field->description) {
        ?>

				<p class="description"><?php 
        echo esc_attr($field->description);
        ?>
</p>

			<?php 
    }
    ?>

			<div class="actions">
				<a class="button edit" href="users.php?page=bp-profile-setup&amp;group_id=<?php 
    echo esc_attr($admin_group->id);
    ?>
&amp;field_id=<?php 
    echo esc_attr($field->id);
    ?>
&amp;mode=edit_field"><?php 
    _e('Edit', 'buddypress');
    ?>
</a>

				<?php 
    if ($field->can_delete) {
        ?>

					<div class="delete-button">
						<a class="confirm submit-delete deletion" href="users.php?page=bp-profile-setup&amp;field_id=<?php 
        echo esc_attr($field->id);
        ?>
&amp;mode=delete_field"><?php 
        _e('Delete', 'buddypress');
        ?>
</a>
					</div>

				<?php 
    }
    ?>
			</div>
		</div>
	</fieldset>

<?php 
}
Exemplo n.º 22
0
    /**
     * Output the edit field HTML for this field type.
     *
     * Must be used inside the {@link bp_profile_fields()} template loop.
     *
     * @param array $raw_properties Optional key/value array of
     *        {@link http://dev.w3.org/html5/markup/input.number.html permitted attributes}
     *        that you want to add.
     * @since BuddyPress (2.1.0)
     */
    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('type' => 'text', 'inputmode' => 'url', 'value' => esc_url(bp_get_the_profile_field_edit_value())));
        ?>

		<label 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)', 'buddypress');
            ?>
			<?php 
        }
        ?>
		</label>

		<input <?php 
        echo $this->get_edit_field_html_elements($r);
        ?>
>

		<?php 
    }
Exemplo n.º 23
0
function bp_ajax_register_form_function()
{
    ob_start();
    ?>

<style>


#ajax_signup_form { text-align:left; color:#cfcfcf; } 
#ajax_signup_form input[type=text], #ajax_signup_form input[type=password] {
	width:95% !important; height:1.7em !important; border-radius:4px !important;
}

#ajax_signup_form label, #ajax_signup_form span.label {
    display: block; font-weight: bold; margin: 10px 0 4px; text-align: left; color:#DDD;
}

#ajax_signup_form #blog-details-section, #ajax_signup_form #profile-details-section {
	width:auto;	float:none;
}

#ajax_signup_form.standard-form div div.error {
    background: none repeat scroll 0 0 #E41717; border-radius: 3px 3px 3px 3px; color: #FFFFFF; margin: 0 0 3px; padding: 1px 4px; font-size:12px; display:none;
}

.errorField {
    background: none repeat scroll 0 0 #FF9999; outline: 0 none;
}
div#si_refresh_reg { display:inline; } 

div.ctrlHolder {
	float: left; margin-left:30px; width: 44%;
}

.fullwidth { width:96% !important; } 

div.ctrlHolder span.help { font-style:italic; font-size:12px;} 
div#blog_template-selection { float:left; margin-left:30px; } 
div.blog_template-item { 
    margin-left: 2px !important; padding: 2px 2px 5px 2px !important; width: 80px !important;
 }
	
div.blog_template-item div.blog_template-description { display:none; } 
div.blog_template-selected {
   background: none repeat scroll 0 0 #DDDDDD !important; color: #000000 !important;
}
#ajax_signup_form div.submit { margin-left:30px; }  

div.register-section input#captcha_code { width:160px !important; } 

img#si_image_reg { margin-top:10px;border: 2px solid #222222; } 

div.success_message { background: none repeat scroll 0 0 #555555;
    border: 1px solid #ACACAC;
    border-radius: 8px 8px 8px 8px;
    box-shadow: 0 0px 2px 1px #CCCCCC inset;
    color: #FFFFFF;
    padding: 15px;
	margin-top:60px;
	display:none;
}

#signup_submit {
    background: none repeat scroll 0 0 #0099CC;
    border: medium none;
	border-radius:0 !important;
    color: #FFFFFF;
    cursor: pointer;
    display: inline-block;
    font-family: "Helvetica Neue","Helvetica",Arial,Verdana,sans-serif;
    font-size: 1.3rem;
    line-height: 1;
    margin: 1em 0 0;
    outline: medium none;
    padding: 0.5em 2em;
    position: relative;
    text-align: center;
    text-decoration: none;
}

#signup_submit:hover, #signup_submit:focus  { 
	background-color: #666666 !important; color: #FFFFFF;
}

.captchaSizeDivLarge { float:left; } 

#blog-details-section  { margin-bottom:10px; } 
</style>

<script type="text/javascript">
	jQuery(document).ready( function() {
		
		//jQuery('div#blog-details').show();

		//jQuery( 'input#signup_with_blog' ).removeAttr("checked");
		//if ( jQuery('div#blog-details').length && !jQuery('div#blog-details').hasClass('show') )
			//jQuery('div#blog-details').toggle();

		//jQuery( 'input#signup_with_blog' ).click( function() {
			//jQuery('div#blog-details').fadeOut().toggle();
		//});

		jQuery( '#ajax_signup_form input' ).focus(function(e) {
            var name = jQuery(this).attr('name');
			jQuery(this).removeClass('errorField');
			//jQuery('#'+name+"_error").fadeOut(400);
        });
		
		jQuery('#captcha_code').parent().find('label').append('<div id="captcha_code_error" class="error"></div>');
		jQuery('.captchaSizeDivLarge').parent().css('margin-left','30px');
	});
</script>

<script language="javascript" type="text/javascript">
	var ajaxurl = '<?php 
    echo admin_url('admin-ajax.php');
    ?>
 ' ;
	var myinterval;

	function hideSuccessMessage() { 
		window.clearInterval(myinterval);
		jQuery('.success_message').fadeOut(300,function(){
			jQuery('#ajax_signup_form').fadeIn(400,function(){});
		});
	}
	
	function bp_ajax_submit_register_form()
	{
		jQuery('.error').hide();
		var serialized = jQuery('#ajax_signup_form').serialize();
		var data = serialized;
		jQuery.post(ajaxurl, data, function(response) {
			response = eval('('+response+')');
			if(response['status'] == 'error') {
				var errors = response['errors'];
				for(i in errors) {
					jQuery('#'+i+"_error").html(errors[i]);
					jQuery('#'+i+"_error").fadeIn(300);
				}
			} else {
				if(response['status'] == 'user-error') {
					alert(response['error-msg']);
				} else if (response['status'] == 'success') {
					document.getElementById('ajax_signup_form').reset();
					
					jQuery('#ajax_signup_form').fadeOut(300,function(){
						jQuery('.success_message').fadeIn(400,function(){
							myinterval = window.setInterval(hideSuccessMessage, 4000);
						});
					});
				} else {
					alert('Unknown Error Occured.');
				}
			}
			jQuery('#si_refresh_reg a').trigger('click');
		});
	}
</script>
<div class="success_message">
<?php 
    if (bp_registration_needs_activation()) {
        ?>
					<p><?php 
        _e('You have successfully created your account! To begin using this site you will need to activate your account via the email we have just sent to your address.', 'buddypress');
        ?>
</p>
				<?php 
    } else {
        ?>
					<p><?php 
        _e('You have successfully created your account! Please log in using the username and password you have just created.', 'buddypress');
        ?>
</p>
				<?php 
    }
    ?>
</div>
<form action="" onSubmit="bp_ajax_submit_register_form(); return false;" name="signup_form" id="ajax_signup_form" class="standard-form" method="post" enctype="multipart/form-data">
			
				<h2><?php 
    _e('&nbsp;', 'buddypress');
    ?>
</h2>

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

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

				<div class="register-section ajax-register-section" id="basic-details-section">

					<?php 
    /***** Basic Account Details ******/
    ?>

					<div class="ctrlHolder">
					<label for="signup_username"><?php 
    _e('Username', 'buddypress');
    ?>
 <?php 
    _e('', 'buddypress');
    ?>
</label>
					<div id="signup_username_error" class="error"></div>
					<input type="text" name="signup_username" id="signup_username" value="<?php 
    bp_signup_username_value();
    ?>
" />
                    </div>

					<div class="ctrlHolder">
					<label for="signup_email"><?php 
    _e('Email Address', 'buddypress');
    ?>
 <?php 
    _e('', 'buddypress');
    ?>
</label>
					<div id="signup_email_error" class="error"></div>
					<input type="text" name="signup_email" id="signup_email" value="<?php 
    bp_signup_email_value();
    ?>
" />
					</div>
                    
                    <div class="ctrlHolder">
					<label for="signup_password"><?php 
    _e('Choose a Password', 'buddypress');
    ?>
 <?php 
    _e('', 'buddypress');
    ?>
</label>
					<div id="signup_password_error" class="error"></div>
					<input type="password" name="signup_password" id="signup_password" value="" />
					</div>
                    
                    <div class="ctrlHolder">
					<label for="signup_password_confirm"><?php 
    _e('Confirm Password', 'buddypress');
    ?>
 <?php 
    _e('', 'buddypress');
    ?>
</label>
					<div id="signup_password_confirm_error" class="error"></div>
					<input type="password" name="signup_password_confirm" id="signup_password_confirm" value="" />
					</div>
				</div><!-- #basic-details-section -->

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

				<?php 
    /***** Extra Profile Details ******/
    ?>

				<?php 
    if (bp_is_active('xprofile')) {
        ?>

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

					<div class="register-section ajax-register-section" id="profile-details-section">

						<?php 
        /* Use the profile field loop to render input fields for the 'base' profile field group */
        ?>
						<?php 
        if (bp_is_active('xprofile')) {
            if (bp_has_profile('profile_group_id=1&hide_empty_fields=0')) {
                while (bp_profile_groups()) {
                    bp_the_profile_group();
                    ?>

						<?php 
                    while (bp_profile_fields()) {
                        bp_the_profile_field();
                        ?>

							<div class="ctrlHolder fullwidth">

								<?php 
                        if ('textbox' == bp_get_the_profile_field_type()) {
                            ?>

									<label for="<?php 
                            bp_the_profile_field_input_name();
                            ?>
"><?php 
                            bp_the_profile_field_name();
                            ?>
 <?php 
                            if (bp_get_the_profile_field_is_required()) {
                                _e('', 'buddypress');
                            }
                            ?>
</label>
									<div id="<?php 
                            bp_the_profile_field_input_name();
                            ?>
_error" class="error"></div>
									<input type="text" name="<?php 
                            bp_the_profile_field_input_name();
                            ?>
" id="<?php 
                            bp_the_profile_field_input_name();
                            ?>
" value="<?php 
                            bp_the_profile_field_edit_value();
                            ?>
" />

								<?php 
                        }
                        ?>

								<?php 
                        if ('textarea' == bp_get_the_profile_field_type()) {
                            ?>

									<label for="<?php 
                            bp_the_profile_field_input_name();
                            ?>
"><?php 
                            bp_the_profile_field_name();
                            ?>
 <?php 
                            if (bp_get_the_profile_field_is_required()) {
                                _e('', 'buddypress');
                            }
                            ?>
</label>
									<div id="<?php 
                            bp_the_profile_field_input_name();
                            ?>
_error" class="error"></div>
									<textarea rows="5" cols="40" name="<?php 
                            bp_the_profile_field_input_name();
                            ?>
" id="<?php 
                            bp_the_profile_field_input_name();
                            ?>
"><?php 
                            bp_the_profile_field_edit_value();
                            ?>
</textarea>

								<?php 
                        }
                        ?>

								<?php 
                        if ('selectbox' == bp_get_the_profile_field_type()) {
                            ?>

									<label for="<?php 
                            bp_the_profile_field_input_name();
                            ?>
"><?php 
                            bp_the_profile_field_name();
                            ?>
 <?php 
                            if (bp_get_the_profile_field_is_required()) {
                                _e('', 'buddypress');
                            }
                            ?>
</label>
									<div id="<?php 
                            bp_the_profile_field_input_name();
                            ?>
_error" class="error"></div>
									<select name="<?php 
                            bp_the_profile_field_input_name();
                            ?>
" id="<?php 
                            bp_the_profile_field_input_name();
                            ?>
">
										<?php 
                            bp_the_profile_field_options();
                            ?>
									</select>

								<?php 
                        }
                        ?>

								<?php 
                        if ('multiselectbox' == bp_get_the_profile_field_type()) {
                            ?>

									<label for="<?php 
                            bp_the_profile_field_input_name();
                            ?>
"><?php 
                            bp_the_profile_field_name();
                            ?>
 <?php 
                            if (bp_get_the_profile_field_is_required()) {
                                _e('', 'buddypress');
                            }
                            ?>
</label>
									<div id="<?php 
                            bp_the_profile_field_input_name();
                            ?>
_error" class="error"></div>
									<select name="<?php 
                            bp_the_profile_field_input_name();
                            ?>
" id="<?php 
                            bp_the_profile_field_input_name();
                            ?>
" multiple="multiple">
										<?php 
                            bp_the_profile_field_options();
                            ?>
									</select>

								<?php 
                        }
                        ?>

								<?php 
                        if ('radio' == bp_get_the_profile_field_type()) {
                            ?>

									<div class="radio">
										<span class="label"><?php 
                            bp_the_profile_field_name();
                            ?>
 <?php 
                            if (bp_get_the_profile_field_is_required()) {
                                _e('', 'buddypress');
                            }
                            ?>
</span>

										<div id="<?php 
                            bp_the_profile_field_input_name();
                            ?>
_error" class="error"></div>
										<?php 
                            bp_the_profile_field_options();
                            ?>

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

								<?php 
                        }
                        ?>

								<?php 
                        if ('checkbox' == bp_get_the_profile_field_type()) {
                            ?>

									<div class="checkbox">
										<span class="label"><?php 
                            bp_the_profile_field_name();
                            ?>
 <?php 
                            if (bp_get_the_profile_field_is_required()) {
                                _e('', 'buddypress');
                            }
                            ?>
</span>

										<div id="<?php 
                            bp_the_profile_field_input_name();
                            ?>
_error" class="error"></div>
										<?php 
                            bp_the_profile_field_options();
                            ?>
									</div>

								<?php 
                        }
                        ?>

								<?php 
                        if ('datebox' == bp_get_the_profile_field_type()) {
                            ?>

									<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('', 'buddypress');
                            }
                            ?>
</label>
										<div id="<?php 
                            bp_the_profile_field_input_name();
                            ?>
_error" class="error"></div>

										<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 
                            bp_the_profile_field_input_name();
                            ?>
_month" id="<?php 
                            bp_the_profile_field_input_name();
                            ?>
_month">
											<?php 
                            bp_the_profile_field_options('type=month');
                            ?>
										</select>

										<select name="<?php 
                            bp_the_profile_field_input_name();
                            ?>
_year" id="<?php 
                            bp_the_profile_field_input_name();
                            ?>
_year">
											<?php 
                            bp_the_profile_field_options('type=year');
                            ?>
										</select>
									</div>

								<?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 
                }
            }
        }
        ?>

					</div><!-- #profile-details-section -->

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


				<?php 
        if (bp_get_blog_signup_allowed()) {
            ?>

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

					<?php 
            /***** Blog Creation Details ******/
            ?>

					<div class="register-section clearfix" id="blog-details-section ">

						<div style="display:none" class="ctrlHolder">
						<p><input type="checkbox" name="signup_with_blog" id="signup_with_blog" value="1" checked="checked" /> <?php 
            _e('Yes, I\'d like to create a new site', 'buddypress');
            ?>
</p>
						</div>
                        <div style="clear:both"></div>
						<div id="blog-details">
							<div class="ctrlHolder fullwidth">
							<label for="signup_blog_url"><?php 
            _e('Choose Site Name', 'buddypress');
            ?>
 <?php 
            _e('', 'buddypress');
            ?>
</label>
							<div id="signup_blog_url_error" class="error"></div>

							<?php 
            if (is_subdomain_install()) {
                ?>
								<input  type="text" name="signup_blog_url" id="signup_blog_url" value="<?php 
                bp_signup_blog_url_value();
                ?>
" /> .<?php 
                bp_blogs_subdomain_base();
                ?>
							<?php 
            } else {
                ?>
								<?php 
                echo site_url();
                ?>
/ <input type="text" name="signup_blog_url" id="signup_blog_url" value="<?php 
                bp_signup_blog_url_value();
                ?>
" />
							<?php 
            }
            ?>
                            <br/><span class="help">Example: NewBusiness.webento.com</span>
							</div>
                            
                            <div style="clear:both"></div>
                            
                            <div class="ctrlHolder fullwidth">
							<label for="signup_blog_title"><?php 
            _e('Site Title', 'buddypress');
            ?>
 <?php 
            _e('', 'buddypress');
            ?>
</label>
							<div id="signup_blog_title_error" class="error"></div>
							<input type="text" name="signup_blog_title" id="signup_blog_title" value="<?php 
            bp_signup_blog_title_value();
            ?>
" />
                            <br/><span class="help">Example: New Business</span>
							</div>
                            
							<span style=" display: block;float: left;margin-left: 30px; color:#fff; background:none !important;" class="label"><?php 
            _e('I would like my site to appear in search engines, and in public listings around this network.', 'buddypress');
            ?>
:</span>
                            
							<div class="ctrlHolder">
							<div id="signup_blog_privacy_error" class="error"></div>
							<label style="display:inline-block; "><input type="radio" name="signup_blog_privacy" id="signup_blog_privacy_public" value="public"<?php 
            if ('public' == bp_get_signup_blog_privacy_value() || !bp_get_signup_blog_privacy_value()) {
                ?>
 checked="checked"<?php 
            }
            ?>
 /> <?php 
            _e('Yes', 'buddypress');
            ?>
</label>
							<label style="display:inline-block; margin-left:10px;"><input type="radio" name="signup_blog_privacy" id="signup_blog_privacy_private" value="private"<?php 
            if ('private' == bp_get_signup_blog_privacy_value()) {
                ?>
 checked="checked"<?php 
            }
            ?>
 /> <?php 
            _e('No', 'buddypress');
            ?>
</label>
                            </div>
							
                            <?php 
            do_action('bp_after_blog_details_fields');
            ?>
						</div>
						
					</div><!-- #blog-details-section -->
					
					

				<?php 
        }
        ?>

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

				<div class="submit">
					<input type="submit"  name="signup_submit" id="signup_submit" value="<?php 
        _e('Sign Up', 'buddypress');
        ?>
" />
                    <input type="hidden" value="bp_ajax_submit_register_form" name="action" />
				</div>

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

				<?php 
        wp_nonce_field('bp_new_signup');
        ?>

			<?php 
    }
    // request-details signup step
    ?>

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

			</form>
<?php 
    $output = ob_get_clean();
    return $output;
}
    /**
     * Generates the HTML code for a single XProfile input field.
     *
     * Code is taken from the BuddyPress default theme file:
     * plugins/buddypress/bp-themes/bp-default/registration/register.php
     *
     * @since  1.0.1.0
     * @param  int $field_id The XProfile field ID.
     * @param  mixed $field_value Value of the field.
     * @return string The HTML code to display the field.
     */
    public function render_xprofile_field($field_id, $field_value = null, $visibility = false)
    {
        global $field;
        $field = xprofile_get_field($field_id);
        ob_start();
        ?>
		<div class="ms-form-element ms-form-element-xprofile editfield field-<?php 
        echo $field_id;
        ?>
">

			<?php 
        if ('textarea' == bp_get_the_profile_field_type()) {
            ?>

				<label 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)', 'buddypress');
            }
            ?>
</label>
				<?php 
            do_action(bp_get_the_profile_field_errors_action());
            ?>
				<textarea rows="5" cols="40" name="<?php 
            bp_the_profile_field_input_name();
            ?>
" id="<?php 
            bp_the_profile_field_input_name();
            ?>
"><?php 
            bp_the_profile_field_edit_value();
            ?>
</textarea>

			<?php 
        } elseif ('selectbox' == bp_get_the_profile_field_type()) {
            ?>

				<label 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)', 'buddypress');
            }
            ?>
</label>
				<?php 
            do_action(bp_get_the_profile_field_errors_action());
            ?>
				<select name="<?php 
            bp_the_profile_field_input_name();
            ?>
" id="<?php 
            bp_the_profile_field_input_name();
            ?>
">
					<?php 
            bp_the_profile_field_options();
            ?>
				</select>

			<?php 
        } elseif ('multiselectbox' == bp_get_the_profile_field_type()) {
            ?>

				<label 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)', 'buddypress');
            }
            ?>
</label>
				<?php 
            do_action(bp_get_the_profile_field_errors_action());
            ?>
				<select name="<?php 
            bp_the_profile_field_input_name();
            ?>
" id="<?php 
            bp_the_profile_field_input_name();
            ?>
" multiple="multiple">
					<?php 
            bp_the_profile_field_options();
            ?>
				</select>

			<?php 
        } elseif ('radio' == bp_get_the_profile_field_type()) {
            ?>

				<div class="radio">
					<span class="label"><?php 
            bp_the_profile_field_name();
            ?>
 <?php 
            if (bp_get_the_profile_field_is_required()) {
                _e('(required)', 'buddypress');
            }
            ?>
</span>

					<?php 
            do_action(bp_get_the_profile_field_errors_action());
            ?>
					<?php 
            bp_the_profile_field_options();
            ?>

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

			<?php 
        } elseif ('checkbox' == bp_get_the_profile_field_type()) {
            ?>

				<div class="checkbox">
					<span class="label"><?php 
            bp_the_profile_field_name();
            ?>
 <?php 
            if (bp_get_the_profile_field_is_required()) {
                _e('(required)', 'buddypress');
            }
            ?>
</span>

					<?php 
            do_action(bp_get_the_profile_field_errors_action());
            ?>
					<?php 
            bp_the_profile_field_options();
            ?>
				</div>

			<?php 
        } elseif ('datebox' == bp_get_the_profile_field_type()) {
            ?>

				<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_get_the_profile_field_errors_action());
            ?>

					<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 
            bp_the_profile_field_input_name();
            ?>
_month" id="<?php 
            bp_the_profile_field_input_name();
            ?>
_month">
						<?php 
            bp_the_profile_field_options('type=month');
            ?>
					</select>

					<select name="<?php 
            bp_the_profile_field_input_name();
            ?>
_year" id="<?php 
            bp_the_profile_field_input_name();
            ?>
_year">
						<?php 
            bp_the_profile_field_options('type=year');
            ?>
					</select>
				</div>

			<?php 
        } else {
            ?>

				<label 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)', 'buddypress');
            }
            ?>
</label>
				<?php 
            do_action(bp_get_the_profile_field_errors_action());
            ?>
				<input type="<?php 
            bp_the_profile_field_type();
            ?>
" name="<?php 
            bp_the_profile_field_input_name();
            ?>
" id="<?php 
            bp_the_profile_field_input_name();
            ?>
" value="<?php 
            bp_the_profile_field_edit_value();
            ?>
" />

			<?php 
        }
        ?>

			<?php 
        if ($visibility) {
            ?>
				<?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(__('This field can be seen by: <span class="current-visibility-level">%s</span>', 'buddypress'), bp_get_the_profile_field_visibility_level_label());
                ?>
 <a href="#" class="visibility-toggle-link"><?php 
                _ex('Change', 'Change profile field visibility level', 'buddypress');
                ?>
</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?', 'buddypress');
                ?>
</legend>

							<?php 
                bp_profile_visibility_radio_buttons();
                ?>

						</fieldset>
						<a class="field-visibility-settings-close" href="#"><?php 
                _e('Close', 'buddypress');
                ?>
</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>', 'buddypress'), bp_get_the_profile_field_visibility_level_label());
                ?>
					</p>
				<?php 
            }
            ?>
			<?php 
        }
        ?>

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

			<p class="description"><?php 
        bp_the_profile_field_description();
        ?>
</p>

		</div>
		<?php 
        $html = ob_get_clean();
        return $html;
    }
        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($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;
            ?>
>
                <option value=""><?php 
            _e('Select...', 'bxcft');
            ?>
</option>
                <?php 
            bp_the_profile_field_options("user_id={$user_id}");
            ?>
            </select>
        <?php 
        }
Exemplo n.º 26
0
        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 
        }
Exemplo n.º 27
0
function xprofile_admin_field($admin_field, $admin_group, $class = '')
{
    global $field;
    $field = $admin_field;
    ?>
						<fieldset id="field_<?php 
    echo esc_attr($field->id);
    ?>
" class="sortable<?php 
    echo ' ' . $field->type;
    if ($class) {
        echo ' ' . $class;
    }
    ?>
">
							<legend><span><?php 
    bp_the_profile_field_name();
    ?>
 <?php 
    if (!$field->can_delete) {
        ?>
 <?php 
        _e('(Primary)', 'buddypress');
    }
    ?>
 <?php 
    if (bp_get_the_profile_field_is_required()) {
        _e('(Required)', 'buddypress');
    }
    ?>
</span></legend>
							<div class="field-wrapper">

<?php 
    switch ($field->type) {
        case 'textbox':
            ?>

								<input type="text" name="<?php 
            bp_the_profile_field_input_name();
            ?>
" id="<?php 
            bp_the_profile_field_input_name();
            ?>
" value="" />

<?php 
            break;
        case 'textarea':
            ?>

								<textarea rows="5" cols="40" name="<?php 
            bp_the_profile_field_input_name();
            ?>
" id="<?php 
            bp_the_profile_field_input_name();
            ?>
"></textarea>

<?php 
            break;
        case 'selectbox':
            ?>

								<select name="<?php 
            bp_the_profile_field_input_name();
            ?>
" id="<?php 
            bp_the_profile_field_input_name();
            ?>
">
									<?php 
            bp_the_profile_field_options();
            ?>

								</select>

<?php 
            break;
        case 'multiselectbox':
            ?>

								<select name="<?php 
            bp_the_profile_field_input_name();
            ?>
" id="<?php 
            bp_the_profile_field_input_name();
            ?>
" multiple="multiple">
									<?php 
            bp_the_profile_field_options();
            ?>

								</select>

<?php 
            break;
        case 'radio':
            ?>

								<?php 
            bp_the_profile_field_options();
            ?>

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

								<a class="clear-value" href="javascript:clear( '<?php 
                bp_the_profile_field_input_name();
                ?>
' );"><?php 
                _e('Clear', 'buddypress');
                ?>
</a>

<?php 
            }
            ?>

<?php 
            break;
        case 'checkbox':
            ?>

<?php 
            bp_the_profile_field_options();
            ?>

<?php 
            break;
        case 'datebox':
            ?>

								<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 
            bp_the_profile_field_input_name();
            ?>
_month" id="<?php 
            bp_the_profile_field_input_name();
            ?>
_month">
									<?php 
            bp_the_profile_field_options('type=month');
            ?>

								</select>

								<select name="<?php 
            bp_the_profile_field_input_name();
            ?>
_year" id="<?php 
            bp_the_profile_field_input_name();
            ?>
_year">
									<?php 
            bp_the_profile_field_options('type=year');
            ?>

								</select>

<?php 
            break;
        default:
            ?>

<?php 
            do_action('xprofile_admin_field', $field, 1);
            ?>

<?php 
    }
    ?>
								<div class="actions">
									<a class="button edit" href="admin.php?page=bp-profile-setup&amp;group_id=<?php 
    echo esc_attr($admin_group->id);
    ?>
&amp;field_id=<?php 
    echo esc_attr($field->id);
    ?>
&amp;mode=edit_field"><?php 
    _e('Edit', 'buddypress');
    ?>
</a>
									<?php 
    if (!$field->can_delete) {
        ?>
&nbsp;<?php 
    } else {
        ?>
<a class="button delete" href="admin.php?page=bp-profile-setup&amp;field_id=<?php 
        echo esc_attr($field->id);
        ?>
&amp;mode=delete_field"><?php 
        _e('Delete', 'buddypress');
        ?>
</a><?php 
    }
    ?>

								</div>

<?php 
    if ($field->description) {
        ?>

								<p class="description"><?php 
        echo esc_attr($field->description);
        ?>
</p>

<?php 
    }
    ?>

							</div>
						</fieldset>
<?php 
}
Exemplo n.º 28
0
				<?php do_action( 'bp_before_profile_field_content' ) ?>

				<div class="bp-widget <?php bp_the_profile_group_slug() ?>">
					<?php if ( 1 != bp_get_the_profile_group_id() ) : ?>
						<h4><?php bp_the_profile_group_name() ?></h4>
					<?php endif; ?>

					<table class="profile-fields zebra">
						<?php while ( bp_profile_fields() ) : bp_the_profile_field(); ?>

							<?php if ( bp_field_has_data() ) : ?>
								<tr<?php bp_field_css_class() ?>>

									<td class="label">
										<?php bp_the_profile_field_name() ?>
									</td>

									<td class="data">
										<?php bp_the_profile_field_value() ?>
									</td>

								</tr>
							<?php endif; ?>

							<?php do_action( 'bp_profile_field_item' ) ?>

						<?php endwhile; ?>
					</table>
				</div>
    /**
     * Output the edit field HTML for this field type.
     *
     * Must be used inside the {@link bp_profile_fields()} template loop.
     *
     * @param array $raw_properties Optional key/value array of {@link http://dev.w3.org/html5/markup/input.number.html permitted attributes} that you want to add.
     * @since BuddyPress (2.0.0)
     */
    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']);
        }
        $html = $this->get_edit_field_html_elements(array_merge(array('type' => 'number', 'value' => bp_get_the_profile_field_edit_value()), $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());
        ?>
		<input <?php 
        echo $html;
        ?>
>
	<?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 
    }