CavalloComm Posted February 6, 2012 Share Posted February 6, 2012 I have made a new ticket status called "Closed-Locked" which means it's already been billed out, and the ticket should not be re-opened. I know they could still do it by responding to it in email, but at least as a help, does anyone know how to modify the ticket view template just a bit to take out the buttons that say "Close" and "Reply" when the ticket is in that status? 0 Quote Link to comment Share on other sites More sharing options...
Damo Posted February 6, 2012 Share Posted February 6, 2012 You could add a conditional statement around the Close and Reply options so that when that is status is active they do not get displayed. 0 Quote Link to comment Share on other sites More sharing options...
CavalloComm Posted February 7, 2012 Author Share Posted February 7, 2012 RIght, I figured, but I am looking for an example- still learning my way around PHP, if you have one, I would Appreciate it. 0 Quote Link to comment Share on other sites More sharing options...
CavalloComm Posted February 14, 2012 Author Share Posted February 14, 2012 Anybody have a small example? 0 Quote Link to comment Share on other sites More sharing options...
Damo Posted February 14, 2012 Share Posted February 14, 2012 Something like (untested) this: {if $status neq 'closed-locked'} <input type="button" value="Reply" class="btn primary" onclick="jQuery('#replycont').slideToggle()" /> {/if} replacing <input type="button" value="Reply" class="btn primary" onclick="jQuery('#replycont').slideToggle()" /> at around line 56 in viewticket.tpl of your selected theme. 0 Quote Link to comment Share on other sites More sharing options...
CavalloComm Posted February 26, 2012 Author Share Posted February 26, 2012 Thank you! I will test it today! 0 Quote Link to comment Share on other sites More sharing options...
RFEHosting Posted February 27, 2012 Share Posted February 27, 2012 Thank you! I will test it today! The only problem with that, is if you allow tickets to be replied to via email, it can still be reopened. 0 Quote Link to comment Share on other sites More sharing options...
Damo Posted February 27, 2012 Share Posted February 27, 2012 I know they could still do it by responding to it in email, but ... This was already mentioned in the OP. 0 Quote Link to comment Share on other sites More sharing options...
CavalloComm Posted March 6, 2012 Author Share Posted March 6, 2012 Bizarre but this did not work for me even though it makes sense. Unless it's not looking for 'closed-locked' propery and perhaps looking for a status number? 0 Quote Link to comment Share on other sites More sharing options...
Damo Posted March 7, 2012 Share Posted March 7, 2012 After checking it out it I can see why it doesn't work. $status contains HTML formatting as well. Replace the line with the following: {if $status|strip_tags|replace:' ':'' neq 'closed-locked'} The forum code display is adding extra spaces. It should be: {if $status|strip_tags|replace:' ':'' neq 'closed-locked'} 0 Quote Link to comment Share on other sites More sharing options...
Damo Posted March 7, 2012 Share Posted March 7, 2012 BradsfordSil are you trying to get your post count up? How about you actually read the entire thread before making a comment. The code posted is actually just that - a conditional statement around the buttons. 0 Quote Link to comment Share on other sites More sharing options...
CavalloComm Posted March 7, 2012 Author Share Posted March 7, 2012 Ah that must be I could never get this to work in emails either! Thansk! 0 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.