Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
aa.gusti
/
opensipkd-base
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Settings
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit f695f603
authored
Dec 12, 2025
by
aa.gustiana@gmail.com
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Update MoneyInputWidget to use a new readonly template for better formatting
1 parent
5cdf14e5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
1 deletions
opensipkd/base/widgets/templates/readonly/moneyinput.pt
opensipkd/base/widgets/widget_os.py
opensipkd/base/widgets/templates/readonly/moneyinput.pt
0 → 100644
View file @
f695f60
<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
opensipkd/base/widgets/widget_os.py
View file @
f695f60
...
...
@@ -845,7 +845,7 @@ class DateInputWidget(WidgetDateInputWidget):
class
MoneyInputWidget
(
widget
.
MoneyInputWidget
):
readonly_template
=
"readonly/
textinpu
t"
readonly_template
=
"readonly/
moneyinput.p
t"
def
get_template_values
(
self
,
field
,
cstruct
,
kw
):
options
=
json
.
loads
(
kw
.
get
(
"mask_options"
,
"{}"
))
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment