Location: PHPKode > projects > Maian Support > maian_support/templates/create-ticket.tpl.php
<div id="wrapper">
<script type="text/javascript">
<!--
function checkform() {
  var message = '';
  if (document.getElementById('name').value=='') {
    message = '- <?php echo $this->JS[0]; ?>\n';
  }
  if (document.getElementById('ctct').value=='') {
    message +='- <?php echo $this->JS[1]; ?>\n';
  }
  if (document.getElementById('subject').value=='') {
    message +='- <?php echo $this->JS[2]; ?>\n';
  }
  if (document.getElementById('comments').value=='') {
    message +='- <?php echo $this->JS[3]; ?>\n';
  }
  <?php
  // Variable checks if spam sum is enabled..
  // Value either yes or no..
  if ($this->SUM_ENABLED=='yes') {
  ?>
  if (parseInt(document.getElementById('s1').value)+parseInt(document.getElementById('s2').value)!=parseInt(document.getElementById('sum').value)) {
    message +='- <?php echo $this->JS[4]; ?>';
  }
  <?php
  }
  ?>
  if (message) {
    alert(message);
    return false;
  }
}
-->
</script>
  
  <div id="newTicketWrapperMessage">
  
    <p class="message"><?php echo $this->TEXT[0]; ?></p>
    
  </div>
  
  <div id="newTicketWrapper">
  
  <h2><?php echo $this->TEXT[1]; ?></h2>
  
  <div class="ticketForm">
     <form method="post" action="index.php?p=ticket"<?php echo $this->MULTIPART; ?> onsubmit="return checkform()">
      <div class="boxArea">
       
       <div class="boxLeft">
        
        <label><?php echo $this->TEXT[3]; ?></label>
        <input class="box" type="text" name="name" id="name" tabindex="1" maxlength="250" value="<?php echo $this->VALUE[0]; ?>" />
        <?php echo (in_array('name',$this->E_ARRAY) ? '<span class="error">'.$this->ERRORS[0].'</span>' : ''); ?>
        
        <label><?php echo $this->TEXT[2]; ?></label>
        <select name="dept" tabindex="3">
        <?php echo $this->DEPARTMENTS; ?>
        </select>
        <?php echo (in_array('dept',$this->E_ARRAY) ? '<span class="error">'.$this->ERRORS[6].'</span>' : ''); ?>
        
        <br class="clear" />
       </div> 
       
       <div class="boxRight">
        
        <label><?php echo $this->TEXT[4]; ?></label>
        <input class="box" type="text" name="ctct" id="ctct" tabindex="2" maxlength="250" value="<?php echo $this->VALUE[1]; ?>"<?php echo $this->READONLY; ?> />
        <?php echo (in_array('ctct',$this->E_ARRAY) ? '<span class="error">'.$this->ERRORS[1].'</span>' : ''); ?>
       
        <label><?php echo $this->TEXT[5]; ?></label>
        <input class="box" type="text" name="subject" id="subject" tabindex="4" maxlength="250" value="<?php echo $this->VALUE[2]; ?>" />
        <?php echo (in_array('subject',$this->E_ARRAY) ? '<span class="error">'.$this->ERRORS[2].'</span>' : ''); ?>
        
        <br class="clear" />
       </div>
      
       <br class="clear" />
      </div>
      
      <div class="boxArea"> 
       
       <label><?php echo $this->TEXT[6]; ?></label>
       <textarea rows="12" cols="40" name="comments" id="comments" tabindex="5"><?php echo $this->VALUE[3]; ?></textarea>
       <?php echo (in_array('comments',$this->E_ARRAY) ? '<span class="error">'.$this->ERRORS[3].'</span>' : ''); ?>
       
      </div>
      
      <div class="boxArea">  
       
       <label><?php echo $this->TEXT[7]; ?></label>
       <select name="priority" tabindex="6">
        <option value="low"<?php echo $this->VALUE[4]; ?>><?php echo $this->TEXT[8]; ?></option>
        <option value="medium"<?php echo $this->VALUE[5]; ?>><?php echo $this->TEXT[9]; ?></option>
        <option value="high"<?php echo $this->VALUE[6]; ?>><?php echo $this->TEXT[10]; ?></option>
       </select>
       <?php echo (in_array('priority',$this->E_ARRAY) ? '<span class="error">'.$this->ERRORS[7].'</span>' : ''); ?>
      
      </div>
      
      <?php 
      // Displays attachments boxes if enabled..
      // templates/html/attachments.htm
      // templates/html/attachments-box.htm
      echo $this->ATTACHMENTS; 
      ?>
       
      <?php 
      // Displays spam prevention sum if enabled..
      // templates/html/spam-prevention-sum.htm
      echo $this->SHOW_SUM; 
      ?>
      
      <p class="buttonWrapper">
       <input type="hidden" name="process" value="1" />
       <input type="hidden" name="s1" id="s1" value="<?php echo $this->SUM[0]; ?>" />
       <input type="hidden" name="s2" id="s2" value="<?php echo $this->SUM[1]; ?>" />
       <input class="button" type="submit" tabindex="8" value="<?php echo $this->TEXT[11]; ?>" title="<?php echo $this->TEXT[11]; ?>" />
      </p> 
     </form>
  </div>
  
  </div>
  
</div>  

Return current item: Maian Support