bmc_hub/fix_tab.py

14 lines
630 B
Python
Raw Permalink Normal View History

import re
with open('app/modules/sag/templates/detail.html', 'r', encoding='utf-8') as f:
content = f.read()
# Make the timetracking tab visible by adding it to standardModuleSet, or just removing the 'data-module="timetracking"'
# Actually, the easiest way is to remove data-module="timetracking" and data-module-tab="timetracking"
# Wait, if we remove it, the tab won't be hidden, which is good.
content = content.replace('data-module-tab="timetracking"', '')
content = content.replace('data-module="timetracking"', '')
with open('app/modules/sag/templates/detail.html', 'w', encoding='utf-8') as f:
f.write(content)