Merge branch '2030-Esconder-los-campos-de-tipo-password-dentro-de-los-custom-fields-del-agente-4' into 'develop'
Hide password custom fields in agent view - #2030 See merge request artica/pandorafms!1399
This commit is contained in:
commit
90280fd943
|
@ -381,16 +381,23 @@ foreach ($fields as $field) {
|
||||||
$data = array();
|
$data = array();
|
||||||
$data[0] = '<b>' . $field['name'] .
|
$data[0] = '<b>' . $field['name'] .
|
||||||
ui_print_help_tip (__('Custom field'), true) . '</b>';
|
ui_print_help_tip (__('Custom field'), true) . '</b>';
|
||||||
$custom_value = db_get_value_filter(
|
$custom_value = db_get_all_rows_sql("select tagent_custom_data.description,tagent_custom_fields.is_password_type from tagent_custom_fields
|
||||||
'description', 'tagent_custom_data',
|
INNER JOIN tagent_custom_data ON tagent_custom_fields.id_field = tagent_custom_data.id_field where tagent_custom_fields.id_field = ".$field['id_field']." and tagent_custom_data.id_agent = ".$id_agente);
|
||||||
array('id_field' => $field['id_field'], 'id_agent' => $id_agente));
|
|
||||||
if ($custom_value === false || $custom_value == '') {
|
if ($custom_value[0]['description'] === false || $custom_value[0]['description'] == '') {
|
||||||
$custom_value = '<i>'.__('N/A').'</i>';
|
$custom_value[0]['description'] = '<i>-'.__('empty').'-</i>';
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$custom_value = ui_bbcode_to_html($custom_value);
|
$custom_value[0]['description'] = ui_bbcode_to_html($custom_value[0]['description']);
|
||||||
}
|
}
|
||||||
$data[1] = $custom_value;
|
|
||||||
|
if($custom_value[0]['is_password_type']){
|
||||||
|
$data[1] = '••••••••';
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$data[1] = $custom_value[0]['description'];
|
||||||
|
}
|
||||||
|
|
||||||
$table_data->data[] = $data;
|
$table_data->data[] = $data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue