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

Hide password custom fields data in agent custom fileds section - #2030

See merge request artica/pandorafms!1362
This commit is contained in:
vgilc 2018-03-22 10:13:33 +01:00
commit 6fd44faad1
1 changed files with 12 additions and 9 deletions

View File

@ -78,19 +78,22 @@ else {
$data[1] = html_print_image('images/delete.png', true);
}
$custom_value = db_get_value_filter('description',
'tagent_custom_data', array(
'id_field' => $field['id_field'],
'id_agent' => $id_agente));
if ($custom_value === false || $custom_value == '') {
$custom_value = '<i>-'.__('empty').'-</i>';
$custom_value = db_get_all_rows_sql("select tagent_custom_data.description,tagent_custom_fields.is_password_type from tagent_custom_fields
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);
if ($custom_value[0]['description'] === false || $custom_value[0]['description'] == '') {
$custom_value[0]['description'] = '<i>-'.__('empty').'-</i>';
}
else {
$custom_value = ui_bbcode_to_html($custom_value);
$custom_value[0]['description'] = ui_bbcode_to_html($custom_value[0]['description']);
}
$data[2] = $custom_value;
if($custom_value[0]['is_password_type']){
$data[2] = '&bull;&bull;&bull;&bull;&bull;&bull;&bull;&bull;';
}
else{
$data[2] = $custom_value[0]['description'];
}
array_push ($table->data, $data);
}