fixed errors in autocomplete field

This commit is contained in:
daniel 2017-09-05 12:35:21 +02:00
parent e04d3186f2
commit 4430a7b2fe
2 changed files with 9 additions and 1 deletions

View File

@ -263,6 +263,7 @@ $params['hidden_input_idagent_value'] = $id_parent;
$params['value'] = db_get_value ("alias","tagente","id_agente",$id_parent); $params['value'] = db_get_value ("alias","tagente","id_agente",$id_parent);
$params['selectbox_id'] = 'cascade_protection_module'; $params['selectbox_id'] = 'cascade_protection_module';
$params['javascript_is_function_select'] = true; $params['javascript_is_function_select'] = true;
$params['cascade_protection'] = true;
$table->data[3][1] = ui_print_agent_autocomplete_input($params); $table->data[3][1] = ui_print_agent_autocomplete_input($params);

View File

@ -2951,6 +2951,11 @@ function ui_print_agent_autocomplete_input($parameters) {
if (isset($parameters['from_wux'])) { if (isset($parameters['from_wux'])) {
$from_wux_transaction = $parameters['from_wux']; $from_wux_transaction = $parameters['from_wux'];
} }
$cascade_protection = false; //Default value
if (isset($parameters['cascade_protection'])) {
$cascade_protection = $parameters['cascade_protection'];
}
$metaconsole_enabled = false; //Default value $metaconsole_enabled = false; //Default value
if (isset($parameters['metaconsole_enabled'])) { if (isset($parameters['metaconsole_enabled'])) {
@ -3149,7 +3154,9 @@ function ui_print_agent_autocomplete_input($parameters) {
.append ($("<option></option>") .append ($("<option></option>")
.attr("value", val["id_agente_modulo"]).text (s)); .attr("value", val["id_agente_modulo"]).text (s));
}); });
if('. (int)$cascade_protection .' == 0){
$("#' . $selectbox_id . '").enable();
}
$("#' . $selectbox_id . '").fadeIn ("normal"); $("#' . $selectbox_id . '").fadeIn ("normal");
} }
}); });