Slice request pre-select authority
[unfold.git] / portal / templates / slicerequest_view.html
index 0f895b7..e70a9a9 100644 (file)
                
 <script>
 jQuery(document).ready(function(){
+       
+       $("#authority_hrn").load("/rest/user/", {"fields" : ["parent_authority"], "filters": {"user_hrn": "{{ user_hrn }}"}}, function(data) {
+               var jsonData = JSON.parse(data)
+        $(this).attr("value", jsonData[0]['parent_authority']);
+    });
     var availableTags = [
      {% if authorities %}
          {% for authority in authorities %}