- Edited
Hi all,I got headache today. My boss request me to make priority only enable for administrator but disable for user and staff. I'm blank now.I know there have builtin priority list in Admin > Manage > Custom Form > Ticket Details. I try to create isAdmin in class.form.php but error on non-object appear. Here is my code:-class ChoicesWidget extends Widget {function render($mode=false) {...<span style="display-block"> <?php if ($thisstaff->isAdmin()) { ?> <select name="<?php echo $this->name; ?>" disabled="disabled"> <?php } if (!$thisstaff->isAdmin()) { ?> <select name="<?php echo $this->name; ?>"> <?php }?> <?php if (!$have_def) { ?> <option value="<?php echo $def_key; ?>">— <?php echo $def_val; ?> —</option> <?php } foreach ($choices as $key=>$name) { if (!$have_def && $key == $def_key) continue; ?> <option value="<?php echo $key; ?>" <?php if ($value == $key) echo 'selected="selected"'; ?>><?php echo $name; ?></option> <?php } ?> </select> </span>here is my system details:-osTicket Versionv1.8.1Server SoftwareApache/2.4.4 (Win32) PHP/5.4.16PHP Version5.4.16MySQL Version5.6.12