{if $error}

	<div class="notice notice-error">
		<div class="inside">
			<p>{$LANG.supportticketinvalid}</p>
		</div>
	</div>

{elseif $stillopen}

	<div class="notice notice-error">
		<div class="inside">
			<p>{$LANG.erroroccured}</p>
		</div>
	</div>

<p class="center">{$LANG.feedbackclosed}</p>

{elseif $feedbackdone}

	<div class="notice notice-success">
		<div class="inside">
			<p>{$LANG.feedbackprovided}</p>
		</div>
	</div>
	
<p>{$LANG.feedbackthankyou}</p>

{elseif $success}

	<div class="notice notice-success">
		<div class="inside">
			<p>{$LANG.feedbackreceived}</p>
		</div>
	</div>

<p>{$LANG.feedbackthankyou}</p>

{else}

{if $errormessage}

	<div class="notice notice-error">
		<div class="inside">
			<p>{$LANG.clientareaerrors} {$errormessage}</p>
		</div>
	</div>

{/if}

<p>{$LANG.feedbackdesc}</p>

	<div class="notice notice-info">
		<div class="inside">
			<p><a href="viewticket.php?tid={$tid}&c={$c}">{$LANG.feedbackclickreview}</a></p>
		</div>
	</div>


<div class="table-responsive table-grey">
<table>
          <tr>
            <td width="20%">{$LANG.feedbackopenedat}:</td>
            <td>{$opened}</td>
          </tr>
          <tr>
            <td>{$LANG.feedbacklastreplied}:</td>
            <td>{$lastreply}</td>
          </tr>
          <tr>
            <td>{$LANG.feedbackstaffinvolved}:</td>
            <td>{foreach from=$staffinvolved item=staff}{$staff}, {foreachelse}{$LANG.none}{/foreach}</td>
          </tr>
          <tr>
            <td>{$LANG.feedbacktotalduration}:</td>
            <td>{$duration}</td>
          </tr>
      </table>
      </div>

<form method="post" action="{$smarty.server.PHP_SELF}?tid={$tid}&c={$c}&feedback=1">
<input type="hidden" name="validate" value="true" />

{foreach from=$staffinvolved key=staffid item=staff}


		<div class="feildset">
		
			<div class="col1">
			
				<div>
					<label>
						<span>{$LANG.feedbackpleaserate1} <strong>{$staff}</strong> {$LANG.feedbackhandled}:</span>
							<select name="rate[{$staffid}]">
    {foreach from=$ratings item=rating}
    <option value="{$rating}">{$rating}{if $rating eq "1"} - Lowest{/if}{if $rating eq "10"} - Highest{/if}</option>
    {/foreach}
    </select>
					</label>
				</div>
				
				
				<div>
					<label>
						<span>{$LANG.feedbackpleasecomment1} <strong>{$staff}</strong> {$LANG.feedbackhandled}</span>
						<textarea name="comments[{$staffid}]" placeholder="{$LANG.ticketfeedback_howwell}">{$comments.$staffid}</textarea>
					</label>
				</div>
				
			</div>
			
		</div>	


{/foreach}


		<div class="feildset">
		
			<div class="col1">


				<div>
					<label>
						<span>{$LANG.feedbackimprove}</span>
						<textarea name="comments[generic]" placeholder="{$LANG.ticketfeedback_feedback}">{$comments.generic}</textarea>
					</label>
				</div>



</div>

</div>


  <p class="center">
    <input type="submit" value="{$LANG.clientareasavechanges}" class="button1 color2" />
    <input type="reset" value="{$LANG.cancel}" class="button1 color1" />
  </p>

</form>

{literal}
<style>
.ticketfeedbackstaffcont {
    margin: 10px auto;
    padding: 15px;
    text-align: center;
    background-color: #efefef;
    -moz-border-radius: 6px;
    -webkit-border-radius: 6px;
    -o-border-radius: 6px;
    border-radius: 6px;
}
.ticketfeedbackrating {
    padding: 0;
}
.ticketfeedbackrating .rate {
    float: left;
    padding: 0 10px;
    min-width: 30px;
    text-align: center;
}

</style>
{/literal}

{/if}