CMS MADE SIMPLE FORGE

MC Factory

 

[#8589] not work filter in admin area for select

avatar
Created By: Maxim (max_rip)
Date Submitted: Sat Oct 27 05:20:13 -0400 2012

Assigned To:
Version: None
CMSMS Version: None
Severity: Major
Resolution: Fixed
State: Closed
Summary:
not work filter in admin area for select
Detailed Description:
If you select only one of the filters, the issue will be empty.
This is due to the fact that the default is <option value=0>
Diff which is correct for the file MCFModuleObjectBase.class.php.tpl

*** MCFModuleObjectBase.class.php.tpl.or<------>2012-10-27 12:11:18.000000000
+0300
--- MCFModuleObjectBase.class.php.tpl<->2012-10-27 12:11:40.000000000 +0300
***************
*** 1304,1310 ****
            }
            $form->setWidget('moduleFilters[{{$field.name}}]', 'select', array(
              'values' =>.
!                 array(0 => '&laquo; {{$field.label}} &raquo;') +
                  $items
                ,
                'label' => '',
--- 1304,1310 ----
            }
            $form->setWidget('moduleFilters[{{$field.name}}]', 'select', array(
              'values' =>.
!                 array('' => '&laquo; {{$field.label}} &raquo;') +
                  $items
                ,
                'label' => '',
***************
*** 1313,1319 ****
          {{elseif $field.form_type == 'select'}}
            $form->setWidget('moduleFilters[{{$field.name}}]', 'select', array(
              'values' =>.
!                 array(0 => '&laquo; {{$field.label}} &raquo;') +
                  {{$module->getModuleName()}}Object::${{$field.name}}_options
                ,
                'label' => '',
--- 1313,1319 ----
          {{elseif $field.form_type == 'select'}}
            $form->setWidget('moduleFilters[{{$field.name}}]', 'select', array(
              'values' =>.
!                 array('' => '&laquo; {{$field.label}} &raquo;') +
                  {{$module->getModuleName()}}Object::${{$field.name}}_options
                ,
                'label' => '',


History

Comments
avatar
Date: 2012-10-27 05:26
Posted By: Maxim (max_rip)

not work when
values:0=>status 1,1=>status 2;
      
avatar
Date: 2013-06-27 12:55
Posted By: Jean-Christophe Cuvelier (totophe)

Thanks, this has been fixed in version 3.4.18+
      
Updates

Updated: 2013-06-27 12:55
resolution_id: 5 => 7
cmsms_version_id: 29828 => -1
state: Open => Closed

Updated: 2012-10-27 05:26
resolution_id: => 5