5 * Copyright 2010-2011, Franck Villaume - Capgemini
6 * Copyright 2010, Antoine Mercadal - Capgemini
7 * http://fusionforge.org
9 * This file is part of FusionForge. FusionForge is free software;
10 * you can redistribute it and/or modify it under the terms of the
11 * GNU General Public License as published by the Free Software
12 * Foundation; either version 2 of the Licence, or (at your option)
15 * FusionForge is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
20 * You should have received a copy of the GNU General Public License along
21 * with FusionForge; if not, write to the Free Software Foundation, Inc.,
22 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
32 /* do not recreate $clientSOAP object if already created by other pages */
33 if (!isset($clientSOAP))
34 $clientSOAP = new SoapClient($mantisbtConf['url']."/api/soap/mantisconnect.php?wsdl", array('trace'=>true, 'exceptions'=>true));
36 $defect = $clientSOAP->__soapCall('mc_issue_get', array("username" => $username, "password" => $password, "issue_id" => $idBug));
37 if ($view == "editNote"){
38 foreach($defect->notes as $key => $note){
39 if ($note->id == $idNote){
45 } catch (SoapFault $soapFault) {
46 echo '<div class="warning" >'. _('Technical error occurs during data retrieving:'). ' ' .$soapFault->faultstring.'</div>';
50 if (!isset($errorPage)){
51 if($view == "editNote"){
52 $labelboxTitle = _('Modify note');
53 $actionform = 'updateNote';
54 $labelButtonSubmit = _('Update');
56 $labelboxTitle = _('Add note');
57 $actionform = 'addNote';
58 $labelButtonSubmit = _('Submit');
61 echo '<div id="add_edit_note">';
62 echo '<form Method="POST" Action="?type='.$type.'&group_id='.$group_id.'&pluginname='.$mantisbt->name.'&idBug='.$defect->id.'&idNote='.$idNote.'&action='.$actionform.'&view=viewIssue">';
65 (isset($noteEdit->text))? $note_value = $noteEdit->text : $note_value = '';
66 echo '<td><textarea name="edit_texte_note" style="width:99%;" rows=12>'.$note_value.'</textarea></td>';
69 echo '<input type=button onclick="this.form.submit();this.disabled=true;" value="'.$labelButtonSubmit.'">';