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  1098d7d8824b895744c3dd3fab8ad89fbf2d7747 (commit)
      from  63b790a66c4142b9efa06847517537f9129605fc (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=1098d7d8824b895744c3dd3fab8ad89fbf2d7747

commit 1098d7d8824b895744c3dd3fab8ad89fbf2d7747
Author: Stéphane-Eymeric Bredthauer <[email protected]>
Date:   Sun Sep 25 13:28:18 2016 +0200

    Tracker: Integer type improvements

diff --git a/src/common/tracker/include/ArtifactTypeHtml.class.php 
b/src/common/tracker/include/ArtifactTypeHtml.class.php
index 78ec6c8..2305b6a 100644
--- a/src/common/tracker/include/ArtifactTypeHtml.class.php
+++ b/src/common/tracker/include/ArtifactTypeHtml.class.php
@@ -294,7 +294,11 @@ class ArtifactTypeHtml extends ArtifactType {
                                if (!empty($efarr[$i]['pattern'])) {
                                        $attrs['pattern'] = 
$efarr[$i]['pattern'];
                                }
-                               $str = 
$this->renderTextField($efarr[$i]['extra_field_id'],$selected[$efarr[$i]['extra_field_id']],$efarr[$i]['attribute1'],$efarr[$i]['attribute2'],
 $attrs);
+                               if ($efarr[$i]['field_type'] == 
ARTIFACT_EXTRAFIELDTYPE_TEXT) {
+                                       $str = 
$this->renderTextField($efarr[$i]['extra_field_id'],$selected[$efarr[$i]['extra_field_id']],$efarr[$i]['attribute1'],$efarr[$i]['attribute2'],
 $attrs);
+                               } else {
+                                       $str = 
$this->renderIntegerField($efarr[$i]['extra_field_id'],$selected[$efarr[$i]['extra_field_id']],$efarr[$i]['attribute1'],$efarr[$i]['attribute2'],
 $attrs);
+                               }
                                if ($mode == 'QUERY') {
                                        $post_name =  ' <i>'._('(%% for 
wildcards)').'</i>&nbsp;&nbsp;&nbsp;';
                                }
@@ -939,6 +943,20 @@ EOS;
        }
 
        /**
+        * renderIntegerField - this function builds a text field.
+        *
+        * @param       int     $extra_field_id The ID of this field.
+        * @param       string  $contents       The data for this field.
+        * @param       string  $size
+        * @param       string  $maxlength
+        * @param       array   $attrs          Array of other attributes
+        * @return      string  HTML code of corresponding input tag.
+        */
+       function renderIntegerField ($extra_field_id, $contents, $size, 
$maxlength, $attrs = array()) {
+               return html_e('input', array_merge(array('type'=>'number', 
'name'=>'extra_fields['.$extra_field_id.']', 'value'=>$contents, 'size'=>$size, 
'maxlength'=>$maxlength, 'min'=>0), $attrs));
+       }
+
+       /**
         * renderRelationField - this function builds a relation field.
         *
         * @param       int     $extra_field_id The ID of this field.

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

Summary of changes:
 .../tracker/include/ArtifactTypeHtml.class.php       | 20 +++++++++++++++++++-
 1 file changed, 19 insertions(+), 1 deletion(-)


hooks/post-receive
-- 
FusionForge

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

Reply via email to