New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixes #21755: Impossible to move groups #4482
Fixes #21755: Impossible to move groups #4482
Conversation
@@ -222,7 +222,7 @@ class NodeGroupForm( | |||
& "group-save" #> { if (CurrentUser.checkRights(AuthorizationType.Group.Edit)) | |||
<span class="save-tooltip-container"> | |||
{ | |||
SHtml.ajaxButton(<span>Save <i class="fa fa-download"></i></span>, onSubmit _) % ("id" -> saveButtonId) % ("class" -> " btn btn-success btn-icon") | |||
SHtml.ajaxSubmit("Save", onSubmit _) % ("id" -> saveButtonId) % ("class" -> " btn btn-success") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not an easy one for me, I'm still not so sure about how it works, but it seems to resolve the bug
This is how it was done in 7.0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You need to keep the element as before, just replace ajaxButton by ajaxSubmit
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Submit, applies all changes in the form before executing it, Ajaxbutton executes it without the changes from the form. so it explains why the changes were not kept
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
W
You need to keep the element as before, just replace ajaxButton by ajaxSubmit
We can't give HTML to ajaxSubmit
like ajaxButton
(for the icon), we need to find another way to add the dowload icon at the end of the button
@@ -222,7 +222,7 @@ class NodeGroupForm( | |||
& "group-save" #> { if (CurrentUser.checkRights(AuthorizationType.Group.Edit)) | |||
<span class="save-tooltip-container"> | |||
{ | |||
SHtml.ajaxButton(<span>Save <i class="fa fa-download"></i></span>, onSubmit _) % ("id" -> saveButtonId) % ("class" -> " btn btn-success btn-icon") | |||
SHtml.ajaxSubmit("Save", onSubmit _) % ("id" -> saveButtonId) % ("class" -> " btn btn-success") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not an easy one for me, I'm still not so sure about how it works, but it seems to resolve the bug
This is how it was done in 7.0
Commit modified |
106b819
to
d99e3de
Compare
PR updated with a new commit |
@@ -222,10 +222,12 @@ class NodeGroupForm( | |||
& "group-save" #> { if (CurrentUser.checkRights(AuthorizationType.Group.Edit)) | |||
<span class="save-tooltip-container"> | |||
{ | |||
SHtml.ajaxButton(<span>Save <i class="fa fa-download"></i></span>, onSubmit _) % ("id" -> saveButtonId) % ("class" -> " btn btn-success btn-icon") | |||
<button class="btn btn-success btn-icon ui-button ui-corner-all ui-widget" id="groupSaveButtonId"> <span>Save <i class="fa fa-download"></i></span></button> | |||
SHtml.ajaxOnSubmit(onSubmit _) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Commit modified |
1daa5c5
to
df454c1
Compare
@@ -222,10 +222,15 @@ class NodeGroupForm( | |||
& "group-save" #> { if (CurrentUser.checkRights(AuthorizationType.Group.Edit)) | |||
<span class="save-tooltip-container"> | |||
{ | |||
SHtml.ajaxButton(<span>Save <i class="fa fa-download"></i></span>, onSubmit _) % ("id" -> saveButtonId) % ("class" -> " btn btn-success btn-icon") | |||
SHtml.ajaxOnSubmit(onSubmit _)( | |||
<button class="btn btn-success btn-icon ui-button ui-corner-all ui-widget" id="groupSaveButtonId"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you should try to give the id attribute from the saveButtonId val
try something like id="${saveButtonId}"
If saveButtonId was only used here, you may delete it i would be quite happy too
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's used in other places
Commit modified |
df454c1
to
594c2bf
Compare
Fixes #21755: Impossible to move groups
PR rebased |
594c2bf
to
8485087
Compare
OK, merging this PR |
https://issues.rudder.io/issues/21755