From 8205860b227afd41b8fc0135debd344b4c5fb71b Mon Sep 17 00:00:00 2001 From: A R R R Associates Date: Sun, 21 Jun 2026 20:49:52 +0530 Subject: [PATCH] Restore missing UI templates --- .../templates/change_password_required.html | 1 + .../core/iam/templates/invite_accept.html | 20 ++ app/modules/core/iam/templates/login.html | 23 ++ .../core/iam/templates/user_create.html | 5 + app/modules/core/iam/templates/user_form.html | 303 ++++++++++++++++++ .../core/iam/templates/users_list.html | 56 ++++ 6 files changed, 408 insertions(+) create mode 100644 app/modules/core/iam/templates/change_password_required.html create mode 100644 app/modules/core/iam/templates/invite_accept.html create mode 100644 app/modules/core/iam/templates/login.html create mode 100644 app/modules/core/iam/templates/user_create.html create mode 100644 app/modules/core/iam/templates/user_form.html create mode 100644 app/modules/core/iam/templates/users_list.html diff --git a/app/modules/core/iam/templates/change_password_required.html b/app/modules/core/iam/templates/change_password_required.html new file mode 100644 index 0000000..04d5847 --- /dev/null +++ b/app/modules/core/iam/templates/change_password_required.html @@ -0,0 +1 @@ +{% extends "ui/templates/base/layout.html" %}{% block content %}

Set a New Password

Your account requires a password update before proceeding.

{% endblock %} \ No newline at end of file diff --git a/app/modules/core/iam/templates/invite_accept.html b/app/modules/core/iam/templates/invite_accept.html new file mode 100644 index 0000000..c37cde9 --- /dev/null +++ b/app/modules/core/iam/templates/invite_accept.html @@ -0,0 +1,20 @@ +{% extends "ui/templates/base/layout.html" %} +{% block content %} +
+

Accept Invite

+

Set your password to activate your account.

+ {% if flash %} +
{{ flash }}
+ {% endif %} +
+ + +
+ + +

Use at least 8 characters with letters and numbers.

+
+ +
+
+{% endblock %} diff --git a/app/modules/core/iam/templates/login.html b/app/modules/core/iam/templates/login.html new file mode 100644 index 0000000..84717b6 --- /dev/null +++ b/app/modules/core/iam/templates/login.html @@ -0,0 +1,23 @@ +{% extends "ui/templates/base/layout.html" %} +{% block content %} +
+

Login

+

Use bootstrap admin (first run). Lockout + CSRF are enabled.

+ +
+ + + + + + + +
+
+{% endblock %} diff --git a/app/modules/core/iam/templates/user_create.html b/app/modules/core/iam/templates/user_create.html new file mode 100644 index 0000000..2637f6f --- /dev/null +++ b/app/modules/core/iam/templates/user_create.html @@ -0,0 +1,5 @@ +{% extends "ui/templates/base/layout.html" %} +{% block content %} +

Create User

+

User creation UI will be expanded in the next hardening step.

+{% endblock %} diff --git a/app/modules/core/iam/templates/user_form.html b/app/modules/core/iam/templates/user_form.html new file mode 100644 index 0000000..d6d149e --- /dev/null +++ b/app/modules/core/iam/templates/user_form.html @@ -0,0 +1,303 @@ +{% extends "ui/templates/base/layout.html" %} +{% block content %} +
+
+

{{ "Create User" if form_mode == "create" else "Edit User" }}

+

Audit Firm and branch scope follow the logged-in user's access level.

+ + {% if flash %} +
+ {{ flash }} +
+ {% endif %} + +
+ + +
+
+ + +
+
+ + +
+
+ +
+
+ + +
+
+ +
+
+ +
+ {% if form_mode == "create" %} +
+ +
+ {% endif %} +
+ +
+
+ + + {% if can_change_tenant %} + + {% else %} + +
+ {{ selected_tenant_name or current_user.tenant_id }} +
+ {% endif %} +
+ +
+ + + {% if scope.branch_scoped %} + +
+ {{ selected_branch_name or current_user.branch_id }} +
+ {% else %} + + {% endif %} +
+
+ +
+ +
+ {% for role in roles %} + + {% else %} +
+ No roles are available for your scope. +
+ {% endfor %} +
+
+ +
+
+
+

Employee profile auto-link

+

+ For internal firm roles such as Firm Admin, Partner, Manager, Branch Manager and Staff, an employee profile will be created and linked automatically. + System Admin, Client and Consultant-only users are excluded. +

+
+ Phase 7F +
+ +
+
+ + +

Leave blank to auto-generate.

+
+
+ + +
+
+ + +
+
+ +
+
+ + +
+
+ + +
+
+ + +
+
+ +
+ Branch is mandatory for internal employee users because attendance geofencing, branch timezone, leave approvals and work allocation depend on the employee's branch. +
+
+ +
+ Cancel + +
+
+
+ +
+

Scope rules

+
    +
  • System Admin can create and manage users across all audit firms and branches.
  • +
  • Firm Admin can create and manage users only inside their own audit firm and its branches.
  • +
  • Partner and Branch Manager cannot create users in this version.
  • +
  • Audit Firm changes refresh branch options automatically for System Admin.
  • +
  • Role assignment is limited by the creator's scope.
  • +
+
+
+ + + +{% if can_change_tenant and not scope.branch_scoped %} + +{% endif %} +{% endblock %} \ No newline at end of file diff --git a/app/modules/core/iam/templates/users_list.html b/app/modules/core/iam/templates/users_list.html new file mode 100644 index 0000000..789a1b0 --- /dev/null +++ b/app/modules/core/iam/templates/users_list.html @@ -0,0 +1,56 @@ +{% extends "ui/templates/base/layout.html" %} +{% import "ui/templates/components/macros.html" as ui %} +{% block content %} +
+ {{ ui.page_shell('User Management', 'Audit Firm- and branch-scoped users with filters, pagination, lifecycle controls, role bindings, and invite actions.', 'Create user' if can_manage_users(current_user, current_user_permissions or []) else '') }} + {% if flash %}{{ ui.alert(flash) }}{% endif %} + +
+ {{ ui.search_bar('/system-settings/users', filters.q, filters.per_page) }} + {% if users %} +
+ + + + + + + + + + + + {% for row in users %} + + + + + + + + {% endfor %} + +
UserAudit Firm / BranchRolesLifecycleAction
{{ row.full_name or '-' }}
{{ row.email }}
{{ tenants[row.tenant_id].name if row.tenant_id in tenants else '-' }}
{{ branches[row.branch_id].name if row.branch_id in branches else '-' }}
{% for role_name in user_roles.get(row.id, []) %}{{ ui.badge(role_name, 'brand') }}{% else %}No roles{% endfor %}
{% if row.deleted_at %}{{ ui.badge('Deleted') }}{% endif %}{% if row.is_active %}{{ ui.badge('Active','emerald') }}{% else %}{{ ui.badge('Inactive','rose') }}{% endif %}{% if row.allow_login %}{{ ui.badge('Login enabled','sky') }}{% else %}{{ ui.badge('Login disabled','amber') }}{% endif %}{% if row.is_locked %}{{ ui.badge('Locked','amber') }}{% else %}{{ ui.badge('Unlocked') }}{% endif %}
+ {% if "users.manage" in current_user_permissions %} +
+ Edit + {% if row.deleted_at %} +
+ {% else %} + {% if row.is_active %}
{% else %}
{% endif %} + {% if row.allow_login %}
{% else %}
{% endif %} + {% if row.is_locked %}
{% else %}
{% endif %} + {% if "users.invite" in current_user_permissions and row.allow_login and not row.deleted_at %}
{% endif %} +
+ {% endif %} +
+ {% endif %} +
+
+ {{ ui.pagination(users_page, '/system-settings/users', request.url.query) }} + {% else %} +
{{ ui.empty_state('No users matched the current filter.', 'Try a different search term or create a new user.') }}
+ {% endif %} +
+
+{% endblock %}