mirror of
https://github.com/nottinghamtec/PyRIGS.git
synced 2026-01-21 23:42:14 +00:00
Fixed asset picker backend
This commit is contained in:
@@ -16,6 +16,7 @@
|
|||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block js %}
|
{% block js %}
|
||||||
|
{{ js.super }}
|
||||||
<script>
|
<script>
|
||||||
$('#parent_id')
|
$('#parent_id')
|
||||||
.selectpicker({
|
.selectpicker({
|
||||||
@@ -55,6 +56,7 @@ $('#parent_id')
|
|||||||
'text': "No parent"
|
'text': "No parent"
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
return assets;
|
return assets;
|
||||||
},
|
},
|
||||||
preserveSelected: false
|
preserveSelected: false
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<select name="parent_s" id="parent_s_id" class="selectpicker">
|
<select name="purchased_from" id="supplier_id" class="selectpicker">
|
||||||
{% if object.parent%}
|
{% if object.parent%}
|
||||||
<option value="{{object.parent.pk}}" selected>{{object.parent.name}}</option>
|
<option value="{{object.parent.pk}}" selected>{{object.parent.name}}</option>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
@@ -16,8 +16,9 @@
|
|||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block js %}
|
{% block js %}
|
||||||
|
{{ js.super }}
|
||||||
<script>
|
<script>
|
||||||
$('#parent_s_id')
|
$('#supplier_id')
|
||||||
.selectpicker({
|
.selectpicker({
|
||||||
liveSearch: true
|
liveSearch: true
|
||||||
})
|
})
|
||||||
@@ -44,7 +45,7 @@ $('#parent_s_id')
|
|||||||
suppliers.push(
|
suppliers.push(
|
||||||
{
|
{
|
||||||
'value': curr.id,
|
'value': curr.id,
|
||||||
'text': curr.label,
|
'text': curr.name,
|
||||||
'disabled': false
|
'disabled': false
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
@@ -55,7 +56,7 @@ $('#parent_s_id')
|
|||||||
'text': "(no selection)"
|
'text': "(no selection)"
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
return assets;
|
return suppliers;
|
||||||
},
|
},
|
||||||
preserveSelected: false
|
preserveSelected: false
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user