private function generate_new_page()
 {
     $this->property_type_id = 10000;
     $this->property_type_data = wpl_property_types::get_property_type($this->property_type_id);
     $this->property_types_category = wpl_property_types::get_property_type_categories();
     parent::render($this->tpl_path, 'internal_edit_property_types');
     exit;
 }
Example #2
0
            buttonImageOnly: true
        });
    });
    </script>';
    $done_this = true;
} elseif ($type == 'ptcategory' and !$done_this) {
    switch ($field['type']) {
        case 'select':
            $show = 'select';
            $any = true;
            $label = true;
            break;
    }
    /** current value **/
    $current_value = stripslashes(wpl_request::getVar('sf_ptcategory', -1));
    $categories = wpl_property_types::get_property_type_categories();
    if ($label) {
        $html .= '<label>' . __($field['name'], WPL_TEXTDOMAIN) . '</label>';
    }
    if ($show == 'select') {
        $html .= '<select name="sf' . $widget_id . '_ptcategory" class="wpl_search_widget_field_' . $field['id'] . '" id="sf' . $widget_id . '__ptcategory">';
        if ($any) {
            $html .= '<option value="-1">' . __($field['name'], WPL_TEXTDOMAIN) . '</option>';
        }
        foreach ($categories as $category) {
            $html .= '<option data-id="' . $category['id'] . '" value="' . $category['name'] . '" ' . (strtolower($current_value) == strtolower($category['name']) ? 'selected="selected"' : '') . '>' . __($category['name'], WPL_TEXTDOMAIN) . '</option>';
        }
        $html .= '</select>';
        $html .= '<script type="text/javascript">
        wplj(function()
        {