request-resource.html 1.15 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
{% extends "dashboard/base.html" %}

{% load i18n %}
{% load crispy_forms_tags %}

{% block content %}

<div class="row">
  <div class="col-md-12">
    <div class="panel panel-default">
      <div class="panel-heading">
        <h3 class="no-margin">
          <i class="fa fa-tasks"></i> {% trans "Request new resources" %}
        </h3>
      </div>
      <div class="panel-body">
        <form action="{% url "request.views.request-resource" vm_pk=vm.pk %}" method="POST">
          {% csrf_token %}
          <div class="form-group">
            <label>{% trans "Virtual machine" %}</label>
            <div class="controls">
              <a href="{{ vm.get_absolute_url }}">{{ vm.name }}</a>
            </div>
          </div>
          {% include "display-form-errors.html" %}
          {% include "dashboard/_resources-sliders.html" with field_priority=form.priority field_num_cores=form.num_cores field_ram_size=form.ram_size %}
27
          {{ form.message|as_crispy_field }}
28 29 30 31 32 33 34 35 36 37
          <button type="submit" class="btn btn-success">
            {% trans "Request new resources" %}
          </button>
        </form>
      </div>
    </div>
  </div>
</div>

{% endblock %}