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-5 col-md-offset-3">
27 <form role="form" method="post">
29 <div class="form-group">
30 <input type="hidden" id="email" value="{{ email }}" readonly="readonly">
32 Please enter a name for your slice <br />
33 <span class="sublabel">
34 The slice name should only contain letters, numbers and the underscore character "_" <br />
37 <input type="text" class="form-control" name="slice_name" id="slice_name" style="width:100%" placeholder="Slice name" value="{{slice_name}}" required="required">
39 <div class="form-group">
41 Select a project under which you want your slice to be created <br />
42 If your are not part of any projects you can <a href="/portal/project_request/">join or create one</a>
44 <input type="text" class="form-control" id="authority_hrn" name="org_name" style="width:100%" placeholder="Project"
45 title="Select a project under which you want to create your slice" required="required">
47 <div class="form-group">
49 Provide an URL for your experiment (not required)
51 <input type="text" class="form-control" name="url" id="url" style="width:100%" placeholder="Experiment URL (if one exists)"
52 title="Please provide the url of your experiment" value="{{url}}">
54 <div class="form-group">
56 Please provide a description of the purpose for your experiment
58 <textarea id="purpose" name="purpose" class="form-control" rows="6" placeholder="Experiment description" style="width:100%"
59 title="Description of your experiment" required="required">{{ purpose }}</textarea>
61 <button type="submit" id=submit_pi class="btn btn-onelab"><span class="glyphicon glyphicon-plus"></span> Create slice</button>
68 jQuery(document).ready(function(){
69 var myprojects = JSON.parse(localStorage.getItem('projects'));
70 $( "#authority_hrn" ).autocomplete({
73 change: function (event, ui) {
75 //http://api.jqueryui.com/autocomplete/#event-change -
76 // The item selected from the menu, if any. Otherwise the property is null
77 //so clear the item for force selection
78 $("#authority_hrn").val("");
81 }).bind('focus', function(){ $(this).autocomplete("search"); } );
84 /*function draw_projects(authority_hrn){
87 project_row = "<option value=''> - </option>";
88 projects.push(project_row);
90 if(authority_hrn.length > 0){
91 // Not for root authority
92 if(authority_hrn.split('.').length > 1){
93 $.post("/rest/myslice:authority/",{'fields':['authority_hrn','pi_users'],'filters':{'authority_hrn':'CONTAINS'+authority_hrn}}, function( data ) {
95 $.each( data, function( key, val ) {
96 project_row = "<option value='"+val.authority_hrn+"'>"+val.authority_hrn+"</option>";
97 projects.push(project_row);
99 $("#project").html(projects.join( "" ));
102 $("#project").html(projects.join( "" ));
105 my_projects = JSON.parse(localStorage.getItem('projects'));
106 $.each( my_projects, function( i, val ) {
107 project_row = "<option value='"+val+"'>"+val+"</option>";
108 projects.push(project_row);
110 $("#project").html(projects.join( "" ));
112 $("#project").show();
113 $("#project_loading").hide();