Skip to content
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

Fixed if condition to check for action instead of action_name #2790

Merged
merged 1 commit into from
Nov 21, 2017

Conversation

h-kataria
Copy link
Contributor

When Order button is clicked from list view, action_name value is sent up as x_button making the code go thru if condition and show double buttons on screen.

https://bugzilla.redhat.com/show_bug.cgi?id=1514593

@gmcculloug please test.

@gmcculloug
Copy link
Member

Testing now. @eclarizio can you review as well.

@gmcculloug
Copy link
Member

This is working for me now. Only seeing a single set of submit/cancel buttons for service ordering.

@@ -2059,7 +2059,7 @@ def replace_right_cell(options = {})
}
end
end
if Settings.product.old_dialog_user_ui || action_name != "svc_catalog_provision"
if Settings.product.old_dialog_user_ui && action == "dialog_provision"
Copy link
Member

Choose a reason for hiding this comment

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

I think this solves the issue of double buttons but the && action == "dialog_provision" is unecessary, since we're already in an elsif block that has determined that action == "dialog_provision". This would then change this to just if Settings.product.old_dialog_user_ui, which I think is safe to do since there's no other action that should go through this path.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@eclarizio you are right, made suggested changes

When Order button is clicked from list view, action_name value is sent up as x_button making the code go thru if condition and show double buttons on screen.

https://bugzilla.redhat.com/show_bug.cgi?id=1514593
@miq-bot
Copy link
Member

miq-bot commented Nov 21, 2017

Checked commit h-kataria@c877220 with ruby 2.3.3, rubocop 0.47.1, haml-lint 0.20.0, and yamllint 1.10.0
1 file checked, 0 offenses detected
Everything looks fine. 🏆

@dclarizio dclarizio merged commit e9bf2e7 into ManageIQ:master Nov 21, 2017
@dclarizio dclarizio added this to the Sprint 74 Ending Nov 27, 2017 milestone Nov 21, 2017
h-kataria added a commit to h-kataria/manageiq-ui-classic that referenced this pull request Nov 21, 2017
simaishi pushed a commit that referenced this pull request Nov 27, 2017
Fixed if condition to check for action instead of action_name
(cherry picked from commit e9bf2e7)

https://bugzilla.redhat.com/show_bug.cgi?id=1517882
@simaishi
Copy link
Contributor

Gaprindashvili backport details:

$ git log -1
commit 4d3d27c8ef75ce65bd38fa2d0acb44b258e21067
Author: Dan Clarizio <dclarizi@redhat.com>
Date:   Tue Nov 21 14:40:02 2017 -0800

    Merge pull request #2790 from h-kataria/fix_for_submit_button
    
    Fixed if condition to check for action instead of action_name
    (cherry picked from commit e9bf2e7b337e50a8145a9e4335dc8f9df10c3d9f)
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1517882

@h-kataria h-kataria deleted the fix_for_submit_button branch December 1, 2017 17:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants