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

Abierto
#131 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
Medio día
Aptitud para principiantes
45/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
javascript, php
Área
frontend

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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
Lenguaje dominante
PHP
Estrellas
43
Forks
24
Merge medio
6 h 30 min
PR fusionados (30 d)
1

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de pluginsGLPI/addressing

Todos los issues de pluginsGLPI/addressing

Issues similares

Más issues de PHP

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.