<html>
  <head>
    <title tal:content="template/title">The title</title>
  </head>
  <body tal:define="Split python:modules['string'].split;ToInt python:modules['string'].atoi;IF python:lambda a,b,c:(a and [b] or [c])[0];cert_info python:here.GetIssuedCertInfo(here.REQUEST.form['serial']);init python:IF((here.REQUEST.form.has_key('init') or here.REQUEST.form.update({'init':'0'})),ToInt(here.REQUEST.form['init']),0);status_req python:IF((here.REQUEST.form.has_key('status_req') or here.REQUEST.form.update({'status_req':[]})),here.REQUEST.form['status_req'],[]);Join python:modules['string'].join;status_url python:IF((len(status_req) == 0),'','&status_req:list='+Join(status_req,'&status_req:list='));url_certs python:'init=%d%s'%(init,status_url)">
  <link href="styles.css" rel="stylesheet" type="text/css">
  
  <script language="javascript">
    function checkReason(){
      if ((document.forms[0].reason.value == "keyCompromise") ||
          (document.forms[0].reason.value == "CACompromise")){
          document.forms[0].time.disabled = false;
      } else {
          document.forms[0].time.disabled = true;
      }
      if (document.forms[0].reason.value == "certificateHold"){
          document.forms[0].instruction.disabled = false;
      } else {
          document.forms[0].instruction.disabled = true;
      }
    }
  </script>

  <div metal:use-macro="container/index_html/macros/top" tal:omit-tag="" id="logo-sep">TOP</div>
    <!-- ###### NAVIGATION BAR ##### -->
    <div id="navigation-bar" metal:use-macro="container/index_html/macros/navigation">NAV BAR</div>
    <!-- ###### END NAVIGATION BAR ##### -->

    <!-- ###### MAIN CONTENT ##### -->
    <div id="right-bar">
     <form action="manage_revokeCertificate" method="POST">
        <input type="hidden" name="url_certs" id="url_certs" value="" tal:attributes="value python:url_certs">
        <input type="hidden" name="serial" value="1" tal:attributes="value python:cert_info['serial']">
        <table width="145px" class="table-group">
          <tr>
	    <td class="table-group-title" class="table-group-row">Revoke certificate</td>
	  </tr>
	  <tr>
	    <td class="table-group-row">Reason:</td>
	  </tr>
	  <tr>
	    <td class="table-group-row">
	      <select name="reason" size="1" onchange="javascript:checkReason();">
	        <option value="unspecified">unspecified</option>
		<option value="keyCompromise">keyCompromise</option>
		<option value="CACompromise">CACompromise</option>
		<option value="affiliationChanged">affiliationChanged</option>
		<option value="superseded">superseded</option>
		<option value="cessationOfOperation">cessationOfOperation</option>
		<option value="certificateHold">certificateHold</option>
		<option value="removeFromCRL">removeFromCRL</option>
	      </select>
	     </td>
	  </tr>
	  <tr>
	    <td class="table-group-row">Time</td>
	  </tr>
	  <tr>
	    <td class="table-group-row">
	      <input name="time" size="20" value="YYYYMMDDHHMMSSZ" disabled/>
	    </td>
	  </tr>
	  <tr>
	    <td class="table-group-row">Instruction</td>
	  </tr>
	  <tr>
	    <td class="table-group-row">
	      <select name="instruction" size="1" disabled>
	        <option value="holdInstructionNone" selected>holdInstructionNone</option>
		<option value="holdInstructionCallIssuer">holdInstructionCallIssuer</option>
		<option value="holdInstructionReject">holdInstructionReject</option>
	      </select>
	    </td>
	  </tr>
	  <tr>
	    <td align="center" class="table-group-row"><input type="submit" value=" Revoke "></td>
	  </tr>
        </table>
      </form>
    </div>
    <div id="main-content">
      <table>
	    <tr>
		  <td align="center" class="table-group-row"><a href="" tal:attributes="href python:'certs?'+url_certs">back to cert list</a></td>
	    </tr>
        <tr>
	  <td class="info-pre" >
	   <span tal:omit-tag="" tal:content="structure python:cert_info['content']"></span>
          </td>
	</tr>
      </table>
    </div>
    <!-- ###### END MAIN CONTENT ##### -->
    <!-- ###### FOOTER ##### -->
    <p metal:use-macro="container/index_html/macros/footer" id="footer-bar" align="right">
      The ñ eye <img src="logo.gif" width="34" height="18">
    </p>
    <!-- ###### END FOOTER ##### -->
    <script language="javascript">
        checkReason();
    </script>
  </body>
</html>

