mirror of
https://github.com/nottinghamtec/PyRIGS.git
synced 2026-01-30 20:02:16 +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:
@@ -24,6 +24,7 @@
|
||||
{% else %}
|
||||
<form method="post" id="asset_update_form" action="{% url 'asset_update' pk=object.pk%}">
|
||||
{% endif %}
|
||||
{% include 'form_errors.html' %}
|
||||
<div class="row" style="padding-bottom: 1em">
|
||||
<div class="col-sm-12">
|
||||
<div class="pull-right">
|
||||
@@ -190,35 +191,8 @@
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
{% if edit or duplicate %}
|
||||
<div class="form-group">
|
||||
<label for="parent_id">Parent</label>
|
||||
<input type="hidden" name="{{ form.parent.html_name }}" id="hidden_parent_id"
|
||||
value="{{ object.parent.id }}">
|
||||
<div class="input-group">
|
||||
<input type="text" id="parent_id" value="{{ object.parent|default:'' }}"
|
||||
disabled="" class="form-control">
|
||||
<span class="input-group-btn"><button type="button" class="btn btn-default" onclick="clearParent()">Clear
|
||||
</button></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="parent_search">Search for asset</label>
|
||||
<div class="input-group">
|
||||
<input type="text" id="parent_search" class="form-control">
|
||||
<span class="input-group-btn"><button type="button" class="btn btn-default" onclick="formAssetSearch()">
|
||||
<i class="glyphicon glyphicon-search"></i> Search
|
||||
</button></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col s2">
|
||||
|
||||
<br>
|
||||
</div>
|
||||
<div class="col s12" id="formAssetSearchResult">
|
||||
<!--Placeholder for search results-->
|
||||
</div>
|
||||
{% else %}
|
||||
{% include 'partials/asset_picker.html' %}
|
||||
{% else%}
|
||||
<dl>
|
||||
<dt>Parent</dt>
|
||||
<dd>
|
||||
|
||||
Reference in New Issue
Block a user