Skip to content

fix finding form button to lock#14646

Merged
cedric-anne merged 1 commit intoglpi-project:10.0/bugfixesfrom
btry:fix_block_submit_form_logic_typo
May 3, 2023
Merged

fix finding form button to lock#14646
cedric-anne merged 1 commit intoglpi-project:10.0/bugfixesfrom
btry:fix_block_submit_form_logic_typo

Conversation

@btry
Copy link
Copy Markdown
Contributor

@btry btry commented May 3, 2023

Logic error when searching for form button to lock.

Q A
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets none

@btry btry requested review from cconard96, cedric-anne and orthagh May 3, 2023 09:18
// if submitter is not a button, find the first submit button with add or update as the name
if (submitter === null || !submitter.is('button')) {
submitter = submitter.find('button[name="add"]:first, button[name="update"]:first');
submitter = form.find('button[name="add"]:first, button[name="update"]:first');
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if submitter is null, as stated in the enclosing if () assertion, then this line fails.

@cedric-anne cedric-anne merged commit e68249f into glpi-project:10.0/bugfixes May 3, 2023
@btry btry deleted the fix_block_submit_form_logic_typo branch May 3, 2023 12:39
@cedric-anne cedric-anne added this to the 10.0.8 milestone Jun 9, 2023
@cedric-anne cedric-anne added the bug label Jun 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants