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

[#60388] reenable custom options edit for project attributes #17719

Merged
Show file tree
Hide file tree
Changes from all commits
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
15 changes: 10 additions & 5 deletions app/views/admin/settings/project_custom_fields/edit.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,19 @@ See COPYRIGHT and LICENSE files for more details.
))
%>

<%= error_messages_for 'custom_field' %>
<%= error_messages_for "custom_field" %>

<% content_controller "admin--custom-fields",
dynamic: true,
"admin--custom-fields-format-config-value": OpenProject::CustomFieldFormatDependent.stimulus_config
%>

<%= labelled_tabular_form_for @custom_field, as: :custom_field,
url: admin_settings_project_custom_field_path(@custom_field),
html: {method: :put, id: 'custom_field_form'} do |f| %>
<%= render partial: 'custom_fields/form', locals: { f: f, custom_field: @custom_field } %>
html: {method: :put, id: "custom_field_form"} do |f| %>
<%= render partial: "custom_fields/form", locals: { f: f, custom_field: @custom_field } %>
<% if @custom_field.new_record? %>
<%= hidden_field_tag 'type', @custom_field.type %>
<%= hidden_field_tag "type", @custom_field.type %>
<% end %>
<%= styled_button_tag t(:button_save), class: '-highlight -with-icon icon-checkmark' %>
<%= styled_button_tag t(:button_save), class: "-highlight -with-icon icon-checkmark" %>
<% end %>
12 changes: 6 additions & 6 deletions app/views/admin/settings/project_custom_fields/new.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -31,19 +31,19 @@ See COPYRIGHT and LICENSE files for more details.

<%= render(Settings::ProjectCustomFields::NewFormHeaderComponent.new) %>

<%= error_messages_for 'custom_field' %>
<%= error_messages_for "custom_field" %>

<% content_controller "admin--custom-fields",
dynamic: true,
'admin--custom-fields-format-config-value': OpenProject::CustomFieldFormatDependent.stimulus_config
"admin--custom-fields-format-config-value": OpenProject::CustomFieldFormatDependent.stimulus_config
%>

<%= labelled_tabular_form_for @custom_field, as: :custom_field,
url: admin_settings_project_custom_fields_path,
html: { id: 'custom_field_form' } do |f| %>
<%= render partial: 'custom_fields/form', locals: { f: f, custom_field: @custom_field } %>
html: { id: "custom_field_form" } do |f| %>
<%= render partial: "custom_fields/form", locals: { f: f, custom_field: @custom_field } %>
<% if @custom_field.new_record? %>
<%= hidden_field_tag 'type', @custom_field.type %>
<%= hidden_field_tag "type", @custom_field.type %>
<% end %>
<%= styled_button_tag t(:button_save), class: '-highlight -with-icon icon-checkmark' %>
<%= styled_button_tag t(:button_save), class: "-highlight -with-icon icon-checkmark" %>
<% end %>
Loading