{% extends 'layouts/default.html' %}
{% from 'forms/macros.html' import render_field,  render_checkbox_field %}
{% block title %}Add New Machine with ApiKey{% endblock %}
{% block content %}
  <h2>Add new ApiKey for your machine</h2>

  <div class="row">
    
    <div class="col-sm-12">
        <h6>ApiKey: {{ generated_key }}</h6>
    </div>  

  <form action="{{ action_url }}" method="POST">
  {{ form.hidden_tag() if form.hidden_tag }}
  <div class="row">
    <div class="col-smfut-5">
          {{ render_field(form.machine) }}
    </div>
    <div class="col-sm-2">
      {{ render_checkbox_field(form.readonly) }}
    </div>
    <div class="col-sm-5">
      {{ render_field(form.expires) }}
    </div>
  </div>  
   
  </div>
  <div class="row">
    <div class="col-sm-10">
      {{ render_field(form.comment) }}
    </div>

  <div class="row">
    <div class="col-sm-10">
      <button type="submit" class="btn btn-primary">Save</button>
    </div>
  </div>

{% endblock %}