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, 6.1 has been updated
       via  84aaa99c50860b2c3b9ea7c8274708ad05fe6751 (commit)
      from  2fdd979b25b924b68a3c38233a456be16db205c7 (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=84aaa99c50860b2c3b9ea7c8274708ad05fe6751

commit 84aaa99c50860b2c3b9ea7c8274708ad05fe6751
Author: Franck Villaume <[email protected]>
Date:   Sun Apr 29 17:29:17 2018 +0200

    tracker widget: handle the required & hiddenOnSubmit custom field

diff --git a/src/common/widget/Widget_TrackerContent.class.php 
b/src/common/widget/Widget_TrackerContent.class.php
index 3dae4d4..ff192c7 100644
--- a/src/common/widget/Widget_TrackerContent.class.php
+++ b/src/common/widget/Widget_TrackerContent.class.php
@@ -2,7 +2,7 @@
 /**
  * Generic Tracker Content Widget Class
  *
- * Copyright 2016,2017, Franck Villaume - TrivialDev
+ * Copyright 2016-2018, Franck Villaume - TrivialDev
  * Copyright 2017, Stephane-Eymeric Bredthauer - TrivialDev
  * http://fusionforge.org
  *
@@ -669,7 +669,20 @@ EOS;
                                                                        break;
                                                        }
                                                } else {
-                                                       $cellContent = '&nbsp';
+                                                       if 
($extrafieldObject->isRequired()) {
+                                                               switch 
($extrafieldObject->getType()) {
+                                                                       case 
ARTIFACT_EXTRAFIELDTYPE_MULTISELECT:
+                                                                               
$defaultValues = $extrafieldObject->getDefaultValues();
+                                                                               
foreach ($defaultValues as $defaultValue) {
+                                                                               
        $cellContent .= html_e('input', array('type' => 'hidden', 'value' => 
$defaultValue, 'name' => 'extra_fields['.$extrafieldObject->getID().'][]', 
'form' => 'trackerform'));
+                                                                               
}
+                                                                               
break;
+                                                                       default:
+                                                                               
$cellContent .= html_e('input', array('type' => 'hidden', 'value' => 
$extrafieldObject->getDefaultValues(), 'name' => 
'extra_fields['.$extrafieldObject->getID().']', 'form' => 'trackerform'));
+                                                               }
+                                                       } else {
+                                                               $cellContent .= 
'&nbsp';
+                                                       }
                                                }
                                        } else {
                                                $cellContent = '&nbsp;';

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

Summary of changes:
 src/common/widget/Widget_TrackerContent.class.php | 17 +++++++++++++++--
 1 file changed, 15 insertions(+), 2 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