Small correction in GetFieldValueByType

All ApPHP DataGrid script bugs discussion. Questions and requests here.
Please, use a $debug_mode = true; before you say "Why Nothing Works ?!" (solves 90% of all issues)

Moderator: alexandrleonenko

BlackLocust
Senior
Senior
Posts: 34
Joined: Sep 16th, '09, 23:17

Small correction in GetFieldValueByType

Postby BlackLocust » Oct 3rd, '13, 01:30

In the edit mode branch ...


case 'checkbox':
$checked = '';
$fp_true_value = $this->GetFieldProperty($field_name, 'true_value');
$fp_false_value = $this->GetFieldProperty($field_name, 'false_value');
$file_act = $this->GetVariable('file_act');
// save previous value if form was re-uploaded
if($file_act == 'upload' || $file_act == 'remove'){
if(isset($_POST[$full_field_name])) $field_value = $fp_true_value;
else $field_value = $fp_false_value;
}
if(($fp_true_value !== '') && ($fp_false_value !== '')){
if($field_value == $fp_true_value) $checked = 'checked="checked"';
}
$output = '<input class="'.$this->cssClass.'_dg_checkbox" type="checkbox" name="'.$full_field_name.'" id="'.$full_field_name.'" title="'.$this->GetFieldTitle($field_name).'" value="'.trim($field_value).'" '.$checked.' '.$disabled.' '.$on_js_event.' />';

It should use $disabled for the checkbox instead of $readonly.

Line 6718 in version 7.9.9

administrator
Site Admin
Site Admin
Posts: 5997
Joined: Jan 7th, '09, 23:18
Contact:

Re: Small correction in GetFieldValueByType

Postby administrator » Oct 3rd, '13, 07:07

Thanks! it's fixed now.
Please email us your customer ID or email address, so we could add to to your account 50 award points.
http://www.apphp.com/index.php?page=reward_program

BlackLocust
Senior
Senior
Posts: 34
Joined: Sep 16th, '09, 23:17

Re: Small correction in GetFieldValueByType

Postby BlackLocust » Oct 3rd, '13, 16:06

Thanks! My customer ID is BlackLocust.

administrator
Site Admin
Site Admin
Posts: 5997
Joined: Jan 7th, '09, 23:18
Contact:

Re: Small correction in GetFieldValueByType

Postby administrator » Oct 6th, '13, 07:10

Thanks - added 50 ward points to your account, please check.
You may redeem them on checkout page:
http://www.apphp.com/index.php?page=reward_program


Return to “ApPHP DataGrid {bugs}”