Exemplo n.º 1
0
</label>
			<select name="ip_support_status">
				<option value="open" ><?php 
_e('Open', $this->name);
?>
</option>
				<option value="closed" ><?php 
_e('Closed', $this->name);
?>
</option>
			</select>
		</p>

<?php 
// Support Request Section - Default From Settings
$sections = get_ip_sections();
$default_section = get_ip_default_section();
$current_section = get_ip_sections_by_id($support_request->ID);
if (empty($current_section)) {
    $current_section = $default_section;
} else {
    $current_section = $current_section[0]->term_id;
}
?>
		<p>
			<label for="ip_support_section"><?php 
_e('Section:', $this->name);
?>
</label>
			<select name="ip_support_section">
				<option value="">-- Select a Section --</option>
Exemplo n.º 2
0
/**
 * Returns the IP Section Select Form Element
 *
 * @since			1.0.0
 * @return		String		The html markup to display the section select element
 */
function get_ip_form_section_select()
{
    if (!ip_has_sections()) {
        return;
    }
    $sections = get_ip_sections();
    $default_section = get_ip_default_section();
    $section_select_output = '<div id="ip-support-section-select-wrapper"><label for="ip-support-section">Section: </label>
		<select id="ip-support-section-select" name="ip-support-section" class="ip-select">';
    foreach ($sections as $section) {
        $selected = '';
        if ($default_section == $section->term_id) {
            $selected = 'selected';
        }
        $section_select_output .= '<option value="' . $section->term_id . '" ' . $selected . '>' . $section->name . '</option>';
    }
    $section_select_output .= '</select></div>';
    return $section_select_output;
}