mirror of
https://github.com/nottinghamtec/PyRIGS.git
synced 2026-02-04 22:28:21 +00:00
Fixed search and implemented an asset search api
Added asset picker for parent attribute Co-authored-by: Panagiotis Petridis <lPanagiotisPetridisl@gmail.com>
This commit is contained in:
@@ -11,20 +11,20 @@
|
||||
<form id="asset-search-form">
|
||||
{% csrf_token %}
|
||||
<div class="input-group">
|
||||
<input type="query" name="query" placeholder="Search by Asset ID/Description" class="form-control" value="{{searchName}}">
|
||||
<input type="query" name="query" placeholder="Search by Asset ID/Description" class="form-control" value="{{search_name}}">
|
||||
<label for="asset_id" class="sr-only">Asset ID/Description:</label>
|
||||
<span class="input-group-btn"><button type="submit" class="btn btn-default">Search</button></span>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<form class="form-inline" id="asset-filter-form">
|
||||
{% csrf_token %}
|
||||
<div class="form-group">
|
||||
<label for="cat">Category:</label>
|
||||
<select name="cat" class="form-control">
|
||||
<option>None</option>
|
||||
<option value="">None</option>
|
||||
{% for name in categories %}
|
||||
{% if name == category_select %}
|
||||
<option selected>
|
||||
{% else %}
|
||||
<option>
|
||||
{% endif %}
|
||||
{{ name }}
|
||||
</option>
|
||||
{% endfor %}
|
||||
@@ -33,15 +33,19 @@
|
||||
<div class="form-group">
|
||||
<label for="status">Status:</label>
|
||||
<select name="status" class="form-control">
|
||||
<option>None</option>
|
||||
<option value="">None</option>
|
||||
{% for name in statuses %}
|
||||
{% if name == status_select %}
|
||||
<option selected>
|
||||
{% else %}
|
||||
<option>
|
||||
{% endif %}
|
||||
{{ name }}
|
||||
</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
<!---TODO: Auto filter whenever an option is selected, instead of using a button --->
|
||||
<!---TODO: Auto filter whenever an option is selected, instead of using a button -->
|
||||
<button type="submit" class="btn btn-default">Filter</button>
|
||||
</form>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user