/** * Get action panel * * @param array $where_clause where clause * @param string $after_insert insert mode, e.g. new_insert, same_insert * @param integer $tabindex tab index * @param integer $tabindex_for_value offset for the values tabindex * @param boolean $found_unique_key boolean variable for unique key * * @return string an html snippet */ function PMA_getActionsPanel($where_clause, $after_insert, $tabindex, $tabindex_for_value, $found_unique_key) { $html_output = '<fieldset id="actions_panel">' . '<table cellpadding="5" cellspacing="0">' . '<tr>' . '<td class="nowrap vmiddle">' . PMA_getSubmitTypeDropDown($where_clause, $tabindex, $tabindex_for_value) . "\n"; $html_output .= '</td>' . '<td class="vmiddle">' . ' <strong>' . __('and then') . '</strong> ' . '</td>' . '<td class="nowrap vmiddle">' . PMA_getAfterInsertDropDown($where_clause, $after_insert, $found_unique_key) . '</td>' . '</tr>'; $html_output .= '<tr>' . PMA_getSubmitAndResetButtonForActionsPanel($tabindex, $tabindex_for_value) . '</tr>' . '</table>' . '</fieldset>'; return $html_output; }
/** * Test for PMA_getSubmitAndResetButtonForActionsPanel * * @return void */ public function testGetSubmitAndResetButtonForActionsPanel() { $GLOBALS['cfg']['ShowHint'] = false; $result = PMA_getSubmitAndResetButtonForActionsPanel(1, 0); $this->assertContains('<input type="submit" class="control_at_footer" value="Go" ' . 'tabindex="7" id="buttonYes" />', $result); $this->assertContains('<input type="button" class="preview_sql" value="Preview SQL" ' . 'tabindex="8" />', $result); $this->assertContains('<input type="reset" class="control_at_footer" value="Reset" ' . 'tabindex="9" />', $result); }