1 {% extends "layout.html" %}
6 <div class="col-md-12">
7 <div class="breadcrumbs" style="line-height: 3;">
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">
37 <input type="text" class="form-control" id="authority_hrn" name="org_name" style="width:300px" placeholder="Project"
38 title="Select a project under which you want to create your slice" required="required">
40 <div class="form-group">
41 <input type="text" class="form-control" name="url" id="url" style="width:300px" placeholder="Experiment URL (if one exists)"
42 title="Please provide the url of your experiment if you have one." value="{{url}}">
44 <div class="form-group">
45 <textarea id="purpose" name="purpose" class="form-control" rows="6" placeholder="Experiment purpose" style="width:300px"
46 title="Purpose of your experiment (informative)" required="required">{{ purpose }}</textarea>
49 <button type="submit" id=submit_pi class="btn btn-onelab"><span class="glyphicon glyphicon-plus"></span> Create slice</button>
51 <button type="submit" class="btn btn-onelab"><span class="glyphicon glyphicon-plus"></span> Request slice</button>
59 jQuery(document).ready(function(){
60 var myprojects = JSON.parse(localStorage.getItem('projects'));
61 $( "#authority_hrn" ).autocomplete({
63 change: function (event, ui) {
65 //http://api.jqueryui.com/autocomplete/#event-change -
66 // The item selected from the menu, if any. Otherwise the property is null
67 //so clear the item for force selection
68 $("#authority_hrn").val("");
74 /*function draw_projects(authority_hrn){
77 project_row = "<option value=''> - </option>";
78 projects.push(project_row);
80 if(authority_hrn.length > 0){
81 // Not for root authority
82 if(authority_hrn.split('.').length > 1){
83 $.post("/rest/myslice:authority/",{'fields':['authority_hrn','pi_users'],'filters':{'authority_hrn':'CONTAINS'+authority_hrn}}, function( data ) {
85 $.each( data, function( key, val ) {
86 project_row = "<option value='"+val.authority_hrn+"'>"+val.authority_hrn+"</option>";
87 projects.push(project_row);
89 $("#project").html(projects.join( "" ));
92 $("#project").html(projects.join( "" ));
95 my_projects = JSON.parse(localStorage.getItem('projects'));
96 $.each( my_projects, function( i, val ) {
97 project_row = "<option value='"+val+"'>"+val+"</option>";
98 projects.push(project_row);
100 $("#project").html(projects.join( "" ));
102 $("#project").show();
103 $("#project_loading").hide();