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
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion apps/dashboard/app/views/launchers/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@
<%= bootstrap_form_for(@script, url: submit_project_launcher_path) do |f| %>
<% @script.smart_attributes.each do |attrib| %>
<%# TODO generate render_format %>
<%= 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.

<% if attrib.fixed? %>
<%= f.hidden_field(attrib.id, attrib.field_options) %>
<% end %>
<% end %>

<div class="d-grid gap-2">
Expand Down
Loading