mirror of
https://github.com/opensourcepos/opensourcepos.git
synced 2026-05-24 08:20:54 -04:00
Fix attribute visibility view if none selected (#2485)
This commit is contained in:
@@ -131,7 +131,7 @@ class Attributes extends Secure_Controller
|
||||
$definition_flag_names = array();
|
||||
foreach (Attribute::get_definition_flags() as $id => $term)
|
||||
{
|
||||
if (empty($definition_flags) || ($id & $definition_flags))
|
||||
if ($id & $definition_flags)
|
||||
{
|
||||
$definition_flag_names[$id] = $this->lang->line('attributes_' . strtolower($term) . '_visibility');
|
||||
}
|
||||
@@ -153,7 +153,8 @@ class Attributes extends Secure_Controller
|
||||
$data['definition_group'][''] = $this->lang->line('common_none_selected_text');
|
||||
$data['definition_info'] = $info;
|
||||
|
||||
$data['definition_flags'] = $this->_get_attributes();
|
||||
$show_all = Attribute::SHOW_IN_ITEMS | Attribute::SHOW_IN_RECEIVINGS | Attribute::SHOW_IN_SALES;
|
||||
$data['definition_flags'] = $this->_get_attributes($show_all);
|
||||
$data['selected_definition_flags'] = $this->_get_attributes($info->definition_flags);
|
||||
|
||||
$this->load->view("attributes/form", $data);
|
||||
|
||||
Reference in New Issue
Block a user