@@ -28,24 +28,13 @@ static function canView()
2828
2929
3030 /**
31- * Function to show form for configurate the plugin Mantis
31+ * Function to show form to configure the plugin MantisBT
3232 */
3333 function showConfigForm ()
34- {
35- $ this ->showConfigWS ();
36- }
37-
38-
39- /**
40- * Function to display form to configure
41- * connection to WS MantisBT
42- */
43- function showConfigWS ()
4434 {
4535 //we recover the first and only record
4636 $ this ->getFromDB (1 );
4737
48- //we built the target
4938 $ target = $ this ->getFormURL ();
5039 if (isset ($ options ['target ' ])) {
5140 $ target = $ options ['target ' ];
@@ -62,25 +51,30 @@ function showConfigWS()
6251
6352 $ content .= "<tr class='tab_bg_1'> " ;
6453 $ content .= "<td> " . __ ("MantisBT server IP " , "mantis " ) . "</td> " ;
65- $ content .= "<td><input id='host' type='text' onblur='testIP();' value=' " . $ this ->fields ["host " ] . "'/></td> " ;
54+ $ content .= "<td><input id='host' name='host' type='text' onblur='testIP();' value=' " .
55+ $ this ->fields ["host " ] . "'/></td> " ;
6656 $ content .= "<td>ex: 128.65.25.74</td> " ;
6757 $ content .= "</tr> " ;
6858
6959 $ content .= "<tr class='tab_bg_1'> " ;
7060 $ content .= "<td> " . __ ("Wsdl file path " , "mantis " ) . "</td> " ;
71- $ content .= "<td><input id='url' type='text' value=' " . $ this ->fields ["url " ] . "'/></td> " ;
61+ $ content .= "<td><input id='url' name='url' type='text' value=' " . $ this ->fields ["url " ] .
62+ "'/></td> " ;
7263 $ content .= "<td>ex: mantis/api/soap/mantisconnect.php?wsdl</td> " ;
7364 $ content .= "</tr> " ;
7465
7566 $ content .= "<tr class='tab_bg_1'> " ;
7667 $ content .= "<td> " . __ ("MantisBT user login " , "mantis " ) . "</td> " ;
77- $ content .= "<td><input id='login' type='text' value=' " . $ this ->fields ["login " ] . "'/></td> " ;
68+ $ content .= "<td><input id='login' name='login' type='text' value=' " .
69+ $ this ->fields ["login " ] .
70+ "'/></td> " ;
7871 $ content .= "<td></td> " ;
7972 $ content .= "</tr> " ;
8073
8174 $ content .= "<tr class='tab_bg_1'> " ;
8275 $ content .= "<td> " . __ ("MantisBT user password " , "mantis " ) . "</td> " ;
83- $ content .= "<td><input id='pwd' type='password' value=' " . $ this ->fields ["pwd " ] . "'/></td> " ;
76+ $ content .= "<td><input id='pwd' name='pwd' type='password' value=' " .
77+ $ this ->fields ["pwd " ] . "'/></td> " ;
8478 $ content .= "<td></td> " ;
8579 $ content .= "</tr> " ;
8680
@@ -94,7 +88,9 @@ function showConfigWS()
9488 $ content .= "</tr> " ;
9589
9690 $ content .= "<tr class='tab_bg_1'> " ;
97- $ content .= "<td> " . __ ("MantisBT field for GLPI fields</br>(title, description, category, follow-up, tasks) " , "mantis " ) . "</td> " ;
91+ $ content .= "<td> " .
92+ __ ("MantisBT field for GLPI fields<br/> (title, description, category, follow-up, tasks) " ,
93+ "mantis " ) . "</td> " ;
9894 $ content .= "<td> " ;
9995 $ content .= DropDown::showFromArray ('champsGlpi ' , PluginMantisIssue::$ champsMantis ,
10096 array ('value ' => $ this ->fields ["champsGlpi " ], 'display ' => false ));
@@ -104,16 +100,20 @@ function showConfigWS()
104100
105101 $ content .= "<tr class='tab_bg_1'> " ;
106102 $ content .= "<td><input type='hidden' name='id' value='1' class='submit'> " ;
107- $ content .= "<input id='update' type='submit' name='update' value=' " . __ ("Update " , "mantis " ) . "' class='submit'></td> " ;
108- $ content .= "<td><input id='test' onclick='testConnexionMantisWS();' value=' " . __ ("Test the connection " , "mantis " ) . "' class='submit'></td> " ;
103+ $ content .= "<input id='update' type='submit' name='update' value=' " . __ ("Update " , "mantis " ) .
104+ "' class='submit'></td> " ;
105+ $ content .= "<td><input id='test' onclick='testConnexionMantisWS();' value=' "
106+ . __ ("Test the connection " , "mantis " ) . "' class='submit'></td> " ;
109107 $ content .= "<td><div id='infoAjax'/></td> " ;
110108 $ content .= "</tr> " ;
111109
112110 $ content .= "</table> " ;
113111 $ content .= Html::closeForm (false );
114112
115113 echo $ content ;
116-
117114 }
118115
116+
117+
118+
119119}
0 commit comments