mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Add 'title' option for contsructed fields
This commit is contained in:
parent
52eedef820
commit
77cfadad42
@ -120,9 +120,6 @@ class StockAdjust(APIView):
|
|||||||
- StockAdd: add stock items
|
- StockAdd: add stock items
|
||||||
- StockRemove: remove stock items
|
- StockRemove: remove stock items
|
||||||
- StockTransfer: transfer stock items
|
- StockTransfer: transfer stock items
|
||||||
|
|
||||||
# TODO - This needs serious refactoring!!!
|
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
queryset = StockItem.objects.none()
|
queryset = StockItem.objects.none()
|
||||||
@ -502,7 +499,6 @@ class StockList(generics.ListCreateAPIView):
|
|||||||
serializer = self.get_serializer(data=request.data)
|
serializer = self.get_serializer(data=request.data)
|
||||||
serializer.is_valid(raise_exception=True)
|
serializer.is_valid(raise_exception=True)
|
||||||
|
|
||||||
# TODO - Save the user who created this item
|
|
||||||
item = serializer.save()
|
item = serializer.save()
|
||||||
|
|
||||||
# A location was *not* specified - try to infer it
|
# A location was *not* specified - try to infer it
|
||||||
|
@ -1473,6 +1473,11 @@ function constructInputOptions(name, classes, type, parameters) {
|
|||||||
opts.push(`required=''`);
|
opts.push(`required=''`);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Custom mouseover title?
|
||||||
|
if (parameters.title != null) {
|
||||||
|
opts.push(`title='${parameters.title}'`);
|
||||||
|
}
|
||||||
|
|
||||||
// Placeholder?
|
// Placeholder?
|
||||||
if (parameters.placeholder != null) {
|
if (parameters.placeholder != null) {
|
||||||
opts.push(`placeholder='${parameters.placeholder}'`);
|
opts.push(`placeholder='${parameters.placeholder}'`);
|
||||||
|
@ -147,6 +147,7 @@ function adjustStock(action, items, options={}) {
|
|||||||
min_value: minValue,
|
min_value: minValue,
|
||||||
max_value: maxValue,
|
max_value: maxValue,
|
||||||
read_only: readonly,
|
read_only: readonly,
|
||||||
|
title: readonly ? '{% trans "Quantity cannot be adjusted for serialized stock" %}' : '{% trans "Specify stock quantity" %}',
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user