snapshot: preserve handbook, bilingual phase 2, and logo updates

This commit is contained in:
Md Bayazid Bostame
2026-03-24 12:25:43 +01:00
parent 0f285aa2cf
commit 4d3c7bdf6e
26 changed files with 625 additions and 66 deletions

View File

@@ -1,5 +1,6 @@
from django import forms
from pathlib import Path
from django.utils.translation import get_language
from .form_builder import apply_form_field_config
from .models import EmployeeProfile, FormOption, OffboardingRequest, OnboardingRequest
@@ -214,7 +215,8 @@ class OnboardingRequestForm(forms.ModelForm):
options = FormOption.objects.filter(category=category, is_active=True).order_by('sort_order', 'label')
if not options.exists():
return fallback
return [(o.value or o.label, o.label) for o in options]
language_code = get_language()
return [(o.value or o.label, o.translated_label(language_code)) for o in options]
def __init__(self, *args, **kwargs):
self.requester_email = (kwargs.pop('requester_email', '') or '').strip().lower()