_vm-create-2.html 2.54 KB
Newer Older
1
{% load crispy_forms_tags %}
2
{% load i18n %}
3 4
{% load sizefieldtags %}

5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
{% include "display-form-errors.html" with form=vm_create_form %}
<form method="POST">
{% csrf_token %}

{{ vm_create_form.template }}

<div class="row">
  <div class="col-sm-12">
    <div class="form-group">
      <button id="vm-create-customized-start" class="btn btn-success"
        style="float: right; margin-top: 24px;">
        <i class="fa fa-play"></i>
        {% trans "Start" %}
      </button>
      <label>{% trans "Name" %}*</label>
      {{ vm_create_form.name }}
    </div>
  </div>
</div>

25 26
{% if perms.vm.set_resources %}
{{ vm_create_form.customized }}
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70
<div class="row">
  <div class="col-sm-10">
    <div class="form-group">
      <label>{% trans "Amount" %}*</label>
      {{ vm_create_form.amount }}
    </div>
  </div>
</div>

<div class="row">
  <div class="col-sm-12">
    <h2>{% trans "Resources" %}</h2>
  </div>
</div>

<!-- resources -->
<div class="resources-sliders" style="max-width: 720px;">
{% include "dashboard/_resources-sliders.html" with field_priority=vm_create_form.cpu_priority field_num_cores=vm_create_form.cpu_count field_ram_size=vm_create_form.ram_size %}
</div>

<div class="row">
  <div class="col-sm-4">
    <h2>{% trans "Disks" %}</h2>
  </div>
  <div class="col-sm-8">
    <div class="js-hidden">
      {{ vm_create_form.disks }} 
    </div>
    <div class="no-js-hidden">
      <h3 id="vm-create-disk-list">{% trans "No disks are added." %}</h3>
      <div style="clear: both;"></div>
    </div>
  </div>
</div>


<div class="row">
  <div class="col-sm-4">
    <h2>{% trans "Network" %}</h2>
  </div>
  <div class="col-sm-8" style="padding-top: 3px;">
    <div class="js-hidden" style="padding-top: 15px; max-width: 450px;">
      {{ vm_create_form.networks }}
    </div>
Kálmán Viktor committed
71
    <div class="no-js-hidden">
72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88
      <h3 id="vm-create-network-list">
        {% trans "Not added to any network." %}
      </h3>
      <h3 id="vm-create-network-add">
        <div class="input-group" style="max-width: 330px;">
          <select class="form-control font-awesome-font" id="vm-create-network-add-select">
          </select>
          <div class="input-group-btn">
            <a id="vm-create-network-add-button" class="btn btn-success">
              <i class="fa fa-plus-circle"></i>
            </a>
          </div><!-- .input-group-btn -->
        </div><!-- .input-group -->
      </h3><!-- #vm-create-network-add -->
    </div><!-- .no-js-hidden -->
  </div><!-- .col-sm-8 -->
</div><!-- .row -->
89
{% endif %}
90 91 92 93 94 95 96

</form>
<script>
try {
  vmCustomizeLoaded();
} catch(e) {}
</script>