fix: move linked accounts form outside of infoForm to prevent form submission conflicts

The linkUserForm was nested inside the infoForm, causing the 'Link Account' button
to trigger the parent form's update_application submission instead of the AJAX
membership linking request. Moved the entire Linked Accounts section and form to
come after the infoForm closes, making it a separate form.
This commit is contained in:
twotalesanimation
2025-12-05 11:27:20 +02:00
parent 924e5cdbc9
commit c5112e1ce9

View File

@@ -446,7 +446,15 @@ if (empty($application['id_number'])) {
</div> </div>
<!-- Linked Accounts Section --> <!-- Submit Section -->
<div class="col-md-12">
<div class="form-group mb-0">
<button type="submit" class="theme-btn style-two" style="width:100%;">Update Info</button>
</div>
</div>
</form>
<!-- Linked Accounts Section (OUTSIDE infoForm) -->
<div style="margin-top: 40px; padding: 20px; border-radius: 8px; border: 1px solid #ddd;"> <div style="margin-top: 40px; padding: 20px; border-radius: 8px; border: 1px solid #ddd;">
<div class="section-title" style="margin-bottom: 20px;"> <div class="section-title" style="margin-bottom: 20px;">
<h3>Linked Accounts (Family & Partners)</h3> <h3>Linked Accounts (Family & Partners)</h3>
@@ -514,15 +522,6 @@ if (empty($application['id_number'])) {
</div> </div>
</div> </div>
</div> </div>
<!-- Submit Section -->
<div class="col-md-12">
<div class="form-group mb-0">
<button type="submit" class="theme-btn style-two" style="width:100%;">Update Info</button>
</div>
</div>
</form>
</div> </div>
</div> </div>