{% extends "base.html" %}
{% block title %}New VM · mgf-cloud-web{% endblock %}
{% block content %}
<header class="page-header">
  <div>
    <p class="eyebrow">compute</p>
    <h1>New VM</h1>
  </div>
</header>
<div class="card" style="max-width: 540px">
  <form class="form" method="post" action="/vms">
    <div class="field">
      <label class="label" for="name">Name</label>
      <input class="input" id="name" name="name" required>
    </div>
    <div class="field">
      <label class="label" for="flavor">Flavor</label>
      <select class="select" id="flavor" name="flavor">{% for f in flavors %}<option>{{ f.name }}</option>{% endfor %}</select>
    </div>
    <div class="field">
      <label class="label" for="image">Image</label>
      <select class="select" id="image" name="image">{% for i in images %}<option>{{ i.name }}</option>{% endfor %}</select>
    </div>
    <div class="field">
      <label class="label" for="network">Network</label>
      <select class="select" id="network" name="network"><option value="">(default)</option>{% for n in networks %}<option>{{ n.name }}</option>{% endfor %}</select>
    </div>
    <label class="checkbox-row"><input type="checkbox" name="floating_ip" value="true"> Attach floating IP</label>
    <div class="form-row">
      <button class="button button-accent" type="submit">Create</button>
      <a class="button button-secondary" href="/vms">cancel</a>
    </div>
  </form>
</div>
{% endblock %}
