Skip to content

Commit

Permalink
Control the patient delete button with a global entry, defaults to off
Browse files Browse the repository at this point in the history
set default to off
  • Loading branch information
teryhill authored and yehster committed Apr 27, 2016
1 parent 2cc78e9 commit 43c0e8e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion interface/patient_file/summary/demographics.php
Original file line number Diff line number Diff line change
Expand Up @@ -519,7 +519,7 @@ function setMyPatient() {
htmlspecialchars(getPatientName($pid),ENT_NOQUOTES) .
"</span></td>";

if (acl_check('admin', 'super')) {
if (acl_check('admin', 'super') && $GLOBALS['allow_pat_delete']) {
echo "<td style='padding-left:1em;'><a class='css_button iframe' href='../deleter.php?patient=" .
htmlspecialchars($pid,ENT_QUOTES) . "' onclick='top.restoreSession()'>" .
"<span>".htmlspecialchars(xl('Delete'),ENT_NOQUOTES).
Expand Down
10 changes: 9 additions & 1 deletion library/globals.inc.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php
<?php
// Copyright (C) 2010-2015 Rod Roark <[email protected]>
//
// This program is free software; you can redistribute it and/or
Expand Down Expand Up @@ -743,6 +743,14 @@
xl('Enable amendments feature')
),

'allow_pat_delete' => array(
xl('Allow Administrators to Delete Patients'),
'bool', // data type
'0', // default = false
xl('Allow Administrators to Delete Patients')

),

),
// Report Tab
//
Expand Down

0 comments on commit 43c0e8e

Please sign in to comment.