Employees: external photo base URL is a setting

External HR Picture values are relative paths; the resolver hardcoded
/static/employees/, but sites can serve photos from another host. New
employee_photo_base_url setting; blank keeps the old behavior.
This commit is contained in:
2026-07-17 11:16:05 -04:00
parent 6de329a390
commit 9ba20100de
2 changed files with 13 additions and 4 deletions

View File

@@ -79,6 +79,11 @@ class EmployeesPlugin(BasePlugin):
"""Employee directory DB connection. Host/name/user are settings the
wizard can edit; the password stays in .env (emitted, not stored)."""
return [
{'key': 'employee_photo_base_url', 'label': 'Photo base URL',
'type': 'text', 'secret': False,
'help': 'Where external HR relative Picture paths resolve, e.g. '
'https://host/EmployeeDBAPP/images/. Blank = this '
'site\'s /static/employees/.'},
{'key': 'employee_db_host', 'label': 'Employee DB host', 'type': 'text',
'secret': False, 'default': 'localhost',
'help': 'This DB must expose an "employees" table or view with columns '