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="exp_url" id="exp_url" style="width:300px" placeholder="Experiment URL (if one exists)"
47 title="Please provide the url of your experiment if you have one." value="{{exp_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>
53 <button type="submit" class="btn btn-onelab"><span class="glyphicon glyphicon-plus"></span> Request Slice</button>
60 jQuery(document).ready(function(){
62 $("#authority_hrn").load("/rest/user/", {"fields" : ["parent_authority"], "filters": {"user_hrn": "{{ user_hrn }}"}}, function(data) {
63 var jsonData = JSON.parse(data);
64 // getting the authority from the view not rest
65 $(this).attr("value", "{{authority_name}}");
69 {% for authority in authorities %}
70 {% if authority.name %}
71 {value:"{{ authority.name }}",label:"{{authority.name}}"},
72 // to show only full name
74 // {value:"{{ authority.authority_hrn }}",label:"{{authority.authority_hrn}}"},
78 {value:"",label:"No authority found !!!"}
82 availableTags.sort(function(a,b){
83 var nameA=a.value.toLowerCase(), nameB=b.value.toLowerCase();
92 $( "#authority_hrn" ).autocomplete({
93 source: availableTags,
95 select: function( event, ui ) {console.log(jQuery(this));}