Merge branch '2030-5422-Esconder-los-campos-de-tipo-password-dentro-de-los-custom-fields-del-agente-2' into 'develop'

Hide passwords fields data in treeview and events - #2030

See merge request artica/pandorafms!1392
This commit is contained in:
vgilc 2018-03-22 13:45:34 +01:00
commit 1501d8ecf5
2 changed files with 18 additions and 4 deletions

View File

@ -2042,9 +2042,17 @@ function events_page_custom_fields ($event) {
$data = array();
$data[0] = $field['name'];
$data[1] = empty($fields_data[$field['id_field']])
? '<i>'.__('N/A').'</i>'
: ui_bbcode_to_html($fields_data[$field['id_field']]);
if(empty($fields_data[$field['id_field']])){
$data[1] = '<i>'.__('N/A').'</i>';
}
else{
if($field['is_password_type']){
$data[1] = '&bull;&bull;&bull;&bull;&bull;&bull;&bull;&bull;';
}
else{
$data[1] = ui_bbcode_to_html($fields_data[$field['id_field']]);
}
}
$field['id_field'];

View File

@ -695,7 +695,13 @@ function treeview_printTable($id_agente, $server_data = array(), $no_head = fals
if (!empty($custom_value)) {
$row = array();
$row['title'] = $field['name'] . ui_print_help_tip (__('Custom field'), true);
$row['data'] = ui_bbcode_to_html($custom_value);
if($field['is_password_type']){
$row['data'] = '&bull;&bull;&bull;&bull;&bull;&bull;&bull;&bull;';
}
else{
$row['data'] = ui_bbcode_to_html($custom_value);
}
$table->data['custom_field_'.$field['id_field']] = $row;
}
}