diff options
author | Rouslan Placella <rouslan@placella.com> | 2011-06-14 18:11:32 +0400 |
---|---|---|
committer | Rouslan Placella <rouslan@placella.com> | 2011-06-14 18:24:40 +0400 |
commit | cde93fe9496d2573790b3cfcc19699ec104338af (patch) | |
tree | 9e495cdd15789fa7eed6512df703729a39e9af49 /db_routines.php | |
parent | 31b42160d89b222e8d9ba44a6cfc2848db2048ad (diff) |
Refactored code that generates parameter rows for the Routine Editor.
Diffstat (limited to 'db_routines.php')
-rw-r--r-- | db_routines.php | 31 |
1 files changed, 1 insertions, 30 deletions
diff --git a/db_routines.php b/db_routines.php index 1087ce0e55..48bb3cf694 100644 --- a/db_routines.php +++ b/db_routines.php @@ -368,36 +368,7 @@ if (count($routine_errors) || ( empty($_REQUEST['routine_process_addroutine']) & // Show form $editor = PMA_RTN_getEditorForm($mode, $operation, $routine, $routine_errors, $GLOBALS['is_ajax_request']); if ($GLOBALS['is_ajax_request']) { - // TODO: this needs to be refactored - $template = " <tr>\n"; - $template .= " <td class='routine_direction_cell'><select name='routine_param_dir[%s]'>\n"; - foreach ($param_directions as $key => $value) { - $template .= " <option>$value</option>\n"; - } - $template .= " </select></td>\n"; - $template .= " <td><input name='routine_param_name[%s]' type='text'\n"; - $template .= " value='' /></td>\n"; - $template .= " <td><select name='routine_param_type[%s]'>"; - $template .= PMA_getSupportedDatatypes(true) . "\n"; - $template .= " </select></td>\n"; - $template .= " <td><input name='routine_param_length[%s]' type='text'\n"; - $template .= " value='' /></td>\n"; - $template .= " <td><select name='routine_param_opts_text[%s]'>\n"; - $template .= " <option value=''>(CHARSET)</option>"; - $template .= PMA_getSupportedCharsets(true) . "\n"; - $template .= " </select></td>\n"; - $template .= " <td><select name='routine_param_opts_num[%s]'>\n"; - $template .= " <option value=''></option>\n"; - foreach ($param_opts_num as $key => $value) { - $template .= " <option>$value</option>\n"; - } - $template .= "\n </select></td>\n"; - $template .= " <td class='routine_param_remove' style='vertical-align: middle;'>\n"; - $template .= " <a href='#' class='routine_param_remove_anchor'>\n"; - $template .= " {$titles['Drop']}\n"; - $template .= " </a>\n"; - $template .= " </td>\n"; - $template .= " </tr>\n"; + $template = PMA_RTN_getParameterRow(); $extra_data = array('title' => $title, 'param_template' => $template, 'type' => $routine['type']); PMA_ajaxResponse($editor, true, $extra_data); } |