Commit 82045b8e authored by Mahmoud Aglan's avatar Mahmoud Aglan

Disable FormBridge schema on fill-form to prevent hidden required passport_number

NID is the only ID verification needed. The FormBridge NEW_MEMBERSHIP schema
had passport_number as required (with conditional visibility), causing browser
validation errors. Now always uses our custom form which has no passport field.
Co-Authored-By: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
parent 69293591
......@@ -333,8 +333,6 @@ class MemberController extends Controller
$formFeePaid = $db->selectOne("SELECT id FROM payments WHERE member_id = ? AND payment_type = 'form_fee' AND is_voided = 0 LIMIT 1", [(int) $id]);
if (!$formFeePaid) return $this->redirect('/members/' . $id)->withError('⚠ يجب دفع رسوم الاستمارة أولاً');
$schemaHtml = FormBridge::render('NEW_MEMBERSHIP', $member->toArray());
return $this->view('Members.Views.fill-form', [
'member' => $member,
'branches' => $db->select("SELECT id, name_ar FROM branches WHERE is_active = 1 ORDER BY name_ar"),
......@@ -342,7 +340,7 @@ class MemberController extends Controller
'governorates' => $db->select("SELECT code, name_ar FROM governorates WHERE is_active = 1 ORDER BY name_ar"),
'countries' => $db->select("SELECT nationality_ar FROM countries WHERE is_active = 1 ORDER BY name_ar"),
'specialDiscounts' => SpecialDiscount::allActive(),
'schemaHtml' => $schemaHtml,
'schemaHtml' => '',
]);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment