1 {% extends "layout.html" %}
6 <div class="col-md-12">
7 <div class="breadcrumbs">
8 Experiment > Request a new Slice
15 <div class="col-md-12">
17 {% for error in errors %}
26 <div class="col-md-8 el">
27 <form role="form" method="post">
29 <div class="form-group" style="display:none">
30 <input type="email" class="form-control" id="email" style="width:300px" value="{{ email }}" readonly="readonly">
32 <div class="form-group">
33 <input type="text" class="form-control" name="slice_name" id="slice_name" style="width:300px" placeholder="Slice name" value="{{slice_name}}"
34 title="Please enter a name for your slice"required="required">
36 <div class="form-group">
38 <input type="text" class="form-control" id="authority_hrn" name="org_name" style="width:300px" placeholder="Organization"
39 title="An authority responsible for vetting your slice" required="required">
41 <input type="text" class="form-control" id="authority_hrn" name="org_name" placeholder="Organization" style="width:300px;"
42 title="An authority responsible for vetting your slice" required="required" readonly>
45 <div class="form-group">
46 <input type="text" class="form-control" name="url" id="url" style="width:300px" placeholder="Experiment URL (if one exists)"
47 title="Please provide the url of your experiment if you have one." value="{{url}}">
49 <div class="form-group">
50 <textarea id="purpose" name="purpose" class="form-control" rows="6" placeholder="Experiment purpose" style="width:300px"
51 title="Purpose of your experiment (informative)" required="required">{{ purpose }}</textarea>
54 <button type="submit" id=submit_pi class="btn btn-onelab"><span class="glyphicon glyphicon-plus"></span> Create slice</button>
56 <button type="submit" class="btn btn-onelab"><span class="glyphicon glyphicon-plus"></span> Request slice</button>
64 jQuery(document).ready(function(){
66 $("#authority_hrn").load("/rest/user/", {"fields" : ["parent_authority"], "filters": {"user_hrn": "{{ user_hrn }}"}}, function(data) {
67 var jsonData = JSON.parse(data);
68 $(this).attr("value", jsonData[0]['parent_authority']);
70 $("#authority_hrn").val("{{authority_name}}");
73 {% for authority in authorities %}
74 {% if authority.name %}
75 {value:"{{ authority.name }}",label:"{{authority.name}}"},
76 // to show only full name
78 {value:"{{ authority.authority_hrn }}",label:"{{authority.authority_hrn}}"},
82 {value:"",label:"No authority found !!!"}
86 availableTags.sort(function(a,b){
87 var nameA=a.value.toLowerCase(), nameB=b.value.toLowerCase();
96 $( "#authority_hrn" ).autocomplete({
97 source: availableTags,
99 select: function( event, ui ) {console.log(jQuery(this));}
102 $("#submit_pi").click(function() {
103 localStorage.clear();