[Fusionforge-commits] r12387 - in trunk/src/plugins/mantisbt: common view www

Franck VILLAUME nerville at fusionforge.org
Sat Feb 26 11:13:18 CET 2011


Author: nerville
Date: 2011-02-26 11:13:17 +0100 (Sat, 26 Feb 2011)
New Revision: 12387

Modified:
   trunk/src/plugins/mantisbt/common/MantisBTPlugin.class.php
   trunk/src/plugins/mantisbt/view/init.php
   trunk/src/plugins/mantisbt/www/index.php
Log:
init use_tooltips

Modified: trunk/src/plugins/mantisbt/common/MantisBTPlugin.class.php
===================================================================
--- trunk/src/plugins/mantisbt/common/MantisBTPlugin.class.php	2011-02-26 10:11:17 UTC (rev 12386)
+++ trunk/src/plugins/mantisbt/common/MantisBTPlugin.class.php	2011-02-26 10:13:17 UTC (rev 12387)
@@ -504,6 +504,7 @@
 
 	function getHeader($type) {
 		$params['toptab'] = $this->name;
+		html_use_tooltips();
 		switch ($type) {
 			case 'project': {
 				global $group_id;
@@ -524,7 +525,7 @@
 				break;
 			}
 		}
-		html_use_tooltips();
+
 	}
 
 	function initialize($group_id, $confArr) {

Modified: trunk/src/plugins/mantisbt/view/init.php
===================================================================
--- trunk/src/plugins/mantisbt/view/init.php	2011-02-26 10:11:17 UTC (rev 12386)
+++ trunk/src/plugins/mantisbt/view/init.php	2011-02-26 10:13:17 UTC (rev 12387)
@@ -41,13 +41,34 @@
 
 echo '<form method="POST" Action="?type='.$type.'&group_id='.$group_id.'&pluginname='.$mantisbt->name.'&action=init" >';
 echo '<table>';
-echo '<tr><td><label title="'._('Specify the Full URL of the MantisBT Web Server.').'" >URL</label></td><td><input type="text" size="50" maxlength="255" name="url" /></td></tr>';
-echo '<tr><td><label title="'._('Specify the user with admin right to be used thru SOAP API.').'">SOAP User</label></td><td><input type="text" size="50" maxlength="255" name="soap_user" /></td></tr>';
-echo '<tr><td><label title="'._('Specify the password of this user.').'">SOAP Password</label></td><td><input type="text" size="50" maxlength="255" name="soap_password" /></td></tr>';
-echo '<tr><td><label title="'._('If this project does NOT exist in MantisBT, do you want to create it ?').'" >Create the project in MantisBT</label></td><td><input id="mantisbtcreate" type="checkbox" name="mantisbtcreate" onclick="javascript:doMantisBTName()" value="1" ></td></tr>';
-echo '<tr><td><label title="'._('Specify the name of the project in MantisBT if already created in MantisBT').'" >Name of the project in MantisBT</label></td><td><input id="mantisbtname" type="text" size="50" maxlength="255" name="mantisbtname" /></td></tr>';
-echo '<tr><td><label title="'._('Do you want to sync FusionForge -> MantisBT users ?').'">Sync Users</label></td><td><input disabled="disabled" type="checkbox" name="sync_user" /></td></tr>';
-echo '<tr><td><label title="'._('Do you want to sync FusionForge -> MantisBT roles ?').'">Sync Roles</label></td><td><input disabled="disabled" type="checkbox" name="sync_roles" /></td></tr>';
+echo '<tr><td><label ';
+if ($use_tooltips)
+	echo 'title="'._('Specify the Full URL of the MantisBT Web Server.').'"';
+echo ' >URL</label></td><td><input type="text" size="50" maxlength="255" name="url" /></td></tr>';
+echo '<tr><td><label ';
+if ($use_tooltips)
+	echo 'title="'._('Specify the user with admin right to be used thru SOAP API.').'"';
+echo ' >SOAP User</label></td><td><input type="text" size="50" maxlength="255" name="soap_user" /></td></tr>';
+echo '<tr><td><label ';
+if ($use_tooltips)
+	echo 'title="'._('Specify the password of this user.').'"';
+echo ' >SOAP Password</label></td><td><input type="text" size="50" maxlength="255" name="soap_password" /></td></tr>';
+echo '<tr><td><label ';
+if ($use_tooltips)
+	echo 'title="'._('If this project does NOT exist in MantisBT, do you want to create it ?').'"';
+echo ' >Create the project in MantisBT</label></td><td><input id="mantisbtcreate" type="checkbox" name="mantisbtcreate" onclick="javascript:doMantisBTName()" value="1" ></td></tr>';
+echo '<tr><td><label ';
+if ($use_tooltips)
+	echo 'title="'._('Specify the name of the project in MantisBT if already created in MantisBT').'"';
+echo ' >Name of the project in MantisBT</label></td><td><input id="mantisbtname" type="text" size="50" maxlength="255" name="mantisbtname" /></td></tr>';
+echo '<tr><td><label ';
+if ($use_tooltips)
+	echo 'title="'._('Do you want to sync FusionForge -> MantisBT users ?').'"';
+echo ' >Sync Users</label></td><td><input disabled="disabled" type="checkbox" name="sync_user" /></td></tr>';
+echo '<tr><td><label ';
+if ($use_tooltips)
+	echo 'title="'._('Do you want to sync FusionForge -> MantisBT roles ?').'"';
+echo ' >Sync Roles</label></td><td><input disabled="disabled" type="checkbox" name="sync_roles" /></td></tr>';
 echo '</table>';
 echo '<input type="submit" value="'._('Initialize').'" />';
 echo '</form>';

Modified: trunk/src/plugins/mantisbt/www/index.php
===================================================================
--- trunk/src/plugins/mantisbt/www/index.php	2011-02-26 10:11:17 UTC (rev 12386)
+++ trunk/src/plugins/mantisbt/www/index.php	2011-02-26 10:13:17 UTC (rev 12387)
@@ -44,6 +44,12 @@
 
 $type = getStringFromRequest('type');
 $group_id = getIntFromRequest('group_id');
+if (!$type) {
+	exit_missing_params($_SERVER['HTTP_REFERER'], array('No TYPE specified'), 'mantisbt');
+} elseif (!$group_id) {
+	exit_missing_params($_SERVER['HTTP_REFERER'], array('No GROUP_ID specified'), 'mantisbt');
+}
+
 $user_id = getIntFromRequest('user_id');
 $feedback = htmlspecialchars(getStringFromRequest('feedback'));
 $error_msg = htmlspecialchars(getStringFromRequest('error_msg'));
@@ -51,12 +57,7 @@
 $action = getStringFromRequest('action');
 $view = getStringFromRequest('view');
 
-if (!$type) {
-	exit_missing_params($_SERVER['HTTP_REFERER'], array('No TYPE specified'), 'mantisbt');
-} elseif (!$group_id) {
-	exit_missing_params($_SERVER['HTTP_REFERER'], array('No GROUP_ID specified'), 'mantisbt');
-}
-
+$use_tooltips = $user->usesTooltips();
 $mantisbt = plugin_get_object('mantisbt');
 
 switch ($type) {
@@ -76,7 +77,6 @@
 
 		$mantisbtConf = $mantisbt->getMantisBTConf($group_id);
 
-
 		if ($mantisbtConf['id_mantisbt'] === 0) {
 			$warning_msg = _('The mantisbt plugin for this project is not initialized.');
 			session_redirect('/plugins/'.$mantisbt->name.'/?type=admin&group_id='.$group_id.'&pluginname='.$mantisbt->name.'&view=init&warning_msg='.urlencode($warning_msg));




More information about the Fusionforge-commits mailing list