[Fusionforge-commits] FusionForge branch master updated. a7af1dd2853ee5b53fdd540d17a8df18e856cef6

Franck Villaume nerville at fusionforge.org
Thu Apr 3 19:00:29 CEST 2014


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "FusionForge".

The branch, master has been updated
       via  a7af1dd2853ee5b53fdd540d17a8df18e856cef6 (commit)
       via  7e1c801c453eee8b877444ebd0c66603fa9c8648 (commit)
       via  3f896de745b6fbe5003369f05a774ad1d562fadc (commit)
      from  b1af151d9955d588a2dd72efdd9ffc5e13fbf577 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit a7af1dd2853ee5b53fdd540d17a8df18e856cef6
Author: Franck Villaume <franck.villaume at trivialdev.com>
Date:   Thu Apr 3 18:57:23 2014 +0200

    more HTML helpers

diff --git a/src/plugins/hudson/include/hudsonPlugin.class.php b/src/plugins/hudson/include/hudsonPlugin.class.php
index 672530c..2fb33f5 100644
--- a/src/plugins/hudson/include/hudsonPlugin.class.php
+++ b/src/plugins/hudson/include/hudsonPlugin.class.php
@@ -289,9 +289,9 @@ class hudsonPlugin extends Plugin {
 						$html .= '  <td>';
 						$html .= '   <ul>';
 						if ($job->hasBuilds()) {
-							$html .= ' <li>'._("Last Build:").' <a href="/plugins/hudson/?action=view_build&group_id='.$group_id.'&job_id='.$job_id.'&build_id='.$job->getLastBuildNumber().'"># '.$job->getLastBuildNumber().'</a></li>';
-							$html .= ' <li>'._("Last Success")._(": ").'<a href="/plugins/hudson/?action=view_build&group_id='.$group_id.'&job_id='.$job_id.'&build_id='.$job->getLastSuccessfulBuildNumber().'"># '.$job->getLastSuccessfulBuildNumber().'</a></li>';
-							$html .= ' <li>'._("Last Failure")._(": ").'<a href="/plugins/hudson/?action=view_build&group_id='.$group_id.'&job_id='.$job_id.'&build_id='.$job->getLastFailedBuildNumber().'"># '.$job->getLastFailedBuildNumber().'</a></li>';
+							$html .= ' <li>'._("Last Build:").util_make_link('/plugins/hudson/?action=view_build&group_id='.$group_id.'&job_id='.$job_id.'&build_id='.$job->getLastBuildNumber(), '# '.$job->getLastBuildNumber()).'</li>';
+							$html .= ' <li>'._("Last Success")._(": ").util_make_link('/plugins/hudson/?action=view_build&group_id='.$group_id.'&job_id='.$job_id.'&build_id='.$job->getLastSuccessfulBuildNumber(), '# '.$job->getLastSuccessfulBuildNumber()).'</li>';
+							$html .= ' <li>'._("Last Failure")._(": ").util_make_link('/plugins/hudson/?action=view_build&group_id='.$group_id.'&job_id='.$job_id.'&build_id='.$job->getLastFailedBuildNumber(), '# '.$job->getLastFailedBuildNumber()).'</li>';
 						} else {
 							$html .= ' <li>'. _("No build found for this job.") . '</li>';
 						}
diff --git a/src/plugins/hudson/include/hudson_Widget_JobLastBuilds.class.php b/src/plugins/hudson/include/hudson_Widget_JobLastBuilds.class.php
index bbd1a41..a86b39a 100644
--- a/src/plugins/hudson/include/hudson_Widget_JobLastBuilds.class.php
+++ b/src/plugins/hudson/include/hudson_Widget_JobLastBuilds.class.php
@@ -79,9 +79,9 @@ class hudson_Widget_JobLastBuilds extends HudsonJobWidget {
 			$html .= '  <td>';
 			$html .= '   <ul>';
 			if ($job->hasBuilds()) {
-				$html .= ' <li>'._("Last Build:").' <a href="/plugins/hudson/?action=view_build&group_id='.$this->group_id.'&job_id='.$this->job_id.'&build_id='.$job->getLastBuildNumber().'"># '.$job->getLastBuildNumber().'</a></li>';
-				$html .= ' <li>'._("Last Success")._(": ").'<a href="/plugins/hudson/?action=view_build&group_id='.$this->group_id.'&job_id='.$this->job_id.'&build_id='.$job->getLastSuccessfulBuildNumber().'"># '.$job->getLastSuccessfulBuildNumber().'</a></li>';
-				$html .= ' <li>'._("Last Failure")._(": ").'<a href="/plugins/hudson/?action=view_build&group_id='.$this->group_id.'&job_id='.$this->job_id.'&build_id='.$job->getLastFailedBuildNumber().'"># '.$job->getLastFailedBuildNumber().'</a></li>';
+				$html .= ' <li>'._("Last Build")._(": ").util_make_link('/plugins/hudson/?action=view_build&group_id='.$this->group_id.'&job_id='.$this->job_id.'&build_id='.$job->getLastBuildNumber(), '# '.$job->getLastBuildNumber()).'</li>';
+				$html .= ' <li>'._("Last Success")._(": ").util_make_link('/plugins/hudson/?action=view_build&group_id='.$this->group_id.'&job_id='.$this->job_id.'&build_id='.$job->getLastSuccessfulBuildNumber(), '# '.$job->getLastSuccessfulBuildNumber()).'</li>';
+				$html .= ' <li>'._("Last Failure")._(": ").util_make_link('/plugins/hudson/?action=view_build&group_id='.$this->group_id.'&job_id='.$this->job_id.'&build_id='.$job->getLastFailedBuildNumber(), '# '.$job->getLastFailedBuildNumber()).'</li>';
 			} else {
 				$html .= ' <li>'. _("No build found for this job.") . '</li>';
 			}

commit 7e1c801c453eee8b877444ebd0c66603fa9c8648
Author: Franck Villaume <franck.villaume at trivialdev.com>
Date:   Thu Apr 3 16:00:29 2014 +0200

    more HTML helpers

diff --git a/src/plugins/scmhook/common/scmhookPlugin.class.php b/src/plugins/scmhook/common/scmhookPlugin.class.php
index 1c3c53e..6208a25 100644
--- a/src/plugins/scmhook/common/scmhookPlugin.class.php
+++ b/src/plugins/scmhook/common/scmhookPlugin.class.php
@@ -280,14 +280,14 @@ class scmhookPlugin extends Plugin {
 			}
 		}
 		if (count($hooksPreCommit)) {
-			echo '<h3>'._('pre-commit Hooks').'</h3>';
+			echo html_e('h3', array(), _('pre-commit Hooks'), false);
 			$tabletop = array('', _('Hook Name'), _('Description'));
 			$classth = array('unsortable', '', '');
 			echo $HTML->listTableTop($tabletop, false, 'sortable_scmhook_precommit', 'sortable', $classth);
 			foreach ($hooksPreCommit as $hookPreCommit) {
 				$isdisabled = 0;
 				if (! empty($hookPreCommit->onlyGlobalAdmin) && ! Permission::isGlobalAdmin()) {
-					echo '<tr style="display: none;" ><td>';
+					echo '<tr class="hide" ><td>';
 				}
 				else {
 					echo '<tr><td>';
@@ -323,14 +323,14 @@ class scmhookPlugin extends Plugin {
 			echo $HTML->listTableBottom();
 		}
 		if (count($hooksPreRevPropChange)) {
-			echo '<h3>'._('pre-revprop-change Hooks').'</h3>';
+			echo html_e('h3', array(), _('pre-revprop-change Hooks'), false);
 			$tabletop = array('', _('Hook Name'), _('Description'));
 			$classth = array('unsortable', '', '');
 			echo $HTML->listTableTop($tabletop, false, 'sortable_scmhook_precommit', 'sortable', $classth);
 			foreach ($hooksPreRevPropChange as $hook) {
 				$isdisabled = 0;
 				if (! empty($hook->onlyGlobalAdmin) && ! Permission::isGlobalAdmin()) {
-					echo '<tr style="display: none;" ><td>';
+					echo '<tr class="hide;" ><td>';
 				}
 				else {
 					echo '<tr><td>';
@@ -373,7 +373,7 @@ class scmhookPlugin extends Plugin {
 			foreach ($hooksPostCommit as $hookPostCommit) {
 				$isdisabled = 0;
 				if (! empty($hookPostCommit->onlyGlobalAdmin) && ! Permission::isGlobalAdmin()) {
-					echo '<tr style="display: none;" ><td>';
+					echo '<tr class="hide" ><td>';
 				}
 				else {
 					echo '<tr><td>';
@@ -427,14 +427,14 @@ class scmhookPlugin extends Plugin {
 			}
 		}
 		if (count($hooksServePushPullBundle)) {
-			echo '<h3>'._('serve-push-pull-bundle Hooks').'</h3>';
+			echo html_e('h3', array(), _('serve-push-pull-bundle Hooks'), false);
 			$tabletop = array('', _('Hook Name'), _('Description'));
 			$classth = array('unsortable', '', '');
 			echo $HTML->listTableTop($tabletop, false, 'sortable_scmhook_serve-push-pull-bundle', 'sortable', $classth);
 			foreach ($hooksServePushPullBundle as $hookServePushPullBundle) {
 				$isdisabled = 0;
 				if (! empty($hookServePushPullBundle->onlyGlobalAdmin) && ! Permission::isGlobalAdmin()) {
-					echo '<tr style="display: none;" ><td>';
+					echo '<tr class="hide" ><td>';
 				}
 				else {
 					echo '<tr><td>';
@@ -488,14 +488,14 @@ class scmhookPlugin extends Plugin {
 			}
 		}
 		if (count($hooksPostReceive)) {
-			echo '<h3>'._('post-receive Hooks').'</h3>';
+			echo hml_e('h3', array(), _('post-receive Hooks'), false);
 			$tabletop = array('', _('Hook Name'), _('Description'));
 			$classth = array('unsortable', '', '');
 			echo $HTML->listTableTop($tabletop, false, 'sortable_scmhook_post-receive', 'sortable', $classth);
 			foreach ($hooksPostReceive as $hookPostReceive) {
 				$isdisabled = 0;
 				if (! empty($hookPostReceive->onlyGlobalAdmin) && ! Permission::isGlobalAdmin()) {
-					echo '<tr style="display: none;" ><td>';
+					echo '<tr class="hide" ><td>';
 				}
 				else {
 					echo '<tr><td>';
diff --git a/src/plugins/scmhook/library/scmgit/commitTracker.class.php b/src/plugins/scmhook/library/scmgit/commitTracker.class.php
index 7642127..0544b95 100644
--- a/src/plugins/scmhook/library/scmgit/commitTracker.class.php
+++ b/src/plugins/scmhook/library/scmgit/commitTracker.class.php
@@ -100,29 +100,21 @@ class commitTracker extends scmhook {
 
 		if ($Rows > 0) {
 			echo '<tr><td>';
-			echo '<h2>'._('Related Git commits').'</h2>';
+			echo html_e('h2', array(), _('Related Git commits'), false);
 
 			$title_arr = $this->getTitleArr($group_id);
 			echo $HTML->listTableTop($title_arr);
 
 			for ($i=0; $i<$Rows; $i++) {
 				$Row = db_fetch_array($DBResult);
-				echo '<tr '. $HTML->boxGetAltRowStyle($i) .'>'.
-				'<td>'. $this->getFileLink($group->getUnixName(),
-						$Row['file'],$Row['actual_version']). '</td>'.
-				'<td>'. date(_('Y-m-d'), $Row['git_date']).'</td>'.
-				'<td>'. $this->getDiffLink($group->getUnixName(),
-						$Row['file'],
-						$Row['prev_version'],
-						$Row['actual_version']).'</td>'.
-				'<td>'. $this->getActualVersionLink($group->getUnixName(),
-					$Row['file'], $Row['actual_version']).
-				'</td>
-				<td>'. htmlspecialchars($Row['log_text']).'</td>
-				<td>'. util_make_link_u($Row['author'],
-							 user_get_object_by_name($Row['author'])->getId(),
-							 $Row['author']).'</td>
-				</tr>';
+				$cells = array();
+				$cells[][] = $this->getFileLink($group->getUnixName(), $Row['file'], $Row['actual_version']);
+				$cells[][] = date(_('Y-m-d'), $Row['git_date']);
+				$cells[][] = $this->getDiffLink($group->getUnixName(), $Row['file'], $Row['prev_version'], $Row['actual_version']);
+				$cells[][] = $this->getActualVersionLink($group->getUnixName(), $Row['file'], $Row['actual_version']);
+				$cells[][] = htmlspecialchars($Row['log_text']);
+				$cells[][] = util_make_link_u($Row['author'], user_get_object_by_name($Row['author'])->getId(), $Row['author']);
+				echo $HTML->multiTableRow(array('class' => $HTML->boxGetAltRowStyle($i, true)), $cells);
 			}
 			echo $HTML->listTableBottom();
 			echo '</td></tr>';
diff --git a/src/plugins/scmhook/library/scmsvn/commitTracker.class.php b/src/plugins/scmhook/library/scmsvn/commitTracker.class.php
index b6e05a4..3674030 100644
--- a/src/plugins/scmhook/library/scmsvn/commitTracker.class.php
+++ b/src/plugins/scmhook/library/scmsvn/commitTracker.class.php
@@ -96,29 +96,21 @@ class commitTracker extends scmhook {
 
 		if ($Rows > 0) {
 			echo '<tr><td>';
-			echo '<h2>'._('Related SVN commits').'</h2>';
+			echo html_e('h2', array(), _('Related SVN commits'), false);
 
 			$title_arr = $this->getTitleArr();
 			echo $HTML->listTableTop($title_arr);
 
 			for ($i=0; $i<$Rows; $i++) {
 				$Row = db_fetch_array($DBResult);
-				echo '<tr '. $HTML->boxGetAltRowStyle($i) .'>'.
-				'<td>'. $this->getFileLink($group->getUnixName(),
-						$Row['file'],$Row['actual_version']). '</td>'.
-				'<td>'. date(_('Y-m-d'), $Row['svn_date']).'</td>'.
-				'<td>'. $this->getDiffLink($group->getUnixName(),
-						$Row['file'],
-						$Row['prev_version'],
-						$Row['actual_version']).'</td>'.
-				'<td>'. $this->getActualVersionLink($group->getUnixName(),
-					$Row['file'], $Row['actual_version']).
-				'</td>
-				<td>'. htmlspecialchars($Row['log_text']).'</td>
-				<td>'. util_make_link_u($Row['author'],
-							 user_get_object_by_name($Row['author'])->getId(),
-							 $Row['author']).'</td>
-				</tr>';
+				$cells = array();
+				$cells[][] = $this->getFileLink($group->getUnixName(), $Row['file'], $Row['actual_version']);
+				$cells[][] = date(_('Y-m-d'), $Row['svn_date']);
+				$cells[][] = $this->getDiffLink($group->getUnixName(), $Row['file'], $Row['prev_version'], $Row['actual_version']);
+				$cells[][] = $this->getActualVersionLink($group->getUnixName(), $Row['file'], $Row['actual_version']);
+				$cells[][] = htmlspecialchars($Row['log_text']);
+				$cells[][] = util_make_link_u($Row['author'], user_get_object_by_name($Row['author'])->getId(), $Row['author']);
+				echo $HTML->multiTableRow(array('class' => $HTML->boxGetAltRowStyle($i, true)), $cells);
 			}
 			echo $HTML->listTableBottom();
 			echo '</td></tr>';

commit 3f896de745b6fbe5003369f05a774ad1d562fadc
Author: Franck Villaume <franck.villaume at trivialdev.com>
Date:   Wed Apr 2 17:46:29 2014 +0200

    more HTML helpers

diff --git a/src/common/docman/views/addfile.php b/src/common/docman/views/addfile.php
index 19a4e6d..7a5a406 100644
--- a/src/common/docman/views/addfile.php
+++ b/src/common/docman/views/addfile.php
@@ -99,7 +99,7 @@ if ($dgf->getNested() == NULL) {
 	if ($g->useDocmanSearch())
 		echo html_e('p', array(), _('Both fields are used by the document search engine.'), false);
 
-	echo html_ao('form', array('name' => 'adddata', 'action' => util_make_uri($actionurl), 'method' => 'post', 'enctype' => 'multipart/form-data'));
+	echo $HTML->openForm(array('name' => 'adddata', 'action' => util_make_uri($actionurl), 'method' => 'post', 'enctype' => 'multipart/form-data'));
 	echo $HTML->listTableTop(array(), array(), 'infotable');
 	$cells = array();
 	$cells[][] = _('Document Title').utils_requiredField();
@@ -184,9 +184,10 @@ if ($dgf->getNested() == NULL) {
 		echo $HTML->multiTableRow(array(), $cells);
 	}
 	echo $HTML->listTableBottom();
-	echo html_e('p', array(), sprintf(_('Fields marked with %s are mandatory.'), utils_requiredField()), false);
+	echo $HTML->addRequiredFieldsInfoBox();
 	echo html_ao('div', array('class' => 'docmanSubmitDiv'));
 	echo html_e('input', array('type' => 'submit', 'name' => 'submit', 'value' => _('Submit Information')));
-	echo html_ac(html_ap() - 2);
+	echo html_ac(html_ap() - 1);
+	echo $HTML->closeForm();
 }
 echo html_ac(html_ap() - 1);
diff --git a/src/common/docman/views/additem.php b/src/common/docman/views/additem.php
index 4b39906..8505a46 100644
--- a/src/common/docman/views/additem.php
+++ b/src/common/docman/views/additem.php
@@ -72,13 +72,15 @@ if (forge_check_perm('docman', $group_id, 'approve')) {
 	echo html_ac(html_ap() -2);
 	echo html_ao('div', array('id' => 'tabs-inject-tree'));
 	echo html_ao('div', array('class' => 'docman_div_include', 'id' => 'zipinject'));
-	echo html_ao('form', array('id' => 'injectzip', 'name' => 'injectzip', 'method' => 'post', 'action' => util_make_uri('/docman/?group_id='.$group_id.'&action=injectzip&dirid='.$dirid), 'enctype' => 'multipart/form-data'));
+	echo $HTML->openForm(array('id' => 'injectzip', 'name' => 'injectzip', 'method' => 'post', 'action' => util_make_uri('/docman/?group_id='.$group_id.'&action=injectzip&dirid='.$dirid), 'enctype' => 'multipart/form-data'));
 	echo html_ao('p');
 	echo html_e('label', array(), _('Upload archive:'), false);
 	echo html_e('input', array('type' => 'file', 'name' => 'uploaded_zip', 'required' => 'required'));
 	echo html_e('span', array(), sprintf(_('(max upload size: %s)'),human_readable_bytes(util_get_maxuploadfilesize())), false);
 	echo html_e('input', array('id' => 'submitinjectzip', 'type' => 'button', 'value' => _('Inject Tree')));
-	echo html_ac(html_ap() -4);
+	echo html_ac(html_ap() -1);
+	echo $HTML->closeForm();
+	echo html_ac(html_ap() -2);
 }
 
 echo html_ac(html_ap() -1);
diff --git a/src/common/docman/views/addsubdocgroup.php b/src/common/docman/views/addsubdocgroup.php
index c5b8678..7c2edd2 100644
--- a/src/common/docman/views/addsubdocgroup.php
+++ b/src/common/docman/views/addsubdocgroup.php
@@ -53,7 +53,7 @@ function doItAddSubGroup() {
 <?php
 echo html_ac(html_ap() - 1);
 echo html_ao('div', array('class' => 'docmanDivIncluded'));
-echo html_ao('form', array('id' => 'addsubgroup', 'name' => 'addsubgroup', 'method' => 'post', 'action' => util_make_uri($actionurl)));
+echo $HTML->openForm(array('id' => 'addsubgroup', 'name' => 'addsubgroup', 'method' => 'post', 'action' => util_make_uri($actionurl)));
 if ($dirid) {
 	$folderMessage = _('Name of the document subfolder to create');
 } else {
@@ -62,4 +62,5 @@ if ($dirid) {
 echo html_e('span', array(), $folderMessage._(': '), false);
 echo html_e('input', array('required' => 'required', 'type' => 'text',  'name' => 'groupname', 'size' => 40, 'maxlength' => 255, 'placeholder' => $folderMessage));
 echo html_e('input', array('id' => 'submitaddsubgroup', 'type' => 'button', 'value' => _('Create'), 'onclick' => 'javascript:doItAddSubGroup()'));
-echo html_ac(html_ap() -2);
+echo $HTML->closeForm();
+echo html_ac(html_ap() -1);
diff --git a/src/common/docman/views/admin.php b/src/common/docman/views/admin.php
index 1b0265c..a58535d 100644
--- a/src/common/docman/views/admin.php
+++ b/src/common/docman/views/admin.php
@@ -6,6 +6,7 @@
  * Copyright 2002-2003, Tim Perdue/GForge, LLC
  * Copyright 2010-2011, Franck Villaume - Capgemini
  * Copyright (C) 2011 Alain Peyrat - Alcatel-Lucent
+ * Copyright 2014, Franck Villaume - TrivialDev
  * http://fusionforge.org
  *
  * This file is part of FusionForge. FusionForge is free software;
@@ -46,13 +47,14 @@ function doIt(formid) {
 <?php
 echo html_ac(html_ap() - 1);
 if (extension_loaded('zip')) {
-	echo html_ao('form', array('id' => 'backup', 'name' => 'backup', 'method' => 'post', 'action' => util_make_uri('/docman/view.php/'.$group_id.'/backup')));
+	echo $HTML->openForm(array('id' => 'backup', 'name' => 'backup', 'method' => 'post', 'action' => util_make_uri('/docman/view.php/'.$group_id.'/backup')));
 	echo html_ao('ul');
 	echo html_e('li', array(), html_e('input', array('id' => 'submitbackup', 'type' => 'button', 'value' => _('Extract documents and directories as an archive'), 'onclick' => 'javascript:doIt("backup")')), false);
-	echo html_ac(html_ap() -2);
+	echo html_ac(html_ap() -1);
+	echo $HTML->closeForm();
 }
 
-echo html_ao('form', array('id' => 'createonline', 'name' => 'createonline', 'method' => 'post', 'action' => util_make_uri('/docman/?group_id='.$group_id.'&action=updatecreateonline')));
+echo $HTML->openForm(array('id' => 'createonline', 'name' => 'createonline', 'method' => 'post', 'action' => util_make_uri('/docman/?group_id='.$group_id.'&action=updatecreateonline')));
 echo html_ao('ul');
 $createOnlineStatus = '1';
 $labelCreateOnline = _('Enable Create Online Documents');
@@ -61,9 +63,10 @@ if ($g->useCreateOnline()) {
 	$labelCreateOnline = _('Disable Create Online Documents');
 }
 echo html_e('li', array(), html_e('input', array('name' => 'status', 'type' => 'hidden', 'value' => $createOnlineStatus)).html_e('input', array('id' => 'submitcreateonline', 'type' => 'button', 'value' => $labelCreateOnline, 'onclick' => 'javascript:doIt("createonline")')), false);
-echo html_ac(html_ap() -2);
+echo html_ac(html_ap() -1);
+echo $HTML->closeForm();
 
-echo html_ao('form', array('id' => 'searchengine', 'name' => 'searchengine', 'method' => 'post', 'action' => util_make_uri('/docman/?group_id='.$group_id.'&action=updateenginesearch')));
+echo $HTML->openForm(array('id' => 'searchengine', 'name' => 'searchengine', 'method' => 'post', 'action' => util_make_uri('/docman/?group_id='.$group_id.'&action=updateenginesearch')));
 echo html_ao('ul');
 $searchEngineStatus = '1';
 $labelSearchEngine = _('Enable Search Engine');
@@ -72,17 +75,19 @@ if ($g->useDocmanSearch()) {
 	$labelSearchEngine = _('Disable Search Engine');
 }
 echo html_e('li', array(), html_e('input', array('name' => 'status', 'type' => 'hidden', 'value' => $searchEngineStatus)).html_e('input', array('id' => 'submitsearchengine', 'type' => 'button', 'value' => $labelSearchEngine, 'onclick' =>'javascript:doIt("searchengine")')), false);
-echo html_ac(html_ap() -2);
+echo html_ac(html_ap() -1);
+echo $HTML->closeForm();
 
 if ($g->useDocmanSearch()) {
-	echo html_ao('form', array('id' => 'reindexword', 'name' => 'reindexword', 'method' => 'post', 'action' => util_make_uri('/docman/?group_id='.$group_id.'&action=forcereindexenginesearch')));
+	echo $HTML->openForm(array('id' => 'reindexword', 'name' => 'reindexword', 'method' => 'post', 'action' => util_make_uri('/docman/?group_id='.$group_id.'&action=forcereindexenginesearch')));
 	echo html_ao('ul');
 	echo html_e('li', array(), html_e('input', array('name' => 'status', 'type' => 'hidden', 'value' => '1')).html_e('input', array('id' => 'submitreindexword', 'type' => 'button', 'value' => _('Force reindexation search engine'), 'onclick' => 'javascript:doIt("reindexword")')), false);
-	echo html_ac(html_ap() -2);
+	echo html_ac(html_ap() -1);
+	echo $HTML->closeForm();
 }
 
 if (forge_get_config('use_webdav')) {
-	echo html_ao('form', array('id' => 'webdavinterface', 'name' => 'webdavinterface', 'method' => 'post', 'action' => util_make_uri('/docman/?group_id='.$group_id.'&action=updatewebdavinterface')));
+	echo $HTML->openForm(array('id' => 'webdavinterface', 'name' => 'webdavinterface', 'method' => 'post', 'action' => util_make_uri('/docman/?group_id='.$group_id.'&action=updatewebdavinterface')));
 	echo html_ao('ul');
 	$webdavStatus = '1';
 	$labelWebdavInterface = _('Enable Webdav Interface');
@@ -91,7 +96,8 @@ if (forge_get_config('use_webdav')) {
 		$labelWebdavInterface = _('Disable Webdav Interface');
 	}
 	echo html_e('li', array(), html_e('input', array('name' => 'status', 'type' => 'hidden', 'value' => $webdavStatus)).html_e('input', array('id' => 'submitweddavinterface', 'type' => 'button', 'value' => $labelWebdavInterface, 'onclick' => 'javascript:doIt("webdavinterface")')), false);
-	echo html_ac(html_ap() -2);
+	echo html_ac(html_ap() -1);
+	echo $HTML->closeForm();
 }
 
 plugin_hook('hierarchy_views', array($group_id, 'docman'));
diff --git a/src/common/docman/views/editdocgroup.php b/src/common/docman/views/editdocgroup.php
index 683ed15..3321025 100644
--- a/src/common/docman/views/editdocgroup.php
+++ b/src/common/docman/views/editdocgroup.php
@@ -52,7 +52,7 @@ if ($dg->isError())
 	session_redirect('/docman/?group_id='.$group_id.'&error_msg='.urlencode($dg->getErrorMessage()));
 
 echo html_ao('div', array('class' => 'docmanDivIncluded'));
-echo html_ao('form', array('name' => 'editgroup', 'action' => util_make_uri($actionurl), 'method' => 'post'));
+echo $HTML->openForm(array('name' => 'editgroup', 'action' => util_make_uri($actionurl), 'method' => 'post'));
 echo html_e('input', array('type' => 'hidden', 'name' => 'dirid', 'value' => $dirid));
 echo $HTML->listTableTop();
 $cells[][] = _('Folder Name');
@@ -71,4 +71,5 @@ $cells[][] = '<input type="submit" value="'.$labelSubmit.'" name="submit" />';
 echo $HTML->multiTableRow(array(), $cells);
 echo $HTML->listTableBottom();
 echo html_e('p', array(), _('Folder name will be used as a title, so it should be formatted correspondingly.'), false);
-echo html_ac(html_ap() - 2);
+echo $HTML->closeForm();
+echo html_ac(html_ap() - 1);
diff --git a/src/common/docman/views/editfile.php b/src/common/docman/views/editfile.php
index 5947271..e3c8627 100644
--- a/src/common/docman/views/editfile.php
+++ b/src/common/docman/views/editfile.php
@@ -33,7 +33,7 @@ if (!forge_check_perm('docman', $group_id, 'approve')) {
 }
 
 echo html_ao('div', array('id' => 'editFile'));
-echo html_ao('form', array('id' => 'editdocdata', 'name' => 'editdocdata', 'method' => 'post', 'enctype' => 'multipart/form-data'));
+echo $HTML->openForm(array('id' => 'editdocdata', 'name' => 'editdocdata', 'method' => 'post', 'enctype' => 'multipart/form-data'));
 echo $HTML->listTableTop(array());
 $cells = array();
 $cells[] = array(_('Document Title').utils_requiredField()._(':'), 'class' => 'docman_editfile_title');
@@ -79,4 +79,5 @@ $cells[][] = html_e('input', array('type' => 'file', 'name' => 'uploaded_data'))
 echo $HTML->multiTableRow(array('id' => 'uploadnewroweditfile'), $cells);
 echo $HTML->listTableBottom();
 echo html_e('input', array('type' => 'hidden', 'id' => 'docid', 'name' => 'docid'));
-echo html_ac(html_ap() -2);
+echo $HTML->closeForm();
+echo html_ac(html_ap() -1);
diff --git a/src/common/docman/views/listtrashfile.php b/src/common/docman/views/listtrashfile.php
index 11271ef..d5013e0 100644
--- a/src/common/docman/views/listtrashfile.php
+++ b/src/common/docman/views/listtrashfile.php
@@ -94,9 +94,10 @@ if ($d_arr != NULL ) {
 
 echo html_ao('div', array('id' => 'rightdiv'));
 echo html_ao('div', array('style' => 'padding:5px'));
-echo html_ao('form', array('id' => 'emptytrash', 'name' => 'emptytrash', 'method' => 'post', 'action' => util_make_uri('/docman/?group_id='.$group_id.'&action=emptytrash')));
+echo $HTML->openForm(array('id' => 'emptytrash', 'name' => 'emptytrash', 'method' => 'post', 'action' => util_make_uri('/docman/?group_id='.$group_id.'&action=emptytrash')));
 echo html_e('input', array('id' => 'submitemptytrash', 'type' => 'submit', 'value' => _('Delete permanently all documents and folders with deleted status.')));
-echo html_ac(html_ap() - 2);
+echo $HTML->closeForm();
+echo html_ac(html_ap() - 1);
 ?>
 <script type="text/javascript">//<![CDATA[
 var controllerListTrash;
diff --git a/src/common/docman/views/reporting.php b/src/common/docman/views/reporting.php
index 7b19d06..2cb2d29 100644
--- a/src/common/docman/views/reporting.php
+++ b/src/common/docman/views/reporting.php
@@ -83,21 +83,22 @@ if ($report->isError()) {
 	echo $HTML->error_msg($report->getErrorMessage());
 } else {
 
-	echo html_ao('form', array('action' => util_make_uri('/docman/?group_id='.$group_id.'&view=reporting'), 'method' => 'post', 'class' => 'align-center'));
 	echo html_ao('div', array('id' => 'div_form_reporting'));
+	echo $HTML->openForm(array('action' => util_make_uri('/docman/?group_id='.$group_id.'&view=reporting'), 'method' => 'post', 'class' => 'align-center'));
 	echo html_e('strong', array(), _('Start Date')._(':'), false);
 	echo report_months_box($report, 'start', $start);
 	echo html_e('strong', array(), _('End Date')._(':'), false);
 	echo html_e('input', array('type' => 'submit', 'value' => _('Refresh')));
-	echo html_ac(html_ap() -2);
+	echo $HTML->closeForm();
+	echo html_ac(html_ap() -1);
 
 $data = $report->getData();
 
 if (count($data) == 0) {
 	echo $HTML->information(_('There have been no viewed documents for this project yet.'));
 } else {
-	echo '<script type="text/javascript">';
-	echo '//<![CDATA['."\n";
+	echo html_ao('script', array('type' => 'text/javascript'));
+	echo '//<![CDATA[';
 	echo 'var ticks = new Array();';
 	echo 'var values = new Array();';
 	$arr =& $report->getMonthStartArr();
@@ -157,8 +158,8 @@ if (count($data) == 0) {
 			plot1.replot( { resetAxes: true } );
 		});'."\n";
 	echo '//]]>';
-	echo '</script>';
-	echo '<div id="chart1"></div>';
+	echo html_ac(html_ap() -1);
+	echo html_e('div', array('id' => 'chart1'), '', false);
 	$tabletop = array(_('Folder'), _('Document'), _('User'), _('Date'));
 	$classth = array('', '', '', '');
 	echo $HTML->listTableTop($tabletop, false, 'sortable_docman_listfile', 'sortable', $classth);
diff --git a/src/common/docman/views/search.php b/src/common/docman/views/search.php
index 6f8de4a..6327424 100644
--- a/src/common/docman/views/search.php
+++ b/src/common/docman/views/search.php
@@ -53,7 +53,7 @@ if (getStringFromPost('search_type') == "one") {
 }
 
 echo html_ao('div', array('id' => 'docman_search', 'class' => 'docmanDivIncluded'));
-echo html_ao('form', array('method' => 'post', 'action' => util_make_uri('/docman/?group_id='.$group_id.'&view=search')));
+echo $HTML->openForm(array('method' => 'post', 'action' => util_make_uri('/docman/?group_id='.$group_id.'&view=search')));
 echo html_ao('div', array('id' => 'docman_search_query_words'));
 echo html_e('span', array('id' => 'docman_search_query_label'), _('Query').utils_requiredField()._(': '));
 echo html_e('input', array('type' => 'text', 'name' => 'textsearch', 'id' => 'textsearch', 'size' => 48, 'value' => $searchString, 'required' => 'required', 'placeholder' => _('Searched words')));
@@ -79,7 +79,8 @@ if (isset($projectIDsArray) && is_array($projectIDsArray)) {
 	echo html_e('input', $attrsInputIncludeSubprojects)._('Include child projects');
 }
 
-echo html_ac(html_ap() - 2);
+echo $HTML->closeForm();
+echo html_ac(html_ap() - 1);
 echo html_ao('div', array('id' => 'docman_search_query_result'));
 if ($searchString) {
 	$mots = preg_split("/[\s,]+/",$searchString);
diff --git a/src/common/tracker/include/build_submission_form.php b/src/common/tracker/include/build_submission_form.php
index a68f044..3a8edaa 100644
--- a/src/common/tracker/include/build_submission_form.php
+++ b/src/common/tracker/include/build_submission_form.php
@@ -23,6 +23,7 @@
  */
 require_once 'note.php';
 function artifact_submission_form($ath, $group) {
+	global $HTML;
 	/*
 		Show the free-form text submitted by the project admin
 	*/
@@ -100,7 +101,7 @@ function artifact_submission_form($ath, $group) {
 	<tr>
 		<td colspan="2">
 		<div class="file_attachments">
-		<a href="javascript:help_window(\''. util_make_url('/help/tracker.php?helpname=attach_file') .'\')"><strong>(?)</strong></a>
+		<a href="javascript:help_window(\''. util_make_uri('/help/tracker.php?helpname=attach_file') .'\')"><strong>(?)</strong></a>
 		<p>
 		<strong><?php echo _('Attach Files')._(':'); ?> </strong> <?php echo('('._('max upload size: '.human_readable_bytes(util_get_maxuploadfilesize())).')') ?><br />
 		<input type="file" name="input_file0" /><br />
@@ -118,12 +119,8 @@ function artifact_submission_form($ath, $group) {
 		</td>
 	</tr>
 
-	<tr>
-		<td colspan="2">
-			<?php printf(_('Fields marked with %s are mandatory.'), utils_requiredField()); ?>
-		</td>
-	</tr>
 	</table>
 	</form>
 <?php
+	echo $HTML->addRequiredFieldsInfoBox();
 }
diff --git a/src/common/tracker/views/form-addextrafield.php b/src/common/tracker/views/form-addextrafield.php
index af14822..c33c6dd 100644
--- a/src/common/tracker/views/form-addextrafield.php
+++ b/src/common/tracker/views/form-addextrafield.php
@@ -102,67 +102,65 @@ if ($rows > 0) {
 		echo "</tr>\n";
 	}
 	echo $HTML->listTableBottom();
-
-	printf(_('Fields marked with %s are mandatory.'), utils_requiredField());
-
+	echo $HTML->addRequiredFieldsInfoBox();
 } else {
 	echo $HTML->warning_msg(_('You have not defined any custom fields'));
 }
 
-		echo "<h2>"._('Add New Custom Field')."</h2>";
-		?>
-		<form action="<?php echo getStringFromServer('PHP_SELF').'?group_id='.$group_id.'&atid='.$ath->getID(); ?>" method="post">
-		<p>
-		<input type="hidden" name="add_extrafield" value="y" />
-		<strong><?php echo _('Custom Field Name')._(':').utils_requiredField(); ?></strong><br />
-		<input type="text" name="name" value="" size="15" maxlength="30" required="required" />
-		</p>
-		<p>
-		<strong><?php echo _('Field alias')._(':'); ?></strong><br />
-		<input type="text" name="alias" value="" size="15" maxlength="30" />
-		</p>
-
-		<p>
-		<strong><?php  echo _('Type of custom field')._(':'); ?></strong><br />
-		<input type="radio" name="field_type" value="1" required="required" /> <?php echo _('Select Box'); ?><br />
-		<input type="radio" name="field_type" value="2" /> <?php echo _('Check Box'); ?><br />
-		<input type="radio" name="field_type" value="3" /> <?php echo _('Radio Buttons'); ?><br />
-		<input type="radio" name="field_type" value="4" /> <?php echo _('Text Field'); ?><br />
-		<input type="radio" name="field_type" value="5" /> <?php echo _('Multi-Select Box'); ?><br />
-		<input type="radio" name="field_type" value="6" /> <?php echo _('Text Area'); ?><br />
-		<?php if (!$ath->usesCustomStatuses()) { ?>
-		<input type="radio" name="field_type" value="7" /> <?php echo _('Status'); ?><br />
-		<?php } ?>
-		<!--<input type="radio" name="field_type" value="8" /> <?php echo _('Box type technician'); ?><br />-->
-		<input type="radio" name="field_type" value="9" /> <?php echo _('Relation between artifacts'); ?><br />
-		<p>
-		<?php echo _('Text Fields and Text Areas need to have Size/Maxlength and Rows/Cols defined, respectively.'); ?><br />
-		<?php echo _('Text Field Size/Text Area Rows'); ?>
-			<input type="text" name="attribute1" value="20" size="2" maxlength="2" /><br />
-		<?php echo _('Text Field Maxlength/Text Area Columns'); ?>
-			<input type="text" name="attribute2" value="80" size="2" maxlength="2" /><br />
-		<?php echo _('Hide the default none value'); ?>
-			<input type="checkbox" name="hide100" /><br />
-		<?php echo _('Label for the none value'); ?>
-			<input type="text" name="show100label" size="30" value="<?php echo _('none') ?>" /><br />
-		</p>
-		<?php
-		echo $HTML->warning_msg(_('Warning: this add new custom field'));
-		?>
-		<p>
-		<input type="submit" name="post_changes" value="<?php echo _('Submit') ?>" />
-		</p>
-		</form>
-		<?php
+echo "<h2>"._('Add New Custom Field')."</h2>";
+?>
+<form action="<?php echo getStringFromServer('PHP_SELF').'?group_id='.$group_id.'&atid='.$ath->getID(); ?>" method="post">
+<p>
+<input type="hidden" name="add_extrafield" value="y" />
+<strong><?php echo _('Custom Field Name')._(':').utils_requiredField(); ?></strong><br />
+<input type="text" name="name" value="" size="15" maxlength="30" required="required" />
+</p>
+<p>
+<strong><?php echo _('Field alias')._(':'); ?></strong><br />
+<input type="text" name="alias" value="" size="15" maxlength="30" />
+</p>
+
+<p>
+<strong><?php  echo _('Type of custom field')._(':'); ?></strong><br />
+<input type="radio" name="field_type" value="1" required="required" /> <?php echo _('Select Box'); ?><br />
+<input type="radio" name="field_type" value="2" /> <?php echo _('Check Box'); ?><br />
+<input type="radio" name="field_type" value="3" /> <?php echo _('Radio Buttons'); ?><br />
+<input type="radio" name="field_type" value="4" /> <?php echo _('Text Field'); ?><br />
+<input type="radio" name="field_type" value="5" /> <?php echo _('Multi-Select Box'); ?><br />
+<input type="radio" name="field_type" value="6" /> <?php echo _('Text Area'); ?><br />
+<?php if (!$ath->usesCustomStatuses()) { ?>
+<input type="radio" name="field_type" value="7" /> <?php echo _('Status'); ?><br />
+<?php } ?>
+<!--<input type="radio" name="field_type" value="8" /> <?php echo _('Box type technician'); ?><br />-->
+<input type="radio" name="field_type" value="9" /> <?php echo _('Relation between artifacts'); ?><br />
+<p>
+<?php echo _('Text Fields and Text Areas need to have Size/Maxlength and Rows/Cols defined, respectively.'); ?><br />
+<?php echo _('Text Field Size/Text Area Rows'); ?>
+	<input type="text" name="attribute1" value="20" size="2" maxlength="2" /><br />
+<?php echo _('Text Field Maxlength/Text Area Columns'); ?>
+	<input type="text" name="attribute2" value="80" size="2" maxlength="2" /><br />
+<?php echo _('Hide the default none value'); ?>
+	<input type="checkbox" name="hide100" /><br />
+<?php echo _('Label for the none value'); ?>
+	<input type="text" name="show100label" size="30" value="<?php echo _('none') ?>" /><br />
+</p>
+<?php
+echo $HTML->warning_msg(_('Warning: this add new custom field'));
+?>
+<p>
+<input type="submit" name="post_changes" value="<?php echo _('Submit') ?>" />
+</p>
+</form>
+<?php
 
-		echo "<h2>"._('Custom Field Rendering Template')."</h2>";
+echo "<h2>"._('Custom Field Rendering Template')."</h2>";
 
-		echo "<p>";
-		echo '<a href="'.getStringFromServer('PHP_SELF').'?edittemplate=1&group_id='.$group_id.'&atid='. $ath->getID() .'">'._('Edit template').'</a><br />';
-		echo '<a href="'.getStringFromServer('PHP_SELF').'?deletetemplate=1&group_id='.$group_id.'&atid='. $ath->getID() .'">'._('Delete template').'</a><br />';
-		echo "</p>";
+echo "<p>";
+echo '<a href="'.getStringFromServer('PHP_SELF').'?edittemplate=1&group_id='.$group_id.'&atid='. $ath->getID() .'">'._('Edit template').'</a><br />';
+echo '<a href="'.getStringFromServer('PHP_SELF').'?deletetemplate=1&group_id='.$group_id.'&atid='. $ath->getID() .'">'._('Delete template').'</a><br />';
+echo "</p>";
 
-		$ath->footer();
+$ath->footer();
 
 // Local Variables:
 // mode: php
diff --git a/src/plugins/headermenu/view/admin/updateLinkValue.php b/src/plugins/headermenu/view/admin/updateLinkValue.php
index b8df3e7..39d2bdd 100644
--- a/src/plugins/headermenu/view/admin/updateLinkValue.php
+++ b/src/plugins/headermenu/view/admin/updateLinkValue.php
@@ -2,7 +2,7 @@
 /**
  * headermenu plugin : updateLinkValue view
  *
- * Copyright 2012-2013, Franck Villaume - TrivialDev
+ * Copyright 2012-2014, Franck Villaume - TrivialDev
  * http://fusionforge.org
  *
  * This file is part of FusionForge. FusionForge is free software;
@@ -28,14 +28,14 @@ global $group_id;
 
 $linkId = getIntFromRequest('linkid');
 $redirect_url = '/plugins/'.$headermenu->name.'/?type='.$type;
-$action_url = 'index.php?type='.$type.'&action=updateLinkValue';
+$action_url = $redirect_url.'&action=updateLinkValue';
 if (isset($group_id) && $group_id) {
-	$redirect_url .= '&group_id='.$group_id;
-	$action_url .= '&group_id='.$group_id;
+	$redirect_url .= '&group_id='.$group_id;
+	$action_url .= '&group_id='.$group_id;
 }
+echo html_ao('script', array('type' => 'text/javascript'));
 ?>
-
-<script type="text/javascript">//<![CDATA[
+//<![CDATA[
 var controllerHeaderMenu;
 
 jQuery(document).ready(function() {
@@ -50,60 +50,64 @@ jQuery(document).ready(function() {
     });
 });
 
-//]]></script>
-
+//]]>
 <?php
+echo html_ac(html_ap() - 1);
 $linkValues = $headermenu->getLink($linkId);
 if (is_array($linkValues)) {
-	echo '<h2>'._('Update this link')."</h2>\n";
-	echo '<form method="POST" name="updateLink" action="'.$action_url.'">';
-	echo '<table class="infotable">'."\n".'<tr>';
-	echo '<td>'._('Displayed Name').utils_requiredField()._(':').'</td><td><input required="required" name="name" type="text" maxlength="255" value="'.$linkValues['name'].'" /></td>';
-	echo '</tr>'."\n".'<tr>';
-	echo '<td>'._('Description')._(':').'</td><td><input name="description" type="text" maxlength="255" value="'.$linkValues['description'].'" /></td>';
-	echo '</tr>'."\n".'<tr>';
+	echo html_e('h2', array(), _('Update this link'));
+	echo $HTML->openForm(array('method' => 'POST', 'name' => 'updateLink', 'action' => util_make_uri($action_url)));
+	echo $HTML->listTableTop();
+	$cells = array();
+	$cells[] = array(_('Displayed Name').utils_requiredField()._(':'), 'style' => 'text-align:right');
+	$cells[][] = '<input required="required" name="name" type="text" maxlength="255" value="'.$linkValues['name'].'" />';
+	echo $HTML->multiTableRow(array(), $cells);
+	$cells = array();
+	$cells[] = array(_('Description')._(':'), 'style' => 'text-align:right');
+	$cells[][] = '<input name="description" type="text" maxlength="255" value="'.$linkValues['description'].'" />';
+	echo $HTML->multiTableRow(array(), $cells);
 	if ($type == 'globaladmin') {
-		echo '<td>'._('Menu Location')._(':').'</td><td>';
+		$cells = array();
+		$cells[] = array(_('Menu Location')._(':'), 'style' => 'text-align:right');
 		$vals = array('headermenu', 'outermenu');
 		$texts = array('headermenu', 'outermenu');
 		$select_name = 'linkmenu';
-		echo html_build_radio_buttons_from_arrays($vals, $texts, $select_name, $linkValues['linkmenu'], false);
-		echo '</td>';
-		echo '</tr><tr>';
+		$cells[][] = html_build_radio_buttons_from_arrays($vals, $texts, $select_name, $linkValues['linkmenu'], false);
+		echo $HTML->multiTableRow(array(), $cells);
 		$texts = array('URL', 'HTML Page');
 		$vals = array('url', 'htmlcode');
+		$hidden = '';
 	}
-	echo '<td>'._('Tab Type')._(':').'</td><td>';
+	$cells = array();
+	$cells[] = array(_('Tab Type')._(':'), 'style' => 'text-align:right');
 	if ($type == 'projectadmin') {
 		$texts = array('URL', 'URL as iframe', 'HTML Page');
 		$vals = array('url', 'iframe', 'htmlcode');
-		echo '<input type="hidden" name="linkmenu" value="groupmenu" />';
+		$hidden = '<input type="hidden" name="linkmenu" value="groupmenu" />';
 	}
 	$select_name = 'typemenu';
-	echo html_build_radio_buttons_from_arrays($vals, $texts, $select_name, $linkValues['linktype'], false);
-	echo '</td>';
-	echo '</tr>'."\n".'<tr id="trhtmlcode" style="display:none">';
-	echo '<td>'._('HTML Page').utils_requiredField()._(':').'</td><td>';
-
+	$cells[][] = $hidden.html_build_radio_buttons_from_arrays($vals, $texts, $select_name, $linkValues['linktype'], false);
+	echo $HTML->multiTableRow(array(), $cells);
+	$cells = array();
+	$cells[] = array(_('HTML Page').utils_requiredField()._(':'), 'style' => 'text-align:right');
 	$params['name'] = 'htmlcode';
 	$params['body'] = $linkValues['htmlcode'];
 	$params['width'] = "800";
 	$params['height'] = "500";
 	$params['content'] = '<textarea name="htmlcode" rows="5" cols="80">'.$params['body'].'</textarea>';
 	plugin_hook_by_reference("text_editor", $params);
-	echo $params['content'];
-
-	echo '</td></tr>'."\n".'<tr id="urlcode" style="display:none" >';
-	echo '<td>'._('URL').utils_requiredField()._(':').'</td><td><input name="link" type="text" maxlength="255" value="'.$linkValues['url'].'" /></td>';
-	echo '</tr>'."\n";
-	echo '</table>';
-	echo '<p>';
-	echo '<input type="hidden" name="linkid" value="'.$linkId.'" />';
-	echo '<input type="submit" value="'. _('Update') .'" />';
-    echo '<input type="submit" name="submit" value="'. _('Cancel') .'" formnovalidate="formnovalidate" />';
-	echo '</p>';
-	echo '</form>';
-	printf(_('Fields marked with %s are mandatory.'), utils_requiredField());
+	$cells[][] = $params['content'];
+	echo $HTML->multiTableRow(array('id' => 'trhtmlcode', 'class' => 'hide'), $cells);
+	$cells = array();
+	$cells[] = array(_('URL').utils_requiredField()._(':'), 'style' => 'text-align:right');
+	$cells[][] = '<input name="link" type="text" maxlength="255" value="'.$linkValues['url'].'" />';
+	echo $HTML->multiTableRow(array('id' => 'urlcode', 'class' => 'hide'), $cells);
+	echo $HTML->listTableBottom();
+	echo html_e('p', array(), '<input type="hidden" name="linkid" value="'.$linkId.'" />'.
+				'<input type="submit" value="'. _('Update') .'" />'.
+				'<input type="submit" name="submit" value="'. _('Cancel') .'" formnovalidate="formnovalidate" />', false);
+	echo $HTML->closeForm();
+	echo html_e('span', array(), sprintf(_('Fields marked with %s are mandatory.'), utils_requiredField()), false);
 } else {
 	$error_msg = _('Cannot retrieve value for this link:').' '.$linkId;
 	session_redirect($redirect_url.'&error_msg='.urlencode($error_msg));
diff --git a/src/plugins/headermenu/view/admin/viewGlobalConfiguration.php b/src/plugins/headermenu/view/admin/viewGlobalConfiguration.php
index 8032882..b802d90 100644
--- a/src/plugins/headermenu/view/admin/viewGlobalConfiguration.php
+++ b/src/plugins/headermenu/view/admin/viewGlobalConfiguration.php
@@ -2,7 +2,7 @@
 /**
  * headermenu : viewGlobalConfiguration page
  *
- * Copyright 2012-2013, Franck Villaume - TrivialDev
+ * Copyright 2012-2014, Franck Villaume - TrivialDev
  * http://fusionforge.org
  *
  * This file is part of FusionForge. FusionForge is free software;
@@ -23,10 +23,12 @@
 
 global $HTML;
 global $headermenu;
+global $type;
 
+$actionurl = '/plugins/'.$headermenu->name.'?type='.$type;
+echo html_ao('script', array('type' => 'text/javascript'));
 ?>
-
-<script type="text/javascript">//<![CDATA[
+//<![CDATA[
 var controllerHeaderMenu;
 
 jQuery(document).ready(function() {
@@ -48,9 +50,9 @@ jQuery(document).ready(function() {
 	});
 });
 
-//]]></script>
-
+//]]>
 <?php
+echo html_ac(html_ap() - 1);
 $linksHeaderMenuArray = $headermenu->getAvailableLinks('headermenu');
 $linksOuterMenuArray = $headermenu->getAvailableLinks('outermenu');
 
@@ -58,111 +60,115 @@ if (sizeof($linksHeaderMenuArray) || sizeof($linksOuterMenuArray)) {
 	echo $HTML->information(_('You can reorder tabs, just drag & drop rows in the table below and save order. Please note that those extra tabs can only appear after the standard tabs. And you can only move them inside the set of extra tabs.'));
 }
 if (sizeof($linksHeaderMenuArray)) {
-	echo '<h2>'._('Manage available tabs in headermenu').'</h2>';
+	echo html_e('h2', array(), _('Manage available tabs in headermenu'), false);
 	$tabletop = array(_('Order'), _('Tab Type'), _('Displayed Name'), _('Description'), _('Status'), _('Actions'));
 	$classth = array('', '', '', '', '', 'unsortable');
 	echo $HTML->listTableTop($tabletop, false, 'sortable_headermenu_listlinks', 'sortable', $classth);
 	foreach ($linksHeaderMenuArray as $link) {
-		echo '<tr id="'.$link['id_headermenu'].'" ><td class="align-center">'.$link['ordering'].'</td>';
+		$cells = array();
+		$cells[] = array($link['ordering'], 'class' => 'align-center');
 		if (strlen($link['url']) > 0) {
-			echo '<td>'._('URL').' ('.htmlspecialchars($link['url']).')</td>';
+			$cells[][] = _('URL').' ('.htmlspecialchars($link['url']).')';
 		} else {
-			echo '<td>'._('HTML Page').'</td>';
+			$cells[][] = _('HTML Page');
 		}
-		echo '<td>'.htmlspecialchars($link['name']).'</td>';
-		echo '<td>'.htmlspecialchars($link['description']).'</td>';
+		$cells[][] = htmlspecialchars($link['name']);
+		$cells[][] = htmlspecialchars($link['description']);
 		if ($link['is_enable']) {
-			echo '<td>'.html_image('docman/validate.png', 22, 22, array('alt'=>_('link is on'), 'class'=>'tabtitle', 'title'=>_('link is on'))).'</td>';
-			echo '<td><a class="tabtitle-ne" title="'._('Desactivate this link').'" href="index.php?type=globaladmin&action=updateLinkStatus&linkid='.$link['id_headermenu'].'&linkstatus=0">'.html_image('docman/release-document.png', 22, 22, array('alt'=>_('Desactivate this link'))). '</a>';
+			$cells[][] = html_image('docman/validate.png', 22, 22, array('alt'=>_('link is on'), 'class'=>'tabtitle', 'title'=>_('link is on')));
+			$content = util_make_link($actionurl.'&action=updateLinkStatus&linkid='.$link['id_headermenu'].'&linkstatus=0', html_image('docman/release-document.png', 22, 22, array('alt' => _('Desactivate this link'))), array('class' => 'tabtitle-ne', 'title' => _('Desactivate this link')));
 		} else {
-			echo '<td>'.html_image('docman/delete-directory.png', 22, 22, array('alt'=>_('link is off'), 'class'=>'tabtitle', 'title'=>_('link is off'))).'</td>';
-			echo '<td><a class="tabtitle-ne" title="'._('Activate this link').'" href="index.php?type=globaladmin&action=updateLinkStatus&linkid='.$link['id_headermenu'].'&linkstatus=1">'.html_image('docman/reserve-document.png', 22, 22, array('alt'=>_('Activate this link'))). '</a>';
+			$cells[][] = html_image('docman/delete-directory.png', 22, 22, array('alt'=>_('link is off'), 'class'=>'tabtitle', 'title'=>_('link is off')));
+			$content = util_make_link($actionurl.'&action=updateLinkStatus&linkid='.$link['id_headermenu'].'&linkstatus=1', html_image('docman/reserve-document.png', 22, 22, array('alt' => _('Activate this link'))), array('class' => 'tabtitle-ne', 'title' => _('Activate this link')));
 		}
-		echo '<a class="tabtitle-ne" title="'._('Edit this link').'" href="index.php?type=globaladmin&view=updateLinkValue&linkid='.$link['id_headermenu'].'">'.html_image('docman/edit-file.png',22,22, array('alt'=>_('Edit this link'))). '</a>';
-		echo '<a class="tabtitle-ne" title="'._('Delete this link').'" href="index.php?type=globaladmin&action=deleteLink&linkid='.$link['id_headermenu'].'">'.html_image('docman/trash-empty.png',22,22, array('alt'=>_('Delete this link'))). '</a>';
-		echo '</td>';
-		echo '</tr>';
+		$content .= util_make_link($actionurl.'&view=updateLinkValue&linkid='.$link['id_headermenu'], html_image('docman/edit-file.png', 22, 22, array('alt' => _('Edit this link'))), array('class' => 'tabtitle-ne', 'title' => _('Edit this link')));
+		$content .= util_make_link($actionurl.'&action=deleteLink&linkid='.$link['id_headermenu'], html_image('docman/trash-empty.png', 22, 22, array('alt' => _('Delete this link'))), array('class' => 'tabtitle-ne', 'title' => _('Delete this link')));
+		$cells[][] = $content;
+		echo $HTML->multiTableRow(array('id' => $link['id_headermenu']), $cells);
 	}
 	echo $HTML->listTableBottom();
 	echo '<input type="button" id="linkorderheadervalidatebutton" value="'._('Save Order').'" style="display:none;" />';
-	echo '<br/>';
+	echo html_e('br');
 } else {
 	echo $HTML->information(_('No tabs available for headermenu'));
 }
 
 if (sizeof($linksOuterMenuArray)) {
-	echo '<h2>'._('Manage available tabs in outermenu').'</h2>';
+	echo html_e('h2', array(), _('Manage available tabs in outermenu'), false);
 	$tabletop = array(_('Order'), _('Tab Type'), _('Displayed Name'), _('Description'), _('Status'), _('Actions'));
 	$classth = array('', '', '', '', '', 'unsortable');
 	echo $HTML->listTableTop($tabletop, false, 'sortable_outermenu_listlinks', 'sortable', $classth);
 	foreach ($linksOuterMenuArray as $link) {
-		echo '<tr id="'.$link['id_headermenu'].'" ><td class="align-center">'.$link['ordering'].'</td>';
+		$cells = array();
+		$cells[] = array($link['ordering'], 'class' => 'align-center');
 		if (strlen($link['url']) > 0) {
-			echo '<td>'._('URL').' ('.htmlspecialchars($link['url']).')</td>';
+			$cells[][] = _('URL').' ('.htmlspecialchars($link['url']).')';
 		} else {
-			echo '<td>'._('HTML Page').'</td>';
+			$cells[][] = _('HTML Page');
 		}
-		echo '<td>'.htmlspecialchars($link['name']).'</td>';
-		echo '<td>'.htmlspecialchars($link['description']).'</td>';
+		$cells[][] = htmlspecialchars($link['name']);
+		$cells[][] = htmlspecialchars($link['description']);
 		if ($link['is_enable']) {
-			echo '<td>'.html_image('docman/validate.png', 22, 22, array('alt'=>_('link is on'), 'class'=>'tabtitle', 'title'=>_('link is on'))).'</td>';
-			echo '<td><a class="tabtitle-ne" title="'._('Desactivate this link').'" href="index.php?type=globaladmin&action=updateLinkStatus&linkid='.$link['id_headermenu'].'&linkstatus=0">'.html_image('docman/release-document.png', 22, 22, array('alt'=>_('Desactivate this link'))). '</a>';
+			$cells[][] = html_image('docman/validate.png', 22, 22, array('alt'=>_('link is on'), 'class'=>'tabtitle', 'title'=>_('link is on')));
+			$content = util_make_link($actionurl.'&action=updateLinkStatus&linkid='.$link['id_headermenu'].'&linkstatus=0', html_image('docman/release-document.png', 22, 22, array('alt'=>_('Desactivate this link'))), array('class' => 'tabtitle-ne', 'title' => _('Desactivate this link')));
 		} else {
-			echo '<td>'.html_image('docman/delete-directory.png', 22, 22, array('alt'=>_('link is off'), 'class'=>'tabtitle', 'title'=>_('link is off'))).'</td>';
-			echo '<td><a class="tabtitle-ne" title="'._('Activate this link').'" href="index.php?type=globaladmin&action=updateLinkStatus&linkid='.$link['id_headermenu'].'&linkstatus=1">'.html_image('docman/reserve-document.png', 22, 22, array('alt'=>_('Activate this link'))). '</a>';
+			$cells[][] = html_image('docman/delete-directory.png', 22, 22, array('alt'=>_('link is off'), 'class'=>'tabtitle', 'title'=>_('link is off')));
+			$content = util_make_link($actionurl.'&action=updateLinkStatus&linkid='.$link['id_headermenu'].'&linkstatus=1', html_image('docman/reserve-document.png', 22, 22, array('alt'=>_('Activate this link'))), array('class' => 'tabtitle-ne', 'title' => _('Activate this link')));
 		}
-		echo '<a class="tabtitle-ne" title="'._('Edit this link').'" href="index.php?type=globaladmin&view=updateLinkValue&linkid='.$link['id_headermenu'].'">'.html_image('docman/edit-file.png',22,22, array('alt'=>_('Edit this link'))). '</a>';
-		echo '<a class="tabtitle-ne" title="'._('Delete this link').'" href="index.php?type=globaladmin&action=deleteLink&linkid='.$link['id_headermenu'].'">'.html_image('docman/trash-empty.png',22,22, array('alt'=>_('Delete this link'))). '</a>';
-		echo '</td>';
-		echo '</tr>';
+		$content .= util_make_link($actionurl.'&view=updateLinkValue&linkid='.$link['id_headermenu'], html_image('docman/edit-file.png',22,22, array('alt'=>_('Edit this link'))), array('class' => 'tabtitle-ne', 'title' => _('Edit this link')));
+		$content .= util_make_link($actionurl.'&action=deleteLink&linkid='.$link['id_headermenu'], html_image('docman/trash-empty.png',22,22, array('alt'=>_('Delete this link'))), array('class' => 'tabtitle-ne', 'title' => _('Delete this link')));
+		$cells[][] = $content;
+		echo $HTML->multiTableRow(array('id' => $link['id_headermenu']), $cells);
 	}
 	echo $HTML->listTableBottom();
 	echo '<input type="button" id="linkorderoutervalidatebutton" value="'._('Save Order').'" style="display:none;" />';
-	echo '<br/>';
+	echo html_e('br');
 } else {
 	echo $HTML->information(_('No tabs available for outermenu'));
 }
 
-echo '<h2>'._('Add new tab').'</h2>';
+echo html_e('h2', array(), _('Add new tab'), false);
 echo $HTML->information(_('You can add specific tabs in outermenu (main tab) or headermenu (next to the login) with the form below.'));
-echo '<form method="POST" name="addLink" action="index.php?type=globaladmin&action=addLink">';
-echo '<table class="infotable"><tr>';
-echo '<td>'._('Displayed Name')._(':').'</td><td><input required="required" name="name" type="text" maxlength="255" /></td>';
-echo '</tr><tr>';
-echo '<td>'._('Description')._(':').'</td><td><input name="description" type="text" maxlength="255" /></td>';
-echo '</tr><tr>';
-echo '<td>'._('Menu Location')._(':').'</td><td>';
+echo $HTML->openForm(array('method' => 'POST', 'name' => 'addLink', 'action' => util_make_uri($actionurl.'&action=addLink')));
+echo $HTML->listTableTop();
+$cells = array();
+$cells[] = array(_('Displayed Name')._(':'), 'style' => 'text-align:right');
+$cells[][] = '<input required="required" name="name" type="text" maxlength="255" />';
+echo $HTML->multiTableRow(array(), $cells);
+$cells = array();
+$cells[] = array(_('Description')._(':'), 'style' => 'text-align:right');
+$cells[][] = '<input name="description" type="text" maxlength="255" />';
+echo $HTML->multiTableRow(array(), $cells);
+$cells = array();
+$cells[] = array(_('Menu Location')._(':'), 'style' => 'text-align:right');
 $vals = array('headermenu', 'outermenu');
 $texts = array('headermenu', 'outermenu');
 $select_name = 'linkmenu';
-echo html_build_radio_buttons_from_arrays($vals, $texts, $select_name, 'headermenu', false);
-echo '</td>';
-echo '</tr><tr>';
-echo '<td>'._('Tab Type')._(':').'</td><td>';
+$cells[][] = html_build_radio_buttons_from_arrays($vals, $texts, $select_name, 'headermenu', false);
+echo $HTML->multiTableRow(array(), $cells);
+$cells = array();
+$cells[] = array(_('Tab Type')._(':'), 'style' => 'text-align:right');
 $texts = array('URL', 'HTML Page');
 $vals = array('url', 'htmlcode');
 $select_name = 'typemenu';
-echo html_build_radio_buttons_from_arrays($vals, $texts, $select_name, 'url', false);
-echo '</td>';
-echo '</tr><tr id="trhtmlcode" style="display:none">';
-echo '<td>'._('HTML Page')._(':').'</td><td>';
-$GLOBALS['editor_was_set_up'] = false;
-$body = _('Just paste your code here...');
+$cells[][] = html_build_radio_buttons_from_arrays($vals, $texts, $select_name, 'url', false);
+echo $HTML->multiTableRow(array(), $cells);
+$cells = array();
+$cells[] = array(_('HTML Page')._(':'), 'style' => 'text-align:right');
 $params['name'] = 'htmlcode';
-$params['body'] = $body;
+$params['body'] = _('Just paste your code here...');
 $params['width'] = "800";
 $params['height'] = "500";
-$params['user_id'] = user_getid();
-plugin_hook("text_editor", $params);
-if (!$GLOBALS['editor_was_set_up']) {
-	echo '<textarea name="htmlcode" rows="5" cols="80">'.$body.'</textarea>';
-}
-unset($GLOBALS['editor_was_set_up']);
-echo '</td></tr><tr id="urlcode" >';
-echo '<td>'._('URL')._(':').'</td><td><input name="link" type="text" maxlength="255" /></td>';
-echo '</tr><tr>';
-echo '<td colspan="2">';
-echo '<input type="submit" value="'. _('Add') .'" />';
-echo '</td>';
-echo '</tr></table>';
-echo '</form>';
+$params['content'] = '<textarea name="htmlcode" rows="5" cols="80">'.$params['body'].'</textarea>';
+plugin_hook_by_reference("text_editor", $params);
+$cells[][] = $params['content'];
+echo $HTML->multiTableRow(array('id' => 'trhtmlcode', 'class' => 'hide'), $cells);
+$cells = array();
+$cells[] = array(_('URL')._(':'), 'style' => 'text-align:right');
+$cells[][] = '<input name="link" type="text" maxlength="255" />';
+echo $HTML->multiTableRow(array('id' => 'urlcode', 'class' => 'hide'), $cells);
+$cells = array();
+$cells[] = array('<input type="submit" value="'. _('Add') .'" />', 'colspan' => 2);
+echo $HTML->multiTableRow(array(), $cells);
+echo $HTML->listTableBottom();
+echo $HTML->closeForm();
diff --git a/src/plugins/headermenu/view/admin/viewProjectConfiguration.php b/src/plugins/headermenu/view/admin/viewProjectConfiguration.php
index a2597eb..6611683 100644
--- a/src/plugins/headermenu/view/admin/viewProjectConfiguration.php
+++ b/src/plugins/headermenu/view/admin/viewProjectConfiguration.php
@@ -25,9 +25,9 @@ global $HTML;
 global $headermenu;
 global $group_id;
 
+echo html_ao('script', array('type' => 'text/javascript'));
 ?>
-
-<script type="text/javascript">//<![CDATA[
+//<![CDATA[
 var controllerGroupMenu;
 
 jQuery(document).ready(function() {
@@ -46,9 +46,9 @@ jQuery(document).ready(function() {
 	});
 });
 
-//]]></script>
-
+//]]>
 <?php
+echo html_ac(html_ap() - 1);
 $linksArray = $headermenu->getAvailableLinks('groupmenu', $group_id);
 if (sizeof($linksArray)) {
 	echo html_e('h2', array(), _('Manage available tabs'));
@@ -89,26 +89,39 @@ if (sizeof($linksArray)) {
 
 echo html_e('h2', array(), _('Add new tab'));
 echo $HTML->information(_('You can add your own tabs in the menu bar with the form below.'));
-echo '<form method="POST" name="addLink" action="'.util_make_uri('/plugins/'.$headermenu->name.'/?type=projectadmin&group_id='.$group_id.'&action=addLink').'">';
+echo $HTML->openForm(array('method' => 'POST', 'name' => 'addLink', 'action' => util_make_uri('/plugins/'.$headermenu->name.'/?type=projectadmin&group_id='.$group_id.'&action=addLink')));
 echo $HTML->listTableTop();
 $cells = array();
-$cells[][] = _('Displayed Name').utils_requiredField()._(':');
+$cells[] = array(_('Displayed Name').utils_requiredField()._(':'), 'style' => 'text-align:right');
 $cells[][] = '<input required="required" name="name" type="text" maxlength="255" />';
 echo $HTML->multiTableRow(array(), $cells);
 $cells = array();
-$cells[][] = _('Description')._(':');
+$cells[] = array(_('Description')._(':'), 'style' => 'text-align:right');
 $cells[][] = '<input name="description" type="text" maxlength="255" />';
 echo $HTML->multiTableRow(array(), $cells);
-$cells = array();
-$cells[][] = _('Tab Type')._(':');
+$cells = array();$params['name'] = 'htmlcode';$params['name'] = 'htmlcode';
+$params['body'] = _('Just paste your code here...');;
+$params['width'] = "800";
+$params['height'] = "500";
+$params['user_id'] = user_getid();
+$params['content'] = '<textarea name="htmlcode" rows="5" cols="80">'.$params['body'].'</textarea>';
+plugin_hook("text_editor", $params);
+$cells[][] = $params['content'];
+$params['body'] = _('Just paste your code here...');;
+$params['width'] = "800";
+$params['height'] = "500";
+$params['user_id'] = user_getid();
+$params['content'] = '<textarea name="htmlcode" rows="5" cols="80">'.$params['body'].'</textarea>';
+plugin_hook("text_editor", $params);
+$cells[][] = $params['content'];
+$cells[] = array(_('Tab Type')._(':'), 'style' => 'text-align:right');
 $texts = array('URL', 'HTML Page');
 $vals = array('url', 'htmlcode');
 $select_name = 'typemenu';
 $cells[][] = html_build_radio_buttons_from_arrays($vals, $texts, $select_name, 'url', false);
 echo $HTML->multiTableRow(array(), $cells);
 $cells = array();
-$cells[][] = _('HTML Page').utils_requiredField()._(':');
-
+$cells[] = array(_('HTML Page').utils_requiredField()._(':'), 'style' => 'text-align:right');
 $params['name'] = 'htmlcode';
 $params['body'] = _('Just paste your code here...');
 $params['width'] = "800";
@@ -118,7 +131,7 @@ plugin_hook_by_reference("text_editor", $params);
 $cells[][] = $params['content'];
 echo $HTML->multiTableRow(array('id' => 'trhtmlcode', 'class' => 'hide'), $cells);
 $cells = array();
-$cells[][] = _('URL').utils_requiredField()._(':');
+$cells[] = array(_('URL').utils_requiredField()._(':'), 'style' => 'text-align:right');
 $cells[][] = '<input name="link" type="text" maxlength="255" />';
 echo $HTML->multiTableRow(array('id' => 'urlcode'), $cells);
 $cells = array();
@@ -128,6 +141,6 @@ $cells = array();
 $cells[] = array('<input type="hidden" name="linkmenu" value="groupmenu" /><input type="submit" value="'. _('Add') .'" />', 'colspan' => 2);
 echo $HTML->multiTableRow(array(), $cells);
 echo $HTML->listTableBottom();
-echo '</form>';
+echo $HTML->closeForm();
 
 printf(_('Fields marked with %s are mandatory.'), utils_requiredField());
diff --git a/src/plugins/webanalytics/view/admin/updateLinkValue.php b/src/plugins/webanalytics/view/admin/updateLinkValue.php
index ac35968..d3835a5 100644
--- a/src/plugins/webanalytics/view/admin/updateLinkValue.php
+++ b/src/plugins/webanalytics/view/admin/updateLinkValue.php
@@ -2,7 +2,7 @@
 /**
  * webanalyticsPlugin Class
  *
- * Copyright 2012 Franck Villaume - TrivialDev
+ * Copyright 2012, 2014, Franck Villaume - TrivialDev
  * http://fusionforge.org
  *
  * This file is part of FusionForge. FusionForge is free software;
@@ -29,21 +29,26 @@ $linkId = getIntFromRequest('linkid');
 
 $linkValues = $webanalytics->getLink($linkId);
 if (is_array($linkValues)) {
-	echo '<form method="POST" name="updateLink" action="index.php?type=globaladmin&action=updateLinkValue">';
-	echo '<table><tr>';
+	echo $HTML->openForm(array('method' => 'POST', 'name' => 'updateLink', 'action' => util_make_uri('/plugins/'.$webanalytics->name.'/?type=globaladmin&action=updateLinkValue'));
 	echo $HTML->boxTop(_('Update this link'));
-	echo '<td>'._('Informative Name').'</td><td><input name="name" type="text" maxsize="255" value="'.$linkValues['name'].'" /></td>';
-	echo '</tr><tr>';
-	echo '<td>'._('Standard JavaScript Tracking code').'</td><td><textarea name="link" rows="15" cols="70" >'.$linkValues['url'].'</textarea></td>';
-	echo '</tr><tr>';
-	echo '<td>';
-	echo '<input type="hidden" name="linkid" value="'.$linkId.'" />';
-	echo '<input type="submit" value="'. _('Update') .'" />';
-	echo '<a href="/plugins/'.$webanalytics->name.'/?type=globaladmin"><input type="button" value="'. _('Cancel') .'" /></a>';
-	echo '</td>';
+	echo $HTML->listTableTop();
+	$cells = array();
+	$cells[][] = _('Informative Name').utils_requiredField()._(':');
+	$cells[][] = '<input name="name" type="text" maxsize="255" value="'.$linkValues['name'].'" required="required" />';
+	echo $HTML->multiTableRow(array(), $cells);
+	$cells = array();
+	$cells[][] = _('Standard JavaScript Tracking code').utils_requiredField()._(':');
+	$cells[][] = '<textarea name="link" rows="15" cols="70" required="required" >'.$linkValues['url'].'</textarea>';
+	echo $HTML->multiTableRow(array(), $cells);
+	$cells = array();
+	$cells[] = array('<input type="hidden" name="linkid" value="'.$linkId.'" />'.
+			'<input type="submit" value="'. _('Update') .'" />'.
+			util_make_link('/plugins/'.$webanalytics->name.'?type=globaladmin', '<input type="button" value="'. _('Cancel') .'" />'), 'colspan' => 2);
+	echo $HTML->multiTableRow(array(), $cells);
+	echo $HTML->listTableBottom();
 	echo $HTML->boxBottom();
-	echo '</tr></table>';
-	echo '</form>';
+	echo $HTML->closeForm();
+	echo $HTML->addRequiredFieldsInfoBox();
 } else {
 	$error_msg = _('Cannot retrieve value for this link:').' '.$linkId;
 	session_redirect('plugins/'.$webanalytics->name.'/?type=globaladmin&error_msg='.urlencode($error_msg));
diff --git a/src/plugins/webanalytics/view/admin/viewGlobalConfiguration.php b/src/plugins/webanalytics/view/admin/viewGlobalConfiguration.php
index 92b6537..0875239 100644
--- a/src/plugins/webanalytics/view/admin/viewGlobalConfiguration.php
+++ b/src/plugins/webanalytics/view/admin/viewGlobalConfiguration.php
@@ -2,7 +2,7 @@
 /**
  * webanalyticsPlugin Global Configuration View
  *
- * Copyright 2012 Franck Villaume - TrivialDev
+ * Copyright 2012, 2014, Franck Villaume - TrivialDev
  * http://fusionforge.org
  *
  * This file is part of FusionForge. FusionForge is free software;
@@ -53,16 +53,18 @@ if (sizeof($linksArray)) {
 	echo '</br>';
 }
 
-echo '<form method="POST" name="addLink" action="index.php?type=globaladmin&action=addLink">';
-echo '<table><tr>';
+echo $HTML->openForm(array('method' => 'POST', 'name' => 'addLink', 'action' => util_make_uri('/plugins/'.$webanalytics->name.'?type=globaladmin&action=addLink')));
 echo $HTML->boxTop(_('Add a new webanalytics reference'));
-echo '<td>'._('Informative Name').'</td><td><input name="name" type="text" maxsize="255" /></td>';
+echo $HTML->listTableTop();
+echo '<tr>';
+echo '<td>'._('Informative Name').'</td><td><input name="name" type="text" maxsize="255" required="required" /></td>';
 echo '</tr><tr>';
-echo '<td>'._('Standard JavaScript Tracking code').'</td><td><textarea name="link" rows="15" cols="70">'._('Just paste your code here...').'</textarea></td>';
+echo '<td>'._('Standard JavaScript Tracking code').'</td><td><textarea name="link" rows="15" cols="70" required="required" >'._('Just paste your code here...').'</textarea></td>';
 echo '</tr><tr>';
 echo '<td>';
 echo '<input type="submit" value="'. _('Add') .'" />';
-echo '</td>';
+echo '</td></tr>';
+echo $HTML->listTableBottom();
 echo $HTML->boxBottom();
-echo '</tr></table>';
-echo '</form>';
+echo $HTML->closeForm();
+echo $HTML->addRequiredFieldsInfoBox();
diff --git a/src/www/account/register.php b/src/www/account/register.php
index 851f953..d064dc8 100644
--- a/src/www/account/register.php
+++ b/src/www/account/register.php
@@ -272,7 +272,7 @@ if($toDisplay != "") {
 ?>
 
 <p>
-<?php printf(_('Fields marked with %s are mandatory.'), utils_requiredField()); ?>
+<?php echo $HTML->addRequiredFieldsInfoBox(); ?>
 </p>
 <p>
 <input type="submit" name="submit" value="<?php echo _('Register'); ?>" />
diff --git a/src/www/include/Layout.class.php b/src/www/include/Layout.class.php
index 39918ed..98a7ad4 100644
--- a/src/www/include/Layout.class.php
+++ b/src/www/include/Layout.class.php
@@ -1406,6 +1406,30 @@ if (isset($params['group']) && $params['group']) {
 	function displayStylesheetElements() {
 		/* Codendi/Tuleap compatibility */
 	}
+
+	/**
+	 * openForm - create the html code to open a form
+	 *
+	 * @param	array	$args	argument of the form (method, action, ...)
+	 * @return	string	html code
+	 */
+	function openForm($args) {
+		return html_ao('form', $args);
+	}
+
+	/**
+	 * closeForm - create the html code to close a form
+	 *		must be used after openForm function.
+	 *
+	 * @return	string	html code
+	 */
+	function closeForm() {
+		return html_ac(html_ap() -1);
+	}
+
+	function addRequiredFieldsInfoBox() {
+		return html_e('p', array(), sprintf(_('Fields marked with %s are mandatory.'), utils_requiredField()), false);
+	}
 }
 
 // Local Variables:

-----------------------------------------------------------------------

Summary of changes:
 src/common/docman/views/addfile.php                |    7 +-
 src/common/docman/views/additem.php                |    6 +-
 src/common/docman/views/addsubdocgroup.php         |    5 +-
 src/common/docman/views/admin.php                  |   26 ++--
 src/common/docman/views/editdocgroup.php           |    5 +-
 src/common/docman/views/editfile.php               |    5 +-
 src/common/docman/views/listtrashfile.php          |    5 +-
 src/common/docman/views/reporting.php              |   13 +-
 src/common/docman/views/search.php                 |    5 +-
 .../tracker/include/build_submission_form.php      |    9 +-
 src/common/tracker/views/form-addextrafield.php    |  106 +++++++--------
 .../headermenu/view/admin/updateLinkValue.php      |   82 +++++------
 .../view/admin/viewGlobalConfiguration.php         |  142 ++++++++++----------
 .../view/admin/viewProjectConfiguration.php        |   39 ++++--
 src/plugins/hudson/include/hudsonPlugin.class.php  |    6 +-
 .../include/hudson_Widget_JobLastBuilds.class.php  |    6 +-
 src/plugins/scmhook/common/scmhookPlugin.class.php |   18 +--
 .../scmhook/library/scmgit/commitTracker.class.php |   26 ++--
 .../scmhook/library/scmsvn/commitTracker.class.php |   26 ++--
 .../webanalytics/view/admin/updateLinkValue.php    |   33 +++--
 .../view/admin/viewGlobalConfiguration.php         |   18 +--
 src/www/account/register.php                       |    2 +-
 src/www/include/Layout.class.php                   |   24 ++++
 23 files changed, 331 insertions(+), 283 deletions(-)


hooks/post-receive
-- 
FusionForge



More information about the Fusionforge-commits mailing list