1 {% extends "layout.html" %}
6 <div class="col-md-12">
7 <h1><img src="{{ STATIC_URL }}icons/slices-xs.png" alt="Request a Slice" /> Request a new Slice</h1>
13 {% for error in errors %}
19 <div class="col-md-4"> </div>
22 <div class="col-md-8">
23 <form role="form" method="post">
25 <div class="form-group" style="display:none">
26 <input type="email" class="form-control" id="email" style="width:300px" value="{{ email }}" readonly="readonly">
28 <div class="form-group">
29 <input type="text" class="form-control" name="slice_name" id="slice_name" style="width:300px" placeholder="Slice Name"
30 title="Please enter a name for your slice"required="required">
32 <div class="form-group">
34 <input type="text" class="form-control" id="authority_hrn" name="authority_hrn" style="width:300px" placeholder="Authority"
35 title="An authority responsible for vetting your slice" required="required">
37 <input type="text" class="form-control" id="authority_hrn" name="authority_hrn" placeholder="Authority" style="width:300px"
38 title="An authority responsible for vetting your slice" required="required" readonly="readonly">
41 <div class="form-group">
42 <input type="number" class="form-control" name="number_of_nodes" id="number_of_nodes" style="width:300px" placeholder="Number of Nodes"
43 title="Number of nodes you expect to request (informative)">
45 <div class="form-group">
46 <textarea id="purpose" name="purpose" class="form-control" rows="6" placeholder="Experiment Purpose" style="width:300px"
47 title="Purpose of your experiment (informative)" required="required">{{ purpose }}</textarea>
50 <button type="submit" class="btn btn-primary">Request Slice</button>
57 jQuery(document).ready(function(){
59 $("#authority_hrn").load("/rest/user/", {"fields" : ["parent_authority"], "filters": {"user_hrn": "{{ user_hrn }}"}}, function(data) {
60 var jsonData = JSON.parse(data)
61 $(this).attr("value", jsonData[0]['parent_authority']);
65 {% for authority in authorities %}
66 {% if authority.name %}
67 {value:"{{ authority.authority_hrn }}",label:"{{authority.name}}"},
69 {value:"{{ authority.authority_hrn }}",label:"{{authority.authority_hrn}}"},
73 {value:"",label:"No authority found !!!"}
76 $( "#authority_hrn" ).autocomplete({
77 source: availableTags,
79 select: function( event, ui ) {console.log(jQuery(this))}