[Fusionforge-commits] r11310 - in trunk/src/www: include news

Alain Peyrat aljeux at libremir.placard.fr.eu.org
Tue Nov 2 11:59:55 CET 2010


Author: aljeux
Date: 2010-11-02 11:59:55 +0100 (Tue, 02 Nov 2010)
New Revision: 11310

Modified:
   trunk/src/www/include/html.php
   trunk/src/www/news/submit.php
Log:
Add tipsy tooltip in submit news.

Modified: trunk/src/www/include/html.php
===================================================================
--- trunk/src/www/include/html.php	2010-11-02 10:59:49 UTC (rev 11309)
+++ trunk/src/www/include/html.php	2010-11-02 10:59:55 UTC (rev 11310)
@@ -342,11 +342,13 @@
 			return( _('Comment'));
 		case 'description':
 			return( htmlentities(_('Enter the complete description.').'<br/><br/>'.
-			_("<div align=\"left\"><b>Editing tips:</b><br/><strong>http,https or ftp</strong>: Hyperlinks.<br/><strong>[#NNN]</strong>: Tracker id NNN.<br/><strong>[TNNN]</strong>: Task id NNN.<br/><strong>[wiki:&lt;pagename&gt;]</strong>: Wiki page.<br/><strong>[forum:&lt;msg_id&gt;]</strong>: Forum post.</div>")));
+			_("<div align=\"left\"><b>Editing tips:</b><br/><strong>http,https or ftp</strong>: Hyperlinks.<br/><strong>[#NNN]</strong>: Tracker id NNN.<br/><strong>[TNNN]</strong>: Task id NNN.<br/><strong>[wiki:&lt;pagename&gt;]</strong>: Wiki page.<br/><strong>[forum:&lt;msg_id&gt;]</strong>: Forum post.</div>"),
+				ENT_COMPAT, 'UTF-8'));
 		case 'attach_file':
 			return( _('When you wish to attach a file to a tracker item you must check this checkbox before submitting changes.'));
 		case 'monitor':
-			return( htmlentities(_('You can monitor or un-monitor this item by clicking the "Monitor" button. <br /><br /><strong>Note!</strong> this will send you additional email. If you add comments to this item, or submitted, or are assigned this item, you will also get emails for those reasons as well!')));
+			return( htmlentities(_('You can monitor or un-monitor this item by clicking the "Monitor" button. <br /><br /><strong>Note!</strong> this will send you additional email. If you add comments to this item, or submitted, or are assigned this item, you will also get emails for those reasons as well!'),
+				ENT_COMPAT, 'UTF-8'));
 		default:
 			return('');
 	}
@@ -390,8 +392,17 @@
 	}
 
 	$title = html_get_tooltip_description($select_name);
+	$id = '';
+	if ($title) {
+		$id = ' id="tracker-'.$select_name.'"';
+		if (preg_match('/\[\]/', $id)) {
+			$id = '';
+		}
+	}
+
+	$title = html_get_tooltip_description($select_name);
 	$return .= '
-		<select id="tracker-'.$select_name.'" name="'.$select_name.'" title="'.$title.'">';
+		<select'.$id.' name="'.$select_name.'" title="'.$title.'">';
 
 	//we don't always want the default Any row shown
 	if ($show_any) {

Modified: trunk/src/www/news/submit.php
===================================================================
--- trunk/src/www/news/submit.php	2010-11-02 10:59:49 UTC (rev 11309)
+++ trunk/src/www/news/submit.php	2010-11-02 10:59:55 UTC (rev 11310)
@@ -111,13 +111,13 @@
  VALUES ($1, $2, $3, $4, $5, $6, $7)';
 				$result=db_query_params($sql,
 					array($group_id, user_getid(), 0, time(), $new_id, htmlspecialchars($summary), $details));
-	   			if (!$result) {
+				if (!$result) {
 					db_rollback();
 					form_release_key(getStringFromRequest('form_key'));
-	   				$error_msg = _('ERROR doing insert');
-	   			} else {
+					$error_msg = _('ERROR doing insert');
+				} else {
 					db_commit();
-	   				$feedback = _('News Added.');
+					$feedback = _('News Added.');
 	   			}
 		} else {
 			form_release_key(getStringFromRequest('form_key'));
@@ -130,14 +130,17 @@
 	if (!$group_id) {
 		exit_no_group();
 	}
+
+	html_use_tooltips();
+
 	/*
 		Show the submit form
 	*/
-	news_header(array('title'=>_('Submit News')));
-	echo '<h1>' . _('Submit News') . '</h1>';
+	$group = group_get_object($group_id);
+	news_header(array('title'=>_('Submit News for Project: ').' '.$group->getPublicName()));
 
 	$jsfunc = notepad_func();
-	$group = group_get_object($group_id);
+
 	echo '
 		<p>
 		'. sprintf(_('You can post news about your project if you are an admin on your project. You may also post "help wanted" notes if your project needs help.</p><p>All posts <b>for your project</b> will appear instantly on your project summary page. Posts that are of special interest to the community will have to be approved by a member of the %1$s news team before they will appear on the %1$s home page.</p><p>You may include URLs, but not HTML in your submissions.</p><p>URLs that start with http:// are made clickable.'), forge_get_config ('forge_name')) .'</p>' . $jsfunc . 




More information about the Fusionforge-commits mailing list