Development

This commit is contained in:
Matthew Grotke 2026-05-28 09:28:26 -04:00
parent 3bdba52d57
commit 3b5e9e7eaa
2 changed files with 21 additions and 58 deletions

View file

@ -1854,7 +1854,7 @@ def _render_table(item, tokens, inherited_req=None):
action = e(apply_tokens(ra.get('action', '#'), tokens))
method = ra.get('method', 'post').lower()
if method == 'post':
disable_if = ra.get('disable_i')
disable_if = ra.get('disable_if')
if disable_if and row.get(disable_if.get('field')) == disable_if.get('value'):
btns += f'<button type="button" class="btn {cls}" disabled>{text}</button>'
continue
@ -2195,10 +2195,16 @@ def _render_nav_item(item, active_view, level, in_dropdown=False, inherited_req=
def _inline_js():
try:
with open(f'{DATA_DIR}/app.js') as f:
return f.read()
with open(f'{DATA_DIR}/validation.js') as f:
val_js = f.read()
except Exception:
return ''
val_js = ''
try:
with open(f'{DATA_DIR}/app.js') as f:
app_js = f.read()
except Exception:
app_js = ''
return val_js + '\n' + app_js
# Routes ============================================================