mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Tweaks
This commit is contained in:
parent
a263d2fdcd
commit
05ce17f8df
@ -5,6 +5,11 @@
|
||||
|
||||
{{ block.super }}
|
||||
|
||||
{% trans "Are you sure you wish to unallocate all stock for this build?" %}
|
||||
|
||||
<div class='alert alert-block alert-danger'>
|
||||
{% trans "Are you sure you wish to unallocate all stock for this build?" %}
|
||||
<br>
|
||||
{% trans "All incomplete stock allocations will be removed from the build" %}
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
@ -887,10 +887,12 @@ class BuildItemEdit(AjaxUpdateView):
|
||||
form = super(BuildItemEdit, self).get_form()
|
||||
|
||||
# Hide fields which we do not wish the user to edit
|
||||
for field in ['build', 'stock_item', 'install_into']:
|
||||
for field in ['build', 'stock_item']:
|
||||
if form[field].value():
|
||||
form.fields[field].widget = HiddenInput()
|
||||
|
||||
form.fields['install_into'].widget = HiddenInput()
|
||||
|
||||
return form
|
||||
|
||||
|
||||
|
@ -568,8 +568,8 @@ function loadBuildOutputAllocationTable(buildInfo, output, options={}) {
|
||||
var progressA = parseFloat(aA) / qA;
|
||||
var progressB = parseFloat(aB) / qB;
|
||||
|
||||
// Handle the case where both are at 100%
|
||||
if (progressA == 1.0 && progressB == 1.0) {
|
||||
// Handle the case where both ratios are equal
|
||||
if (progressA == progressB) {
|
||||
return (qA < qB) ? 1 : -1;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user