MantisBT - v3.0 Release
View Issue Details
0001037v3.0 Release[All Projects] Generalpublic2011-12-17 12:362013-08-28 11:21
Reporterproject_manager 
Assigned Tocaseydk 
PrioritynormalSeverityblockReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version3.0.0 
Summary0001037: in Tasks\"tasks per user": Non-functioning of checkboxes.
Descriptionin ALL versions (2.3.1...)

There is a syntax mistake by handling "string" values of the html-code (checkboxes) and the required "integer" values in programm code. That leads to a wrong handling (not using) of the checkbox informations.

The checkboxes kept now "checked" after a run.

I enclosed a bug-fixed version.
Additional Information--------------------------------------------------------
change in:

..\modules\tasks\tasksperuser_sub.php

version:
/* $Id: tasksperuser_sub.php 1966 2011-07-03 22:38:52Z caseydk

------------------------------------------------------------------------
//$use_period = (int) w2PgetParam($_POST, 'use_period', 1);
$use_period = w2PgetParam($_POST, 'use_period', 'off');
$show_orphaned = w2PgetParam($_POST, 'show_orphaned', 'off');
//$display_week_hours = (int) w2PgetParam($_POST, 'display_week_hours', 0);
$display_week_hours = w2PgetParam($_POST, 'display_week_hours', 'off');
---------------------------------------------------------------------
and
--------------------------------------------------------------------
<!-- <input type="checkbox" name="display_week_hours" id="display_week_hours" <?php if ($display_week_hours) { echo 'checked="checked"'; } ?> /> -->
        <input type="checkbox" name="display_week_hours" id="display_week_hours" <?php if ($display_week_hours == 'on') { echo 'checked="checked"'; } ?> />
        <label for="display_week_hours"><?php echo $AppUI->_('Display allocated hours/week'); ?></label>

        
<!-- <input type="checkbox" name="use_period" id="use_period" <?php if ($use_period) { echo 'checked="checked"'; } ?> /> -->
          <input type="checkbox" name="use_period" id="use_period" <?php if ($use_period == 'on') { echo 'checked="checked"'; } ?> />
              <label for="use_period"><?php echo $AppUI->_('Use the period'); ?></label>
               
        <?php
                if ($use_period == 'on') $use_period = 1;
                else $use_period = 0;
                if ($display_week_hours == 'on') $display_week_hours = 1;
                else $display_week_hours = 0;
         ?>
 
--------------------------------------------------------------------------

TagsNo tags attached.
Attached Files? tasksperuser_sub.php (23,339) 1969-12-31 16:00
https://bugs.web2project.net/file_download.php?file_id=310&type=bug

Notes
(0002360)
caseydk   
2011-12-22 21:01   
Resolved in r2261

Issue History
2011-12-17 12:36project_managerNew Issue
2011-12-17 12:36project_managerFile Added: tasksperuser_sub.php
2011-12-22 21:01caseydkNote Added: 0002360
2011-12-22 21:01caseydkStatusnew => resolved
2011-12-22 21:01caseydkResolutionopen => fixed
2011-12-22 21:01caseydkAssigned To => caseydk
2013-08-28 11:14caseydkFixed in Version => 3.0.0
2013-08-28 11:21caseydkStatusresolved => closed