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

Hide fixed attributes #3745

Merged
merged 3 commits into from
Aug 23, 2024
Merged

Hide fixed attributes #3745

merged 3 commits into from
Aug 23, 2024

Conversation

ashton22305
Copy link
Contributor

Fixes #3409

This commit doesn't display the information in any alternative format and instead just hides this information.

<%= create_widget(f, attrib, format: nil, hide_fixed: false) %>
<%= create_widget(f, attrib, format: nil) %>
Copy link
Contributor

Choose a reason for hiding this comment

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

I'd have to check on this - but does using hide_fixed: true fix this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

hide_fixed: true will remove all of the fixed attributes, but that also causes them to get removed from the form and not submitted.

Copy link
Contributor

Choose a reason for hiding this comment

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

hide_fixed: true will remove all of the fixed attributes, but that also causes them to get removed from the form and not submitted.

That's too bad... Hmmmm... batch connect applications work this way. Without looking or remembering completely - they must merge what's given in the http form with the form.yml, so anything that's fixed and wasn't in the http form is present after the merge.

Can you take a look at how batch connect apps use fixed? Seems like we should do the same thing.

Comment on lines 181 to 185
cluster_id = if options.has_key?(:auto_batch_clusters)
options[:auto_batch_clusters]
else
smart_attributes.find { |sm| sm.id == 'auto_batch_clusters' }.value.to_sym
end
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you reformat this more like this? I'm guessing we need this addition in the case that auto_batch_clusters is fixed?

    cluster_id = if options.has_key?(:auto_batch_clusters)
                   options[:auto_batch_clusters]
                 else
                   smart_attributes.find { |sm| sm.id == 'auto_batch_clusters' }.value.to_sym
                 end

@johrstrom johrstrom merged commit e02caed into master Aug 23, 2024
26 checks passed
@johrstrom johrstrom deleted the hide-fixed-attributes branch August 23, 2024 16:55
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.

project manager - launcher#show shouldn't show fixed values.
3 participants