<?php defined('BASEPATH') or exit('No direct script access allowed'); ?>
<?php
$CI =& get_instance();

$CI->load->model('leads_model');
$leads_sources = $CI->leads_model->get_source();
$leads_statuses = $CI->leads_model->get_status();
?>
<div class="row">
    <?php echo form_open_multipart(
        (!isset($tab['update_url'])
            ? "?"
            : $tab['update_url']),
        ['id' => 'settings-form', 'class' => isset($tab['update_url']) ? 'custom-update-url' : '']
    );
    ?>
    <div class="col-md-12">
        <?php echo render_input('settings[propertybase_landingpage_seo_title]', 'propertybase_landingpage_seo_title', get_option('propertybase_landingpage_seo_title')); ?>
        <hr/>
        <?php echo render_input('settings[propertybase_landingpage_seo_description]', 'propertybase_landingpage_seo_description', get_option('propertybase_landingpage_seo_description')); ?>
        <hr/>
        <?php echo render_input('settings[propertybase_landingpage_seo_keywords]', 'propertybase_landingpage_seo_keywords', get_option('propertybase_landingpage_seo_keywords')); ?>
        <hr/>
        <?php echo render_input('settings[propertybase_google_analytics_code]', 'propertybase_google_analytics_code', get_option('propertybase_google_analytics_code')); ?>
        <hr/>
        <?php echo render_select('settings[propertybase_default_selected_status_for_leads]', $leads_statuses, array('id', 'name'), 'propertybase_selected_lead_default_status_lp', get_option('propertybase_default_selected_status_for_leads')); ?>
        <hr/>
        <?php echo render_select('settings[propertybase_default_selected_source_for_leads]', $leads_sources, array('id', 'name'), 'propertybase_selected_lead_default_source_lp', get_option('propertybase_default_selected_source_for_leads')); ?>
        <hr/>
        <?php render_yes_no_option('propertybase_disable_properties_landing_page', 'propertybase_disable_landing_page'); ?>
        <hr/>
        <?php render_yes_no_option('propertybase_add_no_follow_tag_for_landingpage', 'propertybase_add_no_follow_tag_for_landingpage'); ?>
        <hr/>
        <?php render_yes_no_option('propertybase_display_agent_profile', 'propertybase_display_agent_profile'); ?>
        <hr/>
        <?php render_yes_no_option('propertybase_hide_rented_and_sold_properties_from_listing', 'propertybase_hide_rented_and_sold_properties_from_listing'); ?>
    </div>

    <div class="btn-bottom-toolbar text-right">
        <button type="submit" class="btn btn-primary">
            <?php echo _l('settings_save'); ?>
        </button>
    </div>

    <?php echo form_close(); ?>
</div>