$option_name = OptionIndexes::get_option_name(WpSolrExtensions::OPTION_INDEXES);
// Options object
$option_object = new OptionIndexes();
?>

<?php 
global $response_object, $google_recaptcha_site_key, $google_recaptcha_token;
$is_submit_button_form_temporary_index = isset($_POST['submit_button_form_temporary_index']);
$form_data = WpSolrExtensions::extract_form_data($is_submit_button_form_temporary_index, array('managed_solr_service_id' => array('default_value' => '', 'can_be_empty' => false)));
?>

<div id="solr-hosting-tab">

	<?php 
// Options data. Loaded after the POST, to be sure it contains the posted data.
$option_data = OptionIndexes::get_option_data(WpSolrExtensions::OPTION_INDEXES);
$subtabs = array();
// Create the tabs from the Solr indexes already configured
foreach ($option_object->get_indexes() as $index_indice => $index) {
    $subtabs[$index_indice] = isset($index['index_name']) ? $index['index_name'] : 'Index with no name';
}
$subtabs['new_index'] = count($option_object->get_indexes()) > 0 ? $license_manager->show_premium_link(OptionLicenses::LICENSE_PACKAGE_CORE, 'Configure another index', false) : 'Configure your first index';
// Create subtabs on the left side
$subtab = wpsolr_admin_sub_tabs($subtabs);
?>

	<div id="solr-results-options" class="wdm-vertical-tabs-content">

		<?php 
$is_new_index = false;
if ('new_index' === $subtab) {