mirror of
https://github.com/opensourcepos/opensourcepos.git
synced 2026-05-07 15:23:50 -04:00
Fix dropdown preselection on edit (#68)
This commit is contained in:
@@ -408,7 +408,7 @@ class Items extends Secure_Controller
|
||||
if ($definition_value['definition_type'] == DROPDOWN)
|
||||
{
|
||||
$values['values'] = $this->Attribute->get_definition_values($definition_id);
|
||||
$values['selected_value'] = $this->Attribute->get_link_value($item_id, $definition_id);
|
||||
$values['selected_value'] = $this->Attribute->get_link_value($item_id, $definition_id)->attribute_id;
|
||||
}
|
||||
|
||||
if (!empty($definition_ids[$definition_id]))
|
||||
|
||||
@@ -33,7 +33,7 @@ foreach($definition_values as $definition_id => $definition_value)
|
||||
}
|
||||
else if ($definition_value['definition_type'] == DROPDOWN)
|
||||
{
|
||||
$selected_value = empty($selected_value) ? $definition_value['selected_value'] : $selected_value->attribute_id;
|
||||
$selected_value = $definition_value['selected_value'];
|
||||
echo form_dropdown("attribute_links[$definition_id]", $definition_value['values'], $selected_value, "class='form-control' data-definition-id='$definition_id'");
|
||||
}
|
||||
else if ($definition_value['definition_type'] == TEXT)
|
||||
|
||||
Reference in New Issue
Block a user