Update MoneyInputWidget to use a new readonly template for better formatting

1 parent 5cdf14e5
<p class="form-control-static" id="${oid|field.oid}" tal:define="mask_options mask_options|'{}';"></p>
<script type="text/javascript">
deform.addCallback(
'${oid|field.oid}',
function (oid) {
let val = parseFloat('${cstruct}');
$("#" + oid).html(val.toLocaleString());
});
</script>
\ No newline at end of file
......@@ -845,7 +845,7 @@ class DateInputWidget(WidgetDateInputWidget):
class MoneyInputWidget(widget.MoneyInputWidget):
readonly_template = "readonly/textinput"
readonly_template = "readonly/moneyinput.pt"
def get_template_values(self, field, cstruct, kw):
options = json.loads(kw.get("mask_options", "{}"))
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!