[FIX] register.html: ?invite= auto-fill + placeholder corretto; lookup-piva: 500->404 graceful
This commit is contained in:
parent
4143dd31d3
commit
d603f3563f
@ -163,8 +163,8 @@ class OnboardingController extends BaseController
|
||||
], 'Azienda trovata');
|
||||
|
||||
} catch (Throwable $e) {
|
||||
error_log('[PIVA_LOOKUP_ERROR] ' . $e->getMessage());
|
||||
$this->jsonError('Errore nel recupero dati', 500, 'LOOKUP_ERROR');
|
||||
// CertiSource non raggiungibile o endpoint cambiato — trattato come "non trovato"
|
||||
$this->jsonError('Azienda non trovata nel registro. Inserisci i dati manualmente.', 404, 'COMPANY_NOT_FOUND');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -209,7 +209,7 @@
|
||||
<div class="form-group">
|
||||
<label class="form-label" for="invite-code">Codice Invito</label>
|
||||
<input type="text" id="invite-code" class="form-input"
|
||||
placeholder="es. NIS2-XXXX-YYYY" autocomplete="off"
|
||||
placeholder="es. inv_a1b2c3d4e5f6..." autocomplete="off"
|
||||
oninput="validateInvite(this.value)">
|
||||
<div class="lookup-status" id="invite-status"></div>
|
||||
</div>
|
||||
@ -344,8 +344,9 @@
|
||||
if (document.getElementById('card-' + r)) selectRole(r);
|
||||
});
|
||||
}
|
||||
if (params.get('invite_token')) {
|
||||
inviteToken = params.get('invite_token');
|
||||
const _inviteTok = params.get('invite_token') || params.get('invite') || params.get('token');
|
||||
if (_inviteTok) {
|
||||
inviteToken = _inviteTok;
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
const details = document.getElementById('invite-details');
|
||||
details.open = true;
|
||||
@ -372,7 +373,7 @@
|
||||
(function() {
|
||||
const r = params.get('role');
|
||||
if (r && document.getElementById('card-' + r)) selectRole(r);
|
||||
const tok = params.get('invite_token');
|
||||
const tok = params.get('invite_token') || params.get('invite') || params.get('token');
|
||||
if (tok) {
|
||||
inviteToken = tok;
|
||||
document.getElementById('invite-details').open = true;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user