/** * Test for PMA_getHtmlForFooter * * @return void */ public function testGetHtmlForFooter() { $result = PMA_getHtmlForFooter(); $this->assertContains('<input type="submit" name="do_save_data" value="Save" />', $result); $this->assertContains('<div id="properties_message">', $result); $this->assertContains('<div id="popup_background">', $result); }
/** * Function to get html for the create table or field add view * * @param string $action action * @param array $form_params forms parameters * @param array $content_cells content cells * @param array $header_cells header cells * * @return string */ function PMA_getHtmlForTableCreateOrAddField($action, $form_params, $content_cells, $header_cells) { $html = '<form method="post" action="' . $action . '" class="' . ($action == 'tbl_create.php' ? 'create_table' : 'append_fields') . '_form ajax lock-page">'; $html .= PMA_URL_getHiddenInputs($form_params); $html .= '<input type="hidden" name="primary_indexes" value="[]">'; $html .= '<input type="hidden" name="unique_indexes" value="[]">'; $html .= '<input type="hidden" name="indexes" value="[]">'; $html .= '<input type="hidden" name="fulltext_indexes" value="[]">'; if ($action == 'tbl_create.php') { $html .= PMA_getHtmlForTableNameAndNoOfColumns(); } if (is_array($content_cells) && is_array($header_cells)) { $html .= PMA_getHtmlForTableFieldDefinitions($header_cells, $content_cells); } if ($action == 'tbl_create.php') { $html .= PMA_getHtmlForTableConfigurations(); } $html .= PMA_getHtmlForFooter(); return $html; }
/** * Function to get html for the create table or field add view * * @param string $action action * @param array $form_params forms parameters * @param array $content_cells content cells * @param array $header_cells header cells * * @return string */ function PMA_getHtmlForTableCreateOrAddField($action, $form_params, $content_cells, $header_cells) { $html = '<form method="post" action="' . $action . '" class="' . ($action == 'tbl_create.php' ? 'create_table' : 'append_fields') . '_form ajax">'; $html .= PMA_URL_getHiddenInputs($form_params); if ($action == 'tbl_create.php') { $html .= PMA_getHtmlForTableNameAndNoOfColumns(); } if (is_array($content_cells) && is_array($header_cells)) { $html .= PMA_getHtmlForTableFieldDefinitions($header_cells, $content_cells); } if ($action == 'tbl_create.php') { $html .= PMA_getHtmlForTableConfigurations(); } $html .= PMA_getHtmlForFooter(); return $html; }