{% 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>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_local" selected>Local</option>
              <option value="docker_hub">Docker Hub</option>
              <option value="singularityhub">Singularity Hub</option>
              </select>
            </td>
           </tr>

           <tr>
            <td><b>Container image</b></td>
            <td>
             <input type="text" name="container_image" value="" placeholder="" size="23" required />
            </td>
           </tr>

           <tr>
            <td><b>Service port(s)</b></td>
            <td>
             <input type="text" name="container_service_ports" value="" placeholder="" size="5" required />
            </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="/tasks">tasks list</a>.
        

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

{% include "footer.html" %}






