/** * 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_getAfterInsertDropDown * * @return void */ public function testGetAfterInsertDropDown() { $result = PMA_getAfterInsertDropDown("`t`.`f` = 2", 'new_insert', true); $this->assertTag(PMA_getTagArray('<option value="new_insert" selected="selected">'), $result); $this->assertTag(PMA_getTagArray('<option value="same_insert"'), $result); $this->assertTag(PMA_getTagArray('<option value="edit_next" >'), $result); }