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. Don't have any project yet! Create/Join project from the dashboard." 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>
48 <button type="submit" id=submit_pi class="btn btn-onelab"><span class="glyphicon glyphicon-plus"></span> Create slice</button>
55 jQuery(document).ready(function(){
56 var myprojects = JSON.parse(localStorage.getItem('projects'));
57 $( "#authority_hrn" ).autocomplete({
60 change: function (event, ui) {
62 //http://api.jqueryui.com/autocomplete/#event-change -
63 // The item selected from the menu, if any. Otherwise the property is null
64 //so clear the item for force selection
65 $("#authority_hrn").val("");
71 /*function draw_projects(authority_hrn){
74 project_row = "<option value=''> - </option>";
75 projects.push(project_row);
77 if(authority_hrn.length > 0){
78 // Not for root authority
79 if(authority_hrn.split('.').length > 1){
80 $.post("/rest/myslice:authority/",{'fields':['authority_hrn','pi_users'],'filters':{'authority_hrn':'CONTAINS'+authority_hrn}}, function( data ) {
82 $.each( data, function( key, val ) {
83 project_row = "<option value='"+val.authority_hrn+"'>"+val.authority_hrn+"</option>";
84 projects.push(project_row);
86 $("#project").html(projects.join( "" ));
89 $("#project").html(projects.join( "" ));
92 my_projects = JSON.parse(localStorage.getItem('projects'));
93 $.each( my_projects, function( i, val ) {
94 project_row = "<option value='"+val+"'>"+val+"</option>";
95 projects.push(project_row);
97 $("#project").html(projects.join( "" ));
100 $("#project_loading").hide();