{{-- Multi-step LDAP settings wizard. Four steps: 1. Connection (server URL, TLS, cert) 2. Authenticate & Scope (bind creds + base DN + filters) 3. Attribute Mapping (LDAP-attr → Snipe-IT-field) 4. Sync & Defaults (enable toggle, default group, forgot-pass URL) Layout order inside the box: box-header (title) box-body: step title + help text wizard progress indicator alerts (session flash + inline test result) step-specific field content box-footer: step-specific action buttons (Save & Continue, Back) A11y treatments: - Complete steps carry a checkmark icon in addition to color state so color-blind users have a non-color affordance (WCAG SC 1.4.1). - Every step button carries an sr-only "Step N of 5, {title}, {state}" so screen readers announce full progress context (WCAG SC 1.3.1 / 2.4.6). - Locked buttons reference #wizard-locked-note via aria-describedby so SR users hear WHY the button is disabled. - wire:confirm arms on step buttons only when $dirty is true so users don't lose in-progress edits by clicking around the header. - On step change we dispatch a browser event; the Alpine listener on the wizard panel focuses the new panel's fieldset so keyboard + SR users move with the visual context. --}}
{!! trans('admin/settings/general.ldap_wizard.mapping.sample_username_help') !!}
{{ $step3TestDn }}
| {{ trans('admin/settings/general.ldap_wizard.mapping.preview_snipe_field') }} | {{ trans('admin/settings/general.ldap_wizard.mapping.preview_ldap_attribute') }} | {{ trans('admin/settings/general.ldap_wizard.mapping.preview_ldap_value') }} |
|---|---|---|
| {{ $preview['label'] ?? $snipeField }} |
@if ($preview['attr'])
{{ $preview['attr'] }}
@else
{{ trans('admin/settings/general.ldap_wizard.mapping.field_not_mapped') }}
@endif
|
@if ($preview['value'] !== null) {{ $preview['value'] }} @elseif ($preview['attr']) {{ trans('admin/settings/general.ldap_wizard.mapping.value_missing') }} @endif |
{{ trans('admin/settings/general.ldap_wizard.done.intro') }}
{{ trans('admin/settings/general.ldap_wizard.done.sync_intro') }}
{{-- Persisted-config summary, grouped by wizard step with an "Edit" button that jumps back to that step. Sensitive fields (bind password, TLS client key) are shown as a set/not-set indicator rather than the actual value. Empty fields are hidden. --}} @php // Group field keys by the wizard step they // live on. Kept as an inline map so the // summary stays self-contained; if steps // move fields around, only this array needs // to update (plus the corresponding form // sections above, of course). $summaryGroups = [ 1 => [ 'title' => trans('admin/settings/general.ldap_wizard.step_connection'), 'fields' => [ 'ldap_server' => trans('admin/settings/general.ldap_server'), 'ldap_tls' => trans('admin/settings/general.ldap_tls'), 'ldap_server_cert_ignore' => trans('admin/settings/general.ldap_server_cert_ignore'), 'is_ad' => trans('admin/settings/general.is_ad'), 'ad_domain' => trans('admin/settings/general.ad_domain'), ], ], 2 => [ 'title' => trans('admin/settings/general.ldap_wizard.step_authscope'), 'fields' => [ 'ldap_uname' => trans('admin/settings/general.ldap_uname'), 'ldap_pword' => trans('admin/settings/general.ldap_pword'), 'ldap_basedn' => trans('admin/settings/general.ldap_basedn'), 'ldap_filter' => trans('admin/settings/general.ldap_filter'), 'ldap_auth_filter_query' => trans('admin/settings/general.ldap_auth_filter_query'), ], ], 3 => [ 'title' => trans('admin/settings/general.ldap_wizard.step_mapping'), 'fields' => [ 'ldap_username_field' => trans('admin/settings/general.ldap_username_field'), 'ldap_fname_field' => trans('admin/settings/general.ldap_fname_field'), 'ldap_lname_field' => trans('admin/settings/general.ldap_lname_field'), 'ldap_display_name' => trans('admin/settings/general.ldap_display_name'), 'ldap_email' => trans('admin/settings/general.ldap_email'), 'ldap_emp_num' => trans('admin/settings/general.ldap_emp_num'), 'ldap_phone_field' => trans('admin/settings/general.ldap_phone'), 'ldap_mobile' => trans('admin/settings/general.ldap_mobile'), 'ldap_jobtitle' => trans('admin/settings/general.ldap_jobtitle'), 'ldap_manager' => trans('admin/settings/general.ldap_manager'), 'ldap_dept' => trans('admin/settings/general.ldap_dept'), 'ldap_location' => trans('admin/settings/general.ldap_location'), 'ldap_active_flag' => trans('admin/settings/general.ldap_active_flag'), 'ldap_invert_active_flag' => trans('admin/settings/general.ldap_invert_active_flag'), ], ], 4 => [ 'title' => trans('admin/settings/general.ldap_wizard.step_sync'), 'fields' => [ 'ldap_pw_sync' => trans('admin/settings/general.ldap_pw_sync'), 'ldap_default_group' => trans('admin/settings/general.ldap_default_group'), 'custom_forgot_pass_url' => trans('admin/settings/general.custom_forgot_pass_url'), ], ], ]; // Bind password and TLS client key/cert are // never rendered as their raw persisted // value in the summary - show only whether // they are set. Keeps sensitive material off // any incidental screenshot/screen-share. $summarySecretFields = ['ldap_pword', 'ldap_client_tls_key', 'ldap_client_tls_cert']; @endphp{{ $displayValue }}
{{ $displayValue }}