/** * Prints the specific plugin fields in the bug-report user interface */ public function printBugReportFields() { echo '<link rel="stylesheet" href="' . SPECMANAGEMENT_PLUGIN_URL . 'files/specmanagement_tooltip.css">'; $specmanagement_database_api = new specmanagement_database_api(); $work_packages = $specmanagement_database_api->get_project_spec_workpackages(); if (substr(MANTIS_VERSION, 0, 4) == '1.2.') { $this->printRow(); echo '<td class="category">'; echo '<label><span>'; echo plugin_lang_get('bug_view_specification_wpg') . '<br />'; $this->print_workpackage_description_field(); echo '</span></label>'; echo '</td>'; echo '<td>'; echo '<span class="input">'; echo '<input type="text" id="work_package" name="work_package" list="work_packages" style="min-width:650px;"/>'; echo '<button type="button" onClick="document.getElementById(\'work_package\').value=\'\';">X</button>'; echo '<datalist id="work_packages">'; if (!empty($work_packages)) { foreach ($work_packages as $existing_work_package) { echo '<option value="' . $existing_work_package . '">'; } } echo '</datalist>'; echo '</span>'; echo '</td>'; echo '</tr>'; $this->printRow(); echo '<td class="category" > '; echo '<label ><span > ' . plugin_lang_get('bug_view_planned_time') . ' ( ' . plugin_lang_get('editor_duration_unit') . ')' . ' </span ></label > '; echo '</td > '; echo '<td > '; echo '<span class="input" > '; echo '<input ' . helper_get_tab_index() . ' type = "text" id = "ptime" name = "ptime" size = "50" maxlength = "50" value = "" />'; echo '</span > '; echo '<span class="label-style" ></span > '; echo '</td > '; echo '</tr > '; } else { echo '<div class="field-container" > '; echo '<label><span >'; echo plugin_lang_get('bug_view_specification_wpg') . '<br />'; $this->print_workpackage_description_field(); echo ' </span ></label > '; echo '<span class="input" > '; echo '<input type = "text" id = "work_package" name = "work_package" list = "work_packages" />'; echo '<button type = "button" onClick = "document.getElementById(\'work_package\').value=\'\';" > X</button > '; echo '<datalist id = "work_packages" > '; if (!empty($work_packages)) { foreach ($work_packages as $existing_work_package) { echo '<option value = "' . $existing_work_package . '" > '; } } echo '</datalist > '; echo '</span > '; echo '<span class="label-style" ></span > '; echo '</div > '; echo '<div class="field-container" > '; echo '<label ><span > ' . plugin_lang_get('bug_view_planned_time') . ' ( ' . plugin_lang_get('editor_duration_unit') . ')' . ' </span ></label > '; echo '<span class="input" > '; echo '<input ' . helper_get_tab_index() . ' type = "text" id = "ptime" name = "ptime" size = "50" maxlength = "50" value = "" />'; echo '</span > '; echo '<span class="label-style" ></span > '; echo '</div > '; } }