Colin Posted February 17, 2013 Report Share Posted February 17, 2013 Hi guys, does anyone know if there is a way so that staff members cannot accept their own PIREPS ? I've had a look around the admin center and can't see a way to be able to do it. As always any help appreciated Quote Link to comment Share on other sites More sharing options...
Strider Posted February 17, 2013 Report Share Posted February 17, 2013 you would have to add some code to do that. As of now, there is none that has been released, if even created. Quote Link to comment Share on other sites More sharing options...
Moderators Parkho Posted February 17, 2013 Moderators Report Share Posted February 17, 2013 Open pireps_list.tpl in admin/templates and look for the following button: <?php # If there was an error, don't allow the PIREP to go through if($error == false) { ?> <button href="<?php echo SITE_URL?>/admin/action.php/pirepadmin/<?php echo $load; ?>?pilotid=<?php echo $pirep->pilotid?>" action="approvepirep" id="<?php echo $pirep->pirepid;?>" class="pirepaction {button:{icons:{primary:'ui-icon-check'}}}">Accept</button> <?php } ?> Now you need to add an if statement to it like this: <?php # If there was an error, don't allow the PIREP to go through if($error == false) { if($pirep->pilotid != Auth::$userinfo->pilotid) { ?> <button href="<?php echo SITE_URL?>/admin/action.php/pirepadmin/<?php echo $load; ?>?pilotid=<?php echo $pirep->pilotid?>" action="approvepirep" id="<?php echo $pirep->pirepid;?>" class="pirepaction {button:{icons:{primary:'ui-icon-check'}}}">Accept</button> <?php } } ?> This will remove the "accept" button if the pirep belongs to the staff. Quote Link to comment Share on other sites More sharing options...
Sava Posted February 17, 2013 Report Share Posted February 17, 2013 Exactly^ Quote Link to comment Share on other sites More sharing options...
Colin Posted February 17, 2013 Author Report Share Posted February 17, 2013 Awesome thanks very much parkho Quote Link to comment Share on other sites More sharing options...
Moderators Parkho Posted February 18, 2013 Moderators Report Share Posted February 18, 2013 yw Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.