Create project, user authority pre-selected
[unfold.git] / portal / templates / fed4fire / fed4fire_projectrequest_view.html
index 78801b7..d002152 100644 (file)
@@ -2,6 +2,10 @@
 {% load i18n %}
 
 {% block content %}
+<script src="{{ STATIC_URL }}js/jquery-ui.js"></script>
+<script src="{{ STATIC_URL }}js/jquery-ui-combobox.js"></script>
+<link rel='stylesheet' type='text/css' href="{{ STATIC_URL }}css/jquery-ui.css">
+<link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}css/jquery.ui.combobox.css">
 <br />
 <div class="row">
     <div class="col-md-12">
@@ -78,9 +82,9 @@
                     {% if authorities %}
                         {% for authority in authorities %}
                             {% if authority.name %}
-                                <option value="{{ authority.authority_hrn }}">{{authority.name}}</option>
+                                <option value="{{ authority.authority_hrn }}" {% if authority.authority_hrn == authority_hrn %}selected{% endif %}>{{authority.name}}</option>
                             {% else %}
-                                <option value="{{ authority.authority_hrn }}">{{authority.authority_hrn}}</option>
+                                <option value="{{ authority.authority_hrn }}" {% if authority.authority_hrn == authority_hrn %}selected{% endif %}>{{authority.authority_hrn}}</option>
                             {% endif %}
                         {% endfor %} 
                     {% endif %}