{% load static %} 
{% include "header.html" %}
{% include "navigation.html" with main_path='/main/' %}

<br/>
<br/>

<div class="container">
  <div class="dashboard">
    <div class="span8 offset2">
      <h1>Add container</h1> 
      <hr>

      {% if not data.added %}

          <h3>Configure the new container.</h3> 
          
          <br/>
          
          <form action="#" method="POST">
          {% csrf_token %}

          <table class="dashboard" style="max-width:430px">

           <tr>
            <td><b>Name</b></td>
            <td>
             <input type="text" name="container_name" value="" placeholder="" size="23" required />
            </td>
           </tr>
    
           <tr>
            <td><b>Type</b></td><td>
              <select name="container_type" >
              <option value="docker" selected>Docker</option>
              <option value="singularity">Singularity</option>
              </select>
            </td>
           </tr>

           <tr>
            <td><b>Registry</b></td><td>
              <select name="container_registry" >
              <option value="docker_hub">Docker Hub</option>
              <option value="singularity_hub">Singularity Hub</option>
              </select>
            </td>
           </tr>

           <tr>
            <td><b>Image:tag</b></td>
            <td>
             <input type="text" name="container_image" value="" placeholder="" size="23" required />
            </td>
           </tr>

           <tr>
            <td><b>Protocol</b></td>
            <td>
             <select name="container_protocol" id="cars">
              <option value="http" selected>http</option>
              <option value="https">https</option>
             </select>
            </td>
           </tr>
   
           <tr>
            <td colspan=2><b>Default port(s)</b>
             &nbsp; &nbsp;<input type="text" name="container_ports" value="" placeholder="" size="5" />
            </td>
           </tr>

           <tr>
            <td colspan=2>
             <b>Supports dynamic ports</b> &nbsp; 
             <input type="checkbox" name="container_supports_dynamic_ports" value="True" />
            </td>
           </tr>

           <tr>
            <td colspan=2>
             <b>Supports user auth</b> &nbsp; 
             <input type="checkbox" name="container_supports_user_auth" value="True" />
            </td>
           </tr>

           <tr>
            <td colspan=2>
             <b>Supports pass auth</b> &nbsp; 
             <input type="checkbox" name="container_supports_pass_auth" value="True" />
            </td>
           </tr>


           <tr>
           <td colspan=2 align=center style="padding:20px">
           <input type="submit" value="Add">
           </td>
           </tr>
          </table>
          </form>

          <br/>          
          <br/>
          <br/>
          <br/>
          <br/>
          <br/>
          <br/>
          <br/>
          <br/>
          



 
      {% else %}
        Ok, Container added. Go back to your <a href="/containers">container list</a>.
        

      {% endif %} 
  
      <br/>
      <br/>
      <br/>
      <br/>
      <br/>
      <br/>
      
    </div>
  </div>
</div>

{% include "footer.html" %}






