Skip to content

Commit

Permalink
Merge pull request #145 from nicolas-eoxia/add_picto_contact
Browse files Browse the repository at this point in the history
#144 [Hook] add: picto before contact
  • Loading branch information
nicolas-eoxia authored Aug 24, 2023
2 parents 6afedbf + 38b791e commit c793aa3
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
10 changes: 10 additions & 0 deletions class/actions_easycrm.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,16 @@ public function printCommonFooter(array $parameters): int
<?php
}

if ($parameters['currentcontext'] == 'contactcard') {
if (in_array(GETPOST('action'), ['create', 'edit'])) {
$out = img_picto('', 'fontawesome_fa-id-card-alt_fas', 'class="pictofixedwidth"'); ?>
<script>
jQuery('#roles').before(<?php echo json_encode($out); ?>);
</script>
<?php
}
}

return 0; // or return 1 to replace standard code
}

Expand Down
3 changes: 2 additions & 1 deletion core/modules/modEasyCRM.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,8 @@ public function __construct($db)
'invoicereccontact',
'invoicereclist',
'invoicelist',
'invoicecard'
'invoicecard',
'contactcard'
],
// Set this to 1 if features of module are opened to external users
'moduleforexternal' => 0,
Expand Down

0 comments on commit c793aa3

Please sign in to comment.