[Fusionforge-commits] r9201 - in trunk/gforge/www: forum/include news news/admin pm tracker

Thorsten Glaser mirabilos at libremir.placard.fr.eu.org
Mon Mar 22 09:40:16 CET 2010


Author: mirabilos
Date: 2010-03-22 09:40:16 +0100 (Mon, 22 Mar 2010)
New Revision: 9201

Modified:
   trunk/gforge/www/forum/include/ForumHTML.class.php
   trunk/gforge/www/news/admin/index.php
   trunk/gforge/www/news/submit.php
   trunk/gforge/www/pm/add_task.php
   trunk/gforge/www/pm/mod_task.php
   trunk/gforge/www/tracker/add.php
   trunk/gforge/www/tracker/detail.php
   trunk/gforge/www/tracker/mod-limited.php
   trunk/gforge/www/tracker/mod.php
Log:
?\226?\128?\162 let the notepad popup ECMAscript find its form by id?\226?\128?\153ing them
?\226?\128?\162 fix field naming bug in www/tracker/mod.php where we have two
  notepad ECMAscript thingies in one form, with different names


Modified: trunk/gforge/www/forum/include/ForumHTML.class.php
===================================================================
--- trunk/gforge/www/forum/include/ForumHTML.class.php	2010-03-22 08:29:49 UTC (rev 9200)
+++ trunk/gforge/www/forum/include/ForumHTML.class.php	2010-03-22 08:40:16 UTC (rev 9201)
@@ -482,7 +482,7 @@
 			echo notepad_func();
 			?>
 <div align="center">
-	 <form enctype="multipart/form-data" action="<?php echo util_make_url ('/forum/admin/index.php') ?>" method="post">
+	 <form id="ForumEditForm" enctype="multipart/form-data" action="<?php echo util_make_url ('/forum/admin/index.php') ?>" method="post">
 	<?php $objid = $this->Forum->getID();?>
 	<input type="hidden" name="thread_id" value="<?php echo $thread_id; ?>" />
 	<input type="hidden" name="forum_id" value="<?php echo $objid; ?>" />
@@ -501,7 +501,7 @@
 		<strong><?php echo _('Subject:'); ?></strong><?php echo utils_requiredField(); ?><br />
 				<input type="text" name="subject" value="<?php echo $subject; ?>" size="80" maxlength="80" />
 		<br /><br />
-		<strong><?php echo _('Message:'); ?></strong><?php echo notepad_button('document.forms[2].body') ?><?php echo utils_requiredField(); ?><br />
+		<strong><?php echo _('Message:'); ?></strong><?php echo notepad_button('document.forms.ForumEditForm.body') ?><?php echo utils_requiredField(); ?><br />
 		<?php
 		$GLOBALS['editor_was_set_up']=false;
 		$params = array() ;
@@ -552,7 +552,7 @@
 		echo notepad_func();
 		?>
 <div align="center">
-<form enctype="multipart/form-data" action="<?php echo util_make_url ('/forum/forum.php?forum_id='.$this->Forum->getID().'&amp;group_id='.$group_id); ?>" method="post">
+<form id="ForumPostForm" enctype="multipart/form-data" action="<?php echo util_make_url ('/forum/forum.php?forum_id='.$this->Forum->getID().'&amp;group_id='.$group_id); ?>" method="post">
 	<?php $objid = $this->Forum->getID();?>
 	<input type="hidden" name="post_message" value="y" />
 	<input type="hidden" name="thread_id" value="<?php echo $thread_id; ?>" />
@@ -565,7 +565,7 @@
 		<strong><?php echo _('Subject:'); ?></strong><?php echo utils_requiredField(); ?><br />
 				<input type="text" name="subject" value="<?php echo $subject; ?>" size="80" maxlength="80" />
 			<br /><br />
-		<strong><?php echo _('Message:'); ?></strong><?php echo notepad_button('document.forms[2].body') ?><?php echo utils_requiredField(); ?><br />
+		<strong><?php echo _('Message:'); ?></strong><?php echo notepad_button('document.forms.ForumPostForm.body') ?><?php echo utils_requiredField(); ?><br />
 
 		<?php
 		$GLOBALS['editor_was_set_up']=false;

Modified: trunk/gforge/www/news/admin/index.php
===================================================================
--- trunk/gforge/www/news/admin/index.php	2010-03-22 08:29:49 UTC (rev 9200)
+++ trunk/gforge/www/news/admin/index.php	2010-03-22 08:40:16 UTC (rev 9201)
@@ -117,7 +117,7 @@
 		echo '
 		<h1>'.sprintf(_('Approve a NewsByte For Project: %1$s'), $group->getPublicName()).'</h1>
 		<p />
-		<form action="'.getStringFromServer('PHP_SELF').'" method="post">
+		<form id="newsadminform" action="'.getStringFromServer('PHP_SELF').'" method="post">
 		<input type="hidden" name="group_id" value="'.db_result($result,0,'group_id').'" />
 		<input type="hidden" name="id" value="'.db_result($result,0,'id').'" />';
 
@@ -134,7 +134,7 @@
 
 		<strong>'._('Subject').'</strong><br />
 		<input type="text" name="summary" value="'.db_result($result,0,'summary').'" size="30" maxlength="60" /><br />
-		<strong>'._('Details').'</strong>'.notepad_button('document.forms[2].details').'<br />';
+		<strong>'._('Details').'</strong>'.notepad_button('document.forms.newsadminform.details').'<br />';
 		
 		$GLOBALS['editor_was_set_up']=false;
 		$params = array () ;

Modified: trunk/gforge/www/news/submit.php
===================================================================
--- trunk/gforge/www/news/submit.php	2010-03-22 08:29:49 UTC (rev 9200)
+++ trunk/gforge/www/news/submit.php	2010-03-22 08:40:16 UTC (rev 9201)
@@ -132,7 +132,7 @@
 		<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 . 
 		'
-		<form action="'.getStringFromServer('PHP_SELF').'" method="post">
+		<form id="newssubmitform" action="'.getStringFromServer('PHP_SELF').'" method="post">
 		<input type="hidden" name="group_id" value="'.$group_id.'" />
 		<input type="hidden" name="post_changes" value="y" />
 		<input type="hidden" name="form_key" value="'. form_generate_key() .'" />
@@ -141,7 +141,7 @@
 		<strong>'._('Subject').':</strong>'.utils_requiredField().'<br />
 		<input type="text" name="summary" value="" size="60" maxlength="60" /></p>
 		<p>
-		<strong>'._('Details').':</strong>'.notepad_button('document.forms[2].details').utils_requiredField().'</p>';
+		<strong>'._('Details').':</strong>'.notepad_button('document.forms.newssubmitform.details').utils_requiredField().'</p>';
 	
 	$GLOBALS['editor_was_set_up']=false;
 	$params = array() ;

Modified: trunk/gforge/www/pm/add_task.php
===================================================================
--- trunk/gforge/www/pm/add_task.php	2010-03-22 08:29:49 UTC (rev 9200)
+++ trunk/gforge/www/pm/add_task.php	2010-03-22 08:40:16 UTC (rev 9201)
@@ -24,7 +24,7 @@
 echo notepad_func();
 ?>
 
-<form action="<?php echo getStringFromServer('PHP_SELF')."?group_id=$group_id&amp;group_project_id=$group_project_id"; ?>" method="post">
+<form id="addtaskform" action="<?php echo getStringFromServer('PHP_SELF')."?group_id=$group_id&amp;group_project_id=$group_project_id"; ?>" method="post">
 <input type="hidden" name="func" value="postaddtask" />
 <input type="hidden" name="add_artifact_id[]" value="<?php echo $related_artifact_id; ?>" />
 
@@ -63,7 +63,7 @@
 
 	<tr>
 		<td colspan="2">
-		<strong><?php echo _('Task Details') ?>:</strong><?php echo notepad_button('document.forms[2].details') ?> <?php echo utils_requiredField(); ?><br />
+		<strong><?php echo _('Task Details') ?>:</strong><?php echo notepad_button('document.forms.addtaskform.details') ?> <?php echo utils_requiredField(); ?><br />
 		<textarea name="details" rows="5" cols="80"></textarea></td>
 	</tr>
 

Modified: trunk/gforge/www/pm/mod_task.php
===================================================================
--- trunk/gforge/www/pm/mod_task.php	2010-03-22 08:29:49 UTC (rev 9200)
+++ trunk/gforge/www/pm/mod_task.php	2010-03-22 08:40:16 UTC (rev 9201)
@@ -25,7 +25,7 @@
 
 ?>
 
-<form action="<?php echo getStringFromServer('PHP_SELF')."?group_id=$group_id&amp;group_project_id=$group_project_id"; ?>" method="post">
+<form id="modtaskform" action="<?php echo getStringFromServer('PHP_SELF')."?group_id=$group_id&amp;group_project_id=$group_project_id"; ?>" method="post">
 <input type="hidden" name="func" value="postmodtask" />
 <input type="hidden" name="project_task_id" value="<?php echo $project_task_id; ?>" />
 
@@ -76,7 +76,7 @@
 		<strong><?php echo _('Original Comment') ?>:</strong><br />
 		<?php echo nl2br( $pt->getDetails() ); ?>
 		<p />
-		<strong><?php echo _('Add A Comment') ?>:</strong><?php echo notepad_button('document.forms[2].details') ?><br />
+		<strong><?php echo _('Add A Comment') ?>:</strong><?php echo notepad_button('document.forms.modtaskform.details') ?><br />
 		<textarea name="details" rows="5" cols="80"></textarea>
 		</td>
 	</tr>

Modified: trunk/gforge/www/tracker/add.php
===================================================================
--- trunk/gforge/www/tracker/add.php	2010-03-22 08:29:49 UTC (rev 9200)
+++ trunk/gforge/www/tracker/add.php	2010-03-22 08:40:16 UTC (rev 9201)
@@ -31,7 +31,7 @@
 	echo notepad_func();
 	echo $ath->renderSubmitInstructions();
 
-	echo '<form action="'.getStringFromServer('PHP_SELF').'?group_id='.$group_id.'&amp;atid='.$ath->getID().'" method="post" enctype="multipart/form-data">
+	echo '<form id="trackeraddform" action="'.getStringFromServer('PHP_SELF').'?group_id='.$group_id.'&amp;atid='.$ath->getID().'" method="post" enctype="multipart/form-data">
 	
 	<input type="hidden" name="MAX_FILE_SIZE" value="10000000" />
 	<table>';
@@ -78,7 +78,7 @@
 
 	<tr>
 		<td colspan="2">
-		<strong><?php echo _('Detailed description') ?><?php echo utils_requiredField(); ?>:</strong><?php echo notepad_button('document.forms[2].details') ?><br /> 
+		<strong><?php echo _('Detailed description') ?><?php echo utils_requiredField(); ?>:</strong><?php echo notepad_button('document.forms.trackeraddform.details') ?><br /> 
 		<textarea name="details" rows="20" cols="79"></textarea>
 		</td>
 	</tr>

Modified: trunk/gforge/www/tracker/detail.php
===================================================================
--- trunk/gforge/www/tracker/detail.php	2010-03-22 08:29:49 UTC (rev 9200)
+++ trunk/gforge/www/tracker/detail.php	2010-03-22 08:40:16 UTC (rev 9201)
@@ -18,7 +18,7 @@
 ?>
 	<h1>[#<?php echo $ah->getID(); ?>] <?php echo util_unconvert_htmlspecialchars($ah->getSummary()); ?></h1>
 
-	<form action="<?php echo getStringFromServer('PHP_SELF'); ?>?group_id=<?php echo $group_id; ?>&amp;atid=<?php echo $ath->getID(); ?>" method="post" enctype="multipart/form-data">
+	<form id="trackerdetailform" action="<?php echo getStringFromServer('PHP_SELF'); ?>?group_id=<?php echo $group_id; ?>&amp;atid=<?php echo $ath->getID(); ?>" method="post" enctype="multipart/form-data">
 
 <?php if (session_loggedin()) { ?>
 	<table cellpadding="0" width="100%">
@@ -94,7 +94,7 @@
 			<input type="hidden" name="artifact_id" value="<?php echo $ah->getID(); ?>" />
 			<p>
 			<strong><?php echo _('Add A Comment') ?>:</strong> 
-			<?php echo notepad_button('document.forms[2].details') ?><br />
+			<?php echo notepad_button('document.forms.trackerdetailform.details') ?><br />
 			<textarea name="details" rows="10" cols="60"></textarea>
 			</p>
 			<?php } ?>

Modified: trunk/gforge/www/tracker/mod-limited.php
===================================================================
--- trunk/gforge/www/tracker/mod-limited.php	2010-03-22 08:29:49 UTC (rev 9200)
+++ trunk/gforge/www/tracker/mod-limited.php	2010-03-22 08:40:16 UTC (rev 9201)
@@ -19,7 +19,7 @@
 ?>
 	<h1>[#<?php echo $ah->getID(); ?>] <?php echo $ah->getSummary(); ?></h1>
 
-	<form action="<?php echo getStringFromServer('PHP_SELF'); ?>?group_id=<?php echo $group_id; ?>&amp;atid=<?php echo $ath->getID(); ?>" enctype="multipart/form-data" method="post">
+	<form id="trackermodlimitedform" action="<?php echo getStringFromServer('PHP_SELF'); ?>?group_id=<?php echo $group_id; ?>&amp;atid=<?php echo $ath->getID(); ?>" enctype="multipart/form-data" method="post">
 	<input type="hidden" name="form_key" value="<?php echo form_generate_key(); ?>" />
 	<input type="hidden" name="func" value="postmod" />
 	<input type="hidden" name="MAX_FILE_SIZE" value="10000000" />
@@ -135,7 +135,7 @@
 <div class="tabbertab" title="<?php echo _('Followups');?>">
 <table border="0" width="80%">
 	<tr><td colspan="2">
-		<br /><strong><?php echo _('OR Attach A Comment') ?>: <?php echo notepad_button('document.forms[2].details') ?> <a href="javascript:help_window('<?php echo util_make_url ('/help/tracker.php?helpname=comment'); ?>')"><strong>(?)</strong></a></strong><br />
+		<br /><strong><?php echo _('OR Attach A Comment') ?>: <?php echo notepad_button('document.forms.trackermodlimitedform.details') ?> <a href="javascript:help_window('<?php echo util_make_url ('/help/tracker.php?helpname=comment'); ?>')"><strong>(?)</strong></a></strong><br />
 		<textarea name="details" rows="7" cols="60"></textarea>
 		<p>
 		<h2><?php echo _('Followup') ?>:</h2>

Modified: trunk/gforge/www/tracker/mod.php
===================================================================
--- trunk/gforge/www/tracker/mod.php	2010-03-22 08:29:49 UTC (rev 9200)
+++ trunk/gforge/www/tracker/mod.php	2010-03-22 08:40:16 UTC (rev 9201)
@@ -18,7 +18,7 @@
 ?>
 	<h1>[#<?php echo $ah->getID(); ?>] <?php echo $ah->getSummary(); ?></h1>
 
-	<form action="<?php echo getStringFromServer('PHP_SELF'); ?>?group_id=<?php echo $group_id; ?>&amp;atid=<?php echo $ath->getID(); ?>"  enctype="multipart/form-data" method="post">
+	<form id="trackermodform" action="<?php echo getStringFromServer('PHP_SELF'); ?>?group_id=<?php echo $group_id; ?>&amp;atid=<?php echo $ath->getID(); ?>"  enctype="multipart/form-data" method="post">
 	<input type="hidden" name="form_key" value="<?php echo form_generate_key(); ?>"/>
 	<input type="hidden" name="func" value="postmod"/>
 	<input type="hidden" name="MAX_FILE_SIZE" value="10000000" />
@@ -171,7 +171,7 @@
 	</tr>
 	<tr><td colspan="2">
 		<div id="edit" style="display:none;">
-		<strong><?php echo _('Detailed description') ?><?php echo utils_requiredField(); ?>: <?php echo notepad_button('document.forms[2].details') ?> <a href="javascript:help_window('/help/tracker.php?helpname=description')">(?)</a></strong>
+		<strong><?php echo _('Detailed description') ?><?php echo utils_requiredField(); ?>: <?php echo notepad_button('document.forms.trackermodform.description') ?> <a href="javascript:help_window('/help/tracker.php?helpname=description')">(?)</a></strong>
 		<br />
 		<textarea name="description" rows="30" cols="79"><?php echo $ah->getDetails(); ?></textarea>
 		</div>
@@ -193,7 +193,7 @@
 		echo '&nbsp;'.util_make_link ('/tracker/admin/?group_id='.$group_id.'&amp;atid='. $ath->getID() .'&amp;add_canned=1','('._('Admin').')');
 		?>
 		<p>
-		<strong><?php echo _('OR Attach A Comment') ?>:<?php echo notepad_button('document.forms[2].details') ?><a href="javascript:help_window('<?php echo util_make_url ('/help/tracker.php?helpname=comment'); ?>')"><strong>(?)</strong></a></strong><br />
+		<strong><?php echo _('OR Attach A Comment') ?>:<?php echo notepad_button('document.forms.trackermodform.details') ?><a href="javascript:help_window('<?php echo util_make_url ('/help/tracker.php?helpname=comment'); ?>')"><strong>(?)</strong></a></strong><br />
 		<textarea name="details" rows="7" cols="60"></textarea></p>
 		<h2><?php echo _('Followup') ?>:</h2>
 		<?php




More information about the Fusionforge-commits mailing list