Development
This commit is contained in:
parent
63cf7dc2c4
commit
2eddccac70
2 changed files with 5 additions and 2 deletions
|
|
@ -631,6 +631,7 @@ def collect_tokens():
|
|||
else:
|
||||
pending_html = ''
|
||||
tokens['PENDING_CHANGES_HTML'] = pending_html
|
||||
tokens['NO_PENDING'] = 'true' if not pending_items else ''
|
||||
|
||||
done_items = get_dashboard_done()
|
||||
if done_items:
|
||||
|
|
@ -914,7 +915,8 @@ def _render_item(item, tokens, inherited_req=None):
|
|||
cls = f'{cls} {extra}'
|
||||
text = e(apply_tokens(item.get('text', ''), tokens))
|
||||
action = e(apply_tokens(item.get('action', '#'), tokens))
|
||||
disabled = ' disabled' if item.get('disabled') else ''
|
||||
disabled_val = apply_tokens(str(item.get('disabled', '')), tokens)
|
||||
disabled = ' disabled' if disabled_val and disabled_val not in ('false', '0') else ''
|
||||
formaction = item.get('formaction', '')
|
||||
if formaction:
|
||||
formaction = e(apply_tokens(formaction, tokens))
|
||||
|
|
|
|||
|
|
@ -621,7 +621,8 @@
|
|||
{
|
||||
"type": "button_primary",
|
||||
"formaction": "/action/actions_cardpendingchanges_applynow",
|
||||
"text": "Apply Now"
|
||||
"text": "Apply Now",
|
||||
"disabled": "%NO_PENDING%"
|
||||
},
|
||||
{
|
||||
"type": "button_secondary",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue