1 {% extends "layout.html" %}
6 <div class="col-md-12">
7 <div class="breadcrumbs">
8 Experiment > Request a new Project or Join an existing one
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 <select id="org_name" name="org_name" class="form-control" style="width:590px" value="{{ organization }}" required>
35 {% for authority in authorities %}
36 {% if authority.name %}
37 <option value="{{ authority.authority_hrn }}">{{authority.name}}</option>
39 <option value="{{ authority.authority_hrn }}">{{authority.authority_hrn}}</option>
45 <div class="form-group">
46 <input type="text">New Project</input>
48 <div class="form-group">
49 <input type="text">Existing Project</input>
51 <div class="form-group">
52 <textarea id="purpose" name="purpose" class="form-control" rows="6" placeholder="Project purpose" style="width:300px"
53 title="Purpose of your project (informative)" required="required">{{ purpose }}</textarea>
56 <button type="submit" id=submit_pi class="btn btn-onelab"><span class="glyphicon glyphicon-plus"></span> Create slice</button>
58 <button type="submit" class="btn btn-onelab"><span class="glyphicon glyphicon-plus"></span> Request slice</button>
66 jQuery(document).ready(function(){
69 $("#authority_hrn").load("/rest/user/", {"fields" : ["parent_authority"], "filters": {"user_hrn": "{{ user_hrn }}"}}, function(data) {
70 var jsonData = JSON.parse(data);
71 $(this).attr("value", jsonData[0]['parent_authority']);
73 $("#authority_hrn").val("{{authority_name}}");
76 {% for authority in authorities %}
77 {% if authority.name %}
78 {value:"{{ authority.name }}",label:"{{authority.name}}"},
79 // to show only full name
81 {value:"{{ authority.authority_hrn }}",label:"{{authority.authority_hrn}}"},
85 {value:"",label:"No authority found !!!"}
89 availableTags.sort(function(a,b){
90 var nameA=a.value.toLowerCase(), nameB=b.value.toLowerCase();
99 $( "#authority_hrn" ).autocomplete({
100 source: availableTags,
102 select: function( event, ui ) {console.log(jQuery(this));}
105 $("#submit_pi").click(function() {
106 localStorage.clear();
108 // auto-complete the form
109 jQuery("#org_name").combobox();