[IP Reservation Modal] Submit button ("+ Add") does not trigger form submission (button.form is null)

Aperta
#131 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
Mezza giornata
Idoneità per principianti
45/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
javascript, php
Ambito
frontend

Direzione di ricerca

The reproduction starts at Tools > IP Addressing, then opens the IP reservation modal from an IP network report, so the modal markup is the place to look; the payload does not name a file. Check whether the "+ Add" submit button is rendered outside the form element that holds the asset fields, since the reporter found btn.form is null. Done means clicking Add sends the POST and creates the reservation, and btn.form returns the form.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Code of Conduct
  • I agree to follow this project's Code of Conduct
Is there an existing issue for this?
  • I have searched the existing issues
GLPI Version

11.0.8

Plugin version

3.2.15

Bug description
Description

When attempting to reserve an IP address from the IP Addressing report modal (IP reservation), clicking the "+ Add" (+ Añadir) button does nothing. No HTTP request (POST/GET) is sent over the network, and no JavaScript errors are printed in the console.

Steps to Reproduce
  1. Go to Tools > IP Addressing and open an IP network report.
  2. Click on a free IP to open the IP reservation modal dialog.
  3. Fill in the required fields (Asset Name, Type, etc.). The validation successfully passes ("Ok you can use this name").
  4. Click on the "+ Add" button.
Expected Behavior

A POST request should be submitted to create the reservation/item, or an AJAX request should be dispatched.

Actual Behavior

Nothing happens. The Network tab records 0 requests upon clicking the button.

Root Cause Analysis

Inspecting the DOM and running tests via DevTools console confirms that the button is orphaned from the form:

const btn = Array.from(document.querySelectorAll('button')).find(b => b.textContent.includes('Añadir') || b.textContent.includes('Add'));
console.log(btn.type); // "submit"
console.log(btn.form); // null

### Relevant log output

```shell

Page URL

No response

Steps To reproduce

No response

Your GLPI setup information

No response

Anything else?
Image Image Image
Lingua principale
PHP
Stelle
43
Fork
24
Merge medio
6h 30m
PR unite (30g)
1

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di pluginsGLPI/addressing

Tutte le issue di pluginsGLPI/addressing

Issue simili

Altre issue su PHP

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.