コード例 #1
0
 function pre_show_form()
 {
     $e = new entity($this->get_value('id'));
     if ($e->get_value('state') == 'Deleted') {
         $action = 'expunge';
         $noun = 'expungement';
     } else {
         $action = 'delete';
         $noun = 'deletion';
     }
     $name = $e->get_value("name");
     if (!$name) {
         $name = "<i>(untitled)</i>";
     }
     echo "<h3>Do you really want to {$action} {$name}?</h3>";
     if ($e->field_has_lock('state') && reason_user_has_privs($this->admin_page->user_id, 'manage_locks')) {
         echo '<div class="lockNotice"><img class="lockIndicator" src="' . REASON_HTTP_BASE_PATH . 'ui_images/lock_12px_grey_trans.png" alt="locked" width="12" height="12" /> Note: ' . $noun . ' is locked for some users.</div>';
     }
 }