-
Notifications
You must be signed in to change notification settings - Fork 357
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
Fix logic to correctly check 'display on button' checkbox #3383
Fix logic to correctly check 'display on button' checkbox #3383
Conversation
@@ -70,7 +70,7 @@ | |||
= _('Text') | |||
.col-md-8 | |||
= @record.name.split('|').first | |||
- display = @record.set_data.key?(:display) ? @record.set_data[:display] : true | |||
- display = @record.set_data.key?(:display) && @record.set_data[:display] == '1' ? true : false |
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.
Wouldn't a plain
@record.set_data.key?(:display) && @record.set_data[:display]
suffice here?
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.
Or @record.set_data.try(:[], :display)
?
@@ -15,7 +15,8 @@ | |||
"data-miq_observe" => {:interval => '.5', :url => url}.to_json) | |||
.input-group-addon | |||
%label.checkbox-inline | |||
= check_box_tag("display", "1", @edit[:new][:display], | |||
- display = @record.set_data.key?(:display) && @record.set_data[:display] == '1' ? true : false |
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.
Same as above.
ba7a3ad
to
86f69d1
Compare
@mzazrivec, Good catch, updated! |
Checked commits bmclaughlin/manageiq-ui-classic@958518b~...86f69d1 with ruby 2.3.3, rubocop 0.52.0, haml-lint 0.20.0, and yamllint 1.10.0 **
|
This PR breaks creating custom button groups for any entity...
Looks like EDIT: fixed in #3431 |
When backporting to gaprindashvili, please backport together with #3431. |
Fix logic to correctly check 'display on button' checkbox (cherry picked from commit 65241dd) https://bugzilla.redhat.com/show_bug.cgi?id=1553214
Gaprindashvili backport details:
|
https://bugzilla.redhat.com/show_bug.cgi?id=1535010
@miq-bot add_labels bug, automation/automate