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

オープン
#131 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
半日
初心者へのやさしさ
45/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
javascript, php
領域
frontend

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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
主要言語
PHP
スター
43
フォーク
24
平均マージ
6時間 30分
マージ済み PR(30日)
1

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

pluginsGLPI/addressing のほかの issue

pluginsGLPI/addressing の issue をすべて見る

似ている issue

PHP の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。