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  54d273a3a79cfb26ebaa85d5f64d5d8cc0f3b900 (commit)
       via  37f72e21875a1dd508f75d42c92c297b495d969f (commit)
       via  515479224fd04785a185eb51a0a06d444aff2cde (commit)
       via  3b924c4c9a662d3cd80dd497e17bae47d588267d (commit)
      from  6b96f3b88ca97d782127101bcf431c14df4d0639 (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 -----------------------------------------------------------------
https://scm.fusionforge.org/anonscm/gitweb/?p=fusionforge/fusionforge.git;a=commitdiff;h=54d273a3a79cfb26ebaa85d5f64d5d8cc0f3b900

commit 54d273a3a79cfb26ebaa85d5f64d5d8cc0f3b900
Author: Franck Villaume <[email protected]>
Date:   Sun Dec 25 20:38:40 2016 +0100

    externalize form to support preferences

diff --git a/src/common/tracker/actions/widget_artifact_display.php 
b/src/common/tracker/actions/widget_artifact_display.php
index d85e72f..e6af67c 100644
--- a/src/common/tracker/actions/widget_artifact_display.php
+++ b/src/common/tracker/actions/widget_artifact_display.php
@@ -69,15 +69,15 @@ if (forge_check_perm('tracker_admin', $atid)) {
        echo html_ac($ap);
 }
 // plugin_hook('message');
-echo $HTML->openForm(array('name' => 'trackerform', 'action' => 
'/tracker/?group_id='.$group_id.'&atid='.$ath->getID(), 'enctype' => 
'multipart/form-data', 'method' => 'post'));
-echo html_e('input', array('type' => 'hidden', 'name' => 'form_key', 'value' 
=> form_generate_key()));
+echo $HTML->openForm(array('id' => 'trackerform', 'name' => 'trackerform', 
'action' => '/tracker/?group_id='.$group_id.'&atid='.$ath->getID(), 'enctype' 
=> 'multipart/form-data', 'method' => 'post'));
+echo html_e('input', array('type' => 'hidden', 'name' => 'form_key', 'value' 
=> form_generate_key(), 'form' => 'trackerform'));
 if ($func == 'add') {
-       echo html_e('input', array('type' => 'hidden', 'name' => 'func', 
'value' => 'postadd'));
+       echo html_e('input', array('type' => 'hidden', 'name' => 'func', 
'value' => 'postadd', 'form' => 'trackerform'));
 } elseif ($func == 'detail') {
-       echo html_e('input', array('type' => 'hidden', 'name' => 'func', 
'value' => 'postmod'));
-       echo html_e('input', array('type' => 'hidden', 'name' => 'artifact_id', 
'value' => $ah->getID()));
+       echo html_e('input', array('type' => 'hidden', 'name' => 'func', 
'value' => 'postmod', 'form' => 'trackerform'));
+       echo html_e('input', array('type' => 'hidden', 'name' => 'artifact_id', 
'value' => $ah->getID(), 'form' => 'trackerform'));
 }
+echo $HTML->closeForm();
 $lm = new WidgetLayoutManager();
 $lm->displayLayout($atid, WidgetLayoutManager::OWNER_TYPE_TRACKER);
-echo $HTML->closeForm();
 $ath->footer();
diff --git a/src/common/widget/Widget_TrackerComment.class.php 
b/src/common/widget/Widget_TrackerComment.class.php
index 6809448..2ed04a9 100644
--- a/src/common/widget/Widget_TrackerComment.class.php
+++ b/src/common/widget/Widget_TrackerComment.class.php
@@ -102,7 +102,7 @@ class Widget_TrackerComment extends Widget {
                        $divContent = '';
                        if (forge_check_perm('tracker', $atid, 'tech')) {
                                $divContent .= html_e('strong', array(), _('Use 
Canned Response')._(':')).html_e('br').
-                                               
$ath->cannedResponseBox('canned_response').' 
'.util_make_link('/tracker/admin/?group_id='.$group_id.'&atid='.$ath->getID().'&add_canned=1',
 '('._('Admin').')').html_e('br').
+                                               
$ath->cannedResponseBox('canned_response', 'xzxz', array('form' => 
'trackerform')).' 
'.util_make_link('/tracker/admin/?group_id='.$group_id.'&atid='.$ath->getID().'&add_canned=1',
 '('._('Admin').')').html_e('br').
                                                '<script 
type="text/javascript">//<![CDATA[
                                                        
jQuery("#tracker-canned_response").change(function() {
                                                                jQuery.ajax({
@@ -123,7 +123,7 @@ class Widget_TrackerComment extends Widget {
                        }
                        if (forge_check_perm('tracker', $atid, 'submit')) {
                                $divContent .= html_e('strong', array(), 
_('Post Comment')._(':')).html_e('br').
-                                               html_e('textarea', array('id' 
=> 'tracker-comment', 'name' => 'details', 'rows' => 7, 'style' => 'width: 
100%', 'title' => util_html_secure(html_get_tooltip_description('comment'))), 
'', false);
+                                               html_e('textarea', array('form' 
=> 'trackerform', 'id' => 'tracker-comment', 'name' => 'details', 'rows' => 7, 
'style' => 'width: 100%', 'title' => 
util_html_secure(html_get_tooltip_description('comment'))), '', false);
                        }
                        $tabberContent .= html_e('div', array('id' => 
'tabber-comments', 'class' => 'tabbertab'), $divContent.$ah->showMessages());
                        if ($group->usesPM()) {
@@ -136,7 +136,7 @@ class Widget_TrackerComment extends Widget {
                if (forge_check_perm('tracker', $atid, 'submit')) {
                        $attachmentContent .=  html_e('strong', array(), 
_('Attach Files')._(':')).' ('._('max upload size')._(': 
').human_readable_bytes(util_get_maxuploadfilesize()).')'.html_e('br');
                        for ($i = 0; $i < 5; $i++) {
-                               $attachmentContent .= html_e('input', 
array('type' => 'file', 'name' => 'input_file'.$i, 'size' => 30)).html_e('br');
+                               $attachmentContent .= html_e('input', 
array('form' => 'trackerform', 'type' => 'file', 'name' => 'input_file'.$i, 
'size' => 30)).html_e('br');
                        }
                }
                if ($func == 'detail') {
@@ -157,7 +157,7 @@ class Widget_TrackerComment extends Widget {
                        if (forge_get_config('use_object_associations')) {
                                $associationContent = 
$ah->showAssociations('/tracker/?func=removeassoc&aid='.$ah->getID().'&group_id='.$group_id.'&atid='.$ath->getID());
                                if (forge_check_perm('tracker', $atid, 'tech')) 
{
-                                       $associationContent .= 
$ah->showAddAssociations();
+                                       $associationContent .= 
$ah->showAddAssociations(false, 'trackerform');
                                }
                                $tabberContent .= html_e('div', array('id' => 
'tabber-associations', 'class' => 'tabbertab'), $associationContent);
                        }
@@ -165,7 +165,7 @@ class Widget_TrackerComment extends Widget {
                $return .= html_e('div', array('id' => 'tabber'), 
$HTML->html_list($elementsLi).$tabberContent);
 
                if (forge_check_perm('tracker', $atid, 'submit')) {
-                       $return .= html_e('p', array('class' => 'middleRight'), 
html_e('input', array('type' => 'submit', 'name' => 'submit', 'value' => 
_('Save Changes'))));
+                       $return .= html_e('p', array('class' => 'middleRight'), 
html_e('input', array('form' => 'trackerform', 'type' => 'submit', 'name' => 
'submit', 'value' => _('Save Changes'))));
                }
                return $return;
        }
diff --git a/src/common/widget/Widget_TrackerContent.class.php 
b/src/common/widget/Widget_TrackerContent.class.php
index e648b0a..d7869b7 100644
--- a/src/common/widget/Widget_TrackerContent.class.php
+++ b/src/common/widget/Widget_TrackerContent.class.php
@@ -213,7 +213,7 @@ class Widget_TrackerContent extends Widget {
                                                        } elseif 
(isset($extra_fields[$extrafieldID])) {
                                                                $value = 
$extra_fields[$extrafieldID];
                                                        }
-                                                       $attrs = array();
+                                                       $attrs = array('form' 
=> 'trackerform');
                                                        $mandatory = '';
                                                        if 
($extrafieldObject->isRequired() && !$readonly) {
                                                                $mandatory = 
utils_requiredField();
@@ -427,7 +427,7 @@ class Widget_TrackerContent extends Widget {
                        }
                }
                if (!$readonly) {
-                       $return .= html_e('p', array('class' => 'middleRight'), 
html_e('input', array('type' => 'submit', 'name' => 'submit', 'value' => 
_('Save Changes'), 'title' => _('Save is validating the complete form'))));
+                       $return .= html_e('p', array('class' => 'middleRight'), 
html_e('input', array('form' => 'trackerform', 'type' => 'submit', 'name' => 
'submit', 'value' => _('Save Changes'), 'title' => _('Save is validating the 
complete form'))));
                }
                return $return;
        }
diff --git a/src/common/widget/Widget_TrackerMain.class.php 
b/src/common/widget/Widget_TrackerMain.class.php
index a539984..178e074 100644
--- a/src/common/widget/Widget_TrackerMain.class.php
+++ b/src/common/widget/Widget_TrackerMain.class.php
@@ -78,7 +78,7 @@ class Widget_TrackerMain extends Widget {
                                                array 
(db_int_array_to_any_clause($tids)));
 
                        $cells[][] = html_e('strong', array(), _('Data 
Type')._(': '));
-                       $cells[][] = html_build_select_box($res, 
'new_artifact_type_id', $ath->getID(), false);
+                       $cells[][] = html_build_select_box($res, 
'new_artifact_type_id', $ath->getID(), false, '', false, '', false, 
array('form' => 'trackerform'));
                } else {
                        $cells[][] = html_e('strong', array(), _('Data 
Type')._(': '));
                        $cells[][] = $ath->getName();
@@ -88,9 +88,9 @@ class Widget_TrackerMain extends Widget {
                $cells[][] = html_e('strong', array(), _('Assigned to')._(': 
'));
                if (forge_check_perm('tracker', $atid, 'manager')) {
                        if ($func == 'detail') {
-                               $cells[][] = $ath->technicianBox('assigned_to', 
$ah->getAssignedTo());
+                               $cells[][] = $ath->technicianBox('assigned_to', 
$ah->getAssignedTo(), true, 'none', -1, '', false, array('form' => 
'trackerform'));
                        } else {
-                               $cells[][] = $ath->technicianBox('assigned_to', 
$assigned_to);
+                               $cells[][] = $ath->technicianBox('assigned_to', 
$assigned_to, true, 'none', -1, '', false, array('form' => 'trackerform'));
                        }
                } else {
                        $cells[][] = $ah->getAssignedRealName().' 
('.$ah->getAssignedUnixName().')';
@@ -101,9 +101,9 @@ class Widget_TrackerMain extends Widget {
                        $cells[][] = html_e('strong', array(), _('State')._(': 
'));
                        if (forge_check_perm('tracker', $atid, 'tech')) {
                                if ($func == 'detail') {
-                                       $cells[][] = 
$ath->statusBox('status_id', $ah->getStatusID());
+                                       $cells[][] = 
$ath->statusBox('status_id', $ah->getStatusID(), false, '', array('form' => 
'trackerform'));
                                } else {
-                                       $cells[][] = 
$ath->statusBox('status_id');
+                                       $cells[][] = 
$ath->statusBox('status_id', 'xzxz', false, '', array('form' => 'trackerform'));
                                }
                        } else {
                                $cells[][] = $ah->getStatusName();
@@ -114,9 +114,9 @@ class Widget_TrackerMain extends Widget {
                $cells[][] = html_e('strong', array(), _('Priority')._(': '));
                if (forge_check_perm('tracker', $atid, 'manager')) {
                        if ($func == 'detail') {
-                               $cells[][] = 
build_priority_select_box('priority', $ah->getPriority());
+                               $cells[][] = 
build_priority_select_box('priority', $ah->getPriority(), false, array('form' 
=> 'trackerform'));
                        } else {
-                               $cells[][] = 
build_priority_select_box('priority', $priority);
+                               $cells[][] = 
build_priority_select_box('priority', $priority, false, array('form' => 
'trackerform'));
                        }
                } else {
                        $cells[][] = $ah->getPriority();
@@ -124,7 +124,7 @@ class Widget_TrackerMain extends Widget {
                $return .= $HTML->multiTableRow(array('class' => 
$HTML->boxGetAltRowStyle($i++, true)), $cells);
                $return .= $HTML->listTableBottom();
                if (forge_check_perm('tracker', $atid, 'tech')) {
-                       $return .= html_e('p', array('class' => 'middleRight'), 
html_e('input', array('type' => 'submit', 'name' => 'submit', 'value' => 
_('Save Changes'), 'title' => _('Save is validating the complete form'))));
+                       $return .= html_e('p', array('class' => 'middleRight'), 
html_e('input', array('form' => 'trackerform', 'type' => 'submit', 'name' => 
'submit', 'value' => _('Save Changes'), 'title' => _('Save is validating the 
complete form'))));
                }
                return $return;
        }
diff --git a/src/common/widget/Widget_TrackerSummary.class.php 
b/src/common/widget/Widget_TrackerSummary.class.php
index ee7589e..bd1249f 100644
--- a/src/common/widget/Widget_TrackerSummary.class.php
+++ b/src/common/widget/Widget_TrackerSummary.class.php
@@ -62,7 +62,7 @@ class Widget_TrackerSummary extends Widget {
                global $details;
 
                $return = '';
-               $inputAttrs = array('type' => 'text', 'name' => 'summary', 
'style' => 'width:99%', 'value' => $summary);
+               $inputAttrs = array('form' => 'trackerform', 'type' => 'text', 
'name' => 'summary', 'style' => 'width:99%', 'value' => $summary);
                if ($func == 'detail') {
                        $inputAttrs['value'] = $ah->getSummary();
                        if (forge_check_perm('tracker', $atid, 'manager')) {
@@ -85,13 +85,13 @@ class Widget_TrackerSummary extends Widget {
                        } else {
                                $editable = false;
                        }
-                       $return .= $ah->showDetails($editable);
+                       $return .= $ah->showDetails($editable, array('form' => 
'trackerform'));
                } elseif ($func == 'add') {
                        $return .= notepad_func();
                        $return .= $HTML->listTableTop();
                        $content = html_e('strong', array(), _('Detailed 
description').$requiredInfo._(':'));
                        $content .= 
notepad_button('document.forms.trackerform.details');
-                       $content .= html_e('textarea', 
array('id'=>'tracker-description', 'required'=>'required', 'name'=>'details', 
'rows'=>'20', 'style'=>'box-sizing: border-box; width: 100%', 
'title'=>util_html_secure(html_get_tooltip_description('description'))), 
$details, false);
+                       $content .= html_e('textarea', array('form' => 
'trackerform', 'id'=>'tracker-description', 'required'=>'required', 
'name'=>'details', 'rows'=>'20', 'style'=>'box-sizing: border-box; width: 
100%', 'title'=>util_html_secure(html_get_tooltip_description('description'))), 
$details, false);
                        $cells = array();
                        $cells[][] = $content;
                        $return .= $HTML->multiTableRow(array(), $cells);
@@ -100,7 +100,7 @@ class Widget_TrackerSummary extends Widget {
                }
                if (forge_check_perm('tracker', $atid, 'submit')) {
                        $return .= $HTML->addRequiredFieldsInfoBox();
-                       $return .= html_e('p', array('class' => 'middleRight'), 
html_e('input', array('type' => 'submit', 'name' => 'submit', 'value' => 
_('Save Changes'), 'title' => _('Save is validating the complete form'))));
+                       $return .= html_e('p', array('class' => 'middleRight'), 
html_e('input', array('form' => 'trackerform', 'type' => 'submit', 'name' => 
'submit', 'value' => _('Save Changes'), 'title' => _('Save is validating the 
complete form'))));
                }
                return $return;
        }

https://scm.fusionforge.org/anonscm/gitweb/?p=fusionforge/fusionforge.git;a=commitdiff;h=37f72e21875a1dd508f75d42c92c297b495d969f

commit 37f72e21875a1dd508f75d42c92c297b495d969f
Author: Franck Villaume <[email protected]>
Date:   Sun Dec 25 20:37:53 2016 +0100

    support HTML attrs in statusBox & cannedReponseBox

diff --git a/src/common/tracker/include/ArtifactTypeHtml.class.php 
b/src/common/tracker/include/ArtifactTypeHtml.class.php
index 0953cf8..65a6a9a 100644
--- a/src/common/tracker/include/ArtifactTypeHtml.class.php
+++ b/src/common/tracker/include/ArtifactTypeHtml.class.php
@@ -1198,20 +1198,20 @@ class ArtifactTypeHtml extends ArtifactType {
                }
        }
 
-       function cannedResponseBox ($name='canned_response',$checked='xzxz') {
-               return html_build_select_box 
($this->getCannedResponses(),$name,$checked);
+       function cannedResponseBox($name = 'canned_response', $checked = 
'xzxz', $attrs = array()) {
+               return html_build_select_box($this->getCannedResponses(), 
$name, $checked, true, 'none', false, '', false, $attrs);
        }
 
        /**
         * statusBox - show the statuses - automatically shows the "custom 
statuses" if they exist
         *
-        *
+        * @return string       HTML code
         */
-       function statusBox 
($name='status_id',$checked='xzxz',$show_100=false,$text_100='none') {
+       function statusBox($name = 'status_id', $checked = 'xzxz', $show_100 = 
false,$text_100 = 'none', $attrs = array()) {
                if ($text_100=='none'){
                        $text_100=_('None');
                }
-               return 
html_build_select_box($this->getStatuses(),$name,$checked,$show_100,$text_100);
+               return html_build_select_box($this->getStatuses(), $name, 
$checked, $show_100, $text_100, false, '', false, $attrs);
        }
 
        function javascript() {

https://scm.fusionforge.org/anonscm/gitweb/?p=fusionforge/fusionforge.git;a=commitdiff;h=515479224fd04785a185eb51a0a06d444aff2cde

commit 515479224fd04785a185eb51a0a06d444aff2cde
Author: Franck Villaume <[email protected]>
Date:   Sun Dec 25 20:37:12 2016 +0100

    support HTML attrs for edition

diff --git a/src/common/tracker/include/ArtifactHtml.class.php 
b/src/common/tracker/include/ArtifactHtml.class.php
index 8c0808c..fa4b346 100644
--- a/src/common/tracker/include/ArtifactHtml.class.php
+++ b/src/common/tracker/include/ArtifactHtml.class.php
@@ -35,7 +35,7 @@ class ArtifactHtml extends Artifact {
         *
         * @param       bool    $editable       is the detail editable or not? 
default is false.
         */
-       function showDetails($editable = false) {
+       function showDetails($editable = false, $editattrs = array()) {
                global $HTML;
                $return = '';
                $result = $this->getDetails();
@@ -53,7 +53,7 @@ class ArtifactHtml extends Artifact {
                        $title_arr[] = _('Detailed description');
                }
                $return .= $HTML->listTableTop($title_arr);
-               $return .= $HTML->multiTableRow(array('class' => 
$HTML->boxGetAltRowStyle(0, true), 'id' => 'editdescription', 'style' => 
'display:none'), array(array(html_e('textarea', array('id' => 
'tracker-description', 'required' => 'required', 'name' => 'description', 
'rows' => 20, 'style' => 'box-sizing: box-border; width: 99%;', 'title' => 
util_html_secure(html_get_tooltip_description('description'))), $result), 
'style' => 'display: block; box-sizing:border-box;')));
+               $return .= $HTML->multiTableRow(array('class' => 
$HTML->boxGetAltRowStyle(0, true), 'id' => 'editdescription', 'style' => 
'display:none'), array(array(html_e('textarea', array_merge($editattrs, 
array('id' => 'tracker-description', 'required' => 'required', 'name' => 
'description', 'rows' => 20, 'style' => 'box-sizing: box-border; width: 99%;', 
'title' => util_html_secure(html_get_tooltip_description('description')))), 
$result), 'style' => 'display: block; box-sizing:border-box;')));
                $return .= $HTML->multiTableRow(array('class' => 
$HTML->boxGetAltRowStyle(0, true), 'id' => 'showdescription'), 
array(array($result_html)));
                $return .= $HTML->listTableBottom();
                return $return;

https://scm.fusionforge.org/anonscm/gitweb/?p=fusionforge/fusionforge.git;a=commitdiff;h=3b924c4c9a662d3cd80dd497e17bae47d588267d

commit 3b924c4c9a662d3cd80dd497e17bae47d588267d
Author: Franck Villaume <[email protected]>
Date:   Sun Dec 25 20:32:36 2016 +0100

    support form HTML attribute

diff --git a/src/common/include/FFObject.class.php 
b/src/common/include/FFObject.class.php
index 15e70f1..dba3b72 100644
--- a/src/common/include/FFObject.class.php
+++ b/src/common/include/FFObject.class.php
@@ -369,15 +369,19 @@ class FFObject extends FFError {
                return $content;
        }
 
-       function showAddAssociations($url = false) {
+       function showAddAssociations($url = false, $formid = false) {
                global $HTML;
                $content = html_ao('span', array()). _('Add new associate 
object')._(':');
+               $attrs = array();
+               if ($formid) {
+                       $attrs['form'] = $formid;
+               }
                if ($url !== false) {
-                       $content .= $HTML->openForm(array('action' => $url, 
'method' => 'post'));
+                       $content .= $HTML->openForm(array_merge($attrs, 
array('action' => $url, 'method' => 'post')));
                }
-               $content .= html_e('input', array('type' => 'text', 'value' => 
'', 'name' => 'newobjectsassociation', 'title' => _('Use standard reference 
such #nnn, Dnnn, to add object association. Comma separated')));
+               $content .= html_e('input', array_merge($attrs, array('type' => 
'text', 'value' => '', 'name' => 'newobjectsassociation', 'title' => _('Use 
standard reference such #nnn, Dnnn, to add object association. Comma 
separated'))));
                if ($url !== false) {
-                       $content .= html_e('input', array('type' => 'submit', 
'value' => _('Add')));
+                       $content .= html_e('input', array_merge($attrs, 
array('type' => 'submit', 'value' => _('Add'))));
                        $content .= $HTML->closeForm();
                }
                $content .= html_ac(html_ap() -1);

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

Summary of changes:
 src/common/include/FFObject.class.php                  | 12 ++++++++----
 src/common/tracker/actions/widget_artifact_display.php | 12 ++++++------
 src/common/tracker/include/ArtifactHtml.class.php      |  4 ++--
 src/common/tracker/include/ArtifactTypeHtml.class.php  | 10 +++++-----
 src/common/widget/Widget_TrackerComment.class.php      | 10 +++++-----
 src/common/widget/Widget_TrackerContent.class.php      |  4 ++--
 src/common/widget/Widget_TrackerMain.class.php         | 16 ++++++++--------
 src/common/widget/Widget_TrackerSummary.class.php      |  8 ++++----
 8 files changed, 40 insertions(+), 36 deletions(-)


hooks/post-receive
-- 
FusionForge

_______________________________________________
Fusionforge-commits mailing list
[email protected]
http://lists.fusionforge.org/cgi-bin/mailman/listinfo/fusionforge-commits

Reply via email to