bmc_hub/patch_sag_help.py

11 lines
623 B
Python
Raw Permalink Normal View History

with open("app/modules/sag/templates/detail.html", "r") as f:
content = f.read()
target = '<button class="btn btn-sm btn-link text-muted p-0 mb-1" onclick="startTitelEdit()" title="Rediger overskrift"><i class="bi bi-pencil-square"></i></button>'
replacement = target + '\n <button class="btn btn-sm btn-link text-info p-0 mb-1 ms-2" onclick="openManualHelp(\'Sag\')" title="Hjælp til sagsbehandling"><i class="bi bi-question-circle fs-5"></i></button>'
content = content.replace(target, replacement)
with open("app/modules/sag/templates/detail.html", "w") as f:
f.write(content)