Files
2026-02-23 09:08:21 +01:00

70 lines
2.4 KiB
Plaintext

<%#-- copyright
OpenProject is an open source project management software.
Copyright (C) the OpenProject GmbH
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License version 3.
OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:
Copyright (C) 2006-2013 Jean-Philippe Lang
Copyright (C) 2010-2013 the ChiliProject Team
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
See COPYRIGHT and LICENSE files for more details.
++#%>
<% html_title t(:label_administration), "#{CustomField.model_name.human} #{h @custom_field.name}", t(:label_item_plural) %>
<%= render(Admin::CustomFields::EditFormHeaderComponent.new(custom_field: @custom_field, selected: :items)) %>
<%= settings_primer_form_with(
model: @custom_field,
scope: :custom_field,
url: custom_field_path(@custom_field),
html: { id: "custom_field_form" }
) do |f| %>
<%= render partial: "custom_fields/custom_options", locals: { custom_field: @custom_field, f: f } %>
<%=
flex_layout(mt: 4) do |flex|
flex.with_column do
render Primer::Beta::Button.new(
scheme: :secondary,
tag: :a,
href: reorder_alphabetical_custom_field_path(@custom_field),
data: {
turbo_method: :post,
turbo_confirm: t("custom_fields.reorder_confirmation")
},
mr: 2
) do
t("custom_fields.reorder_alphabetical")
end
end
flex.with_column do
render Primer::Beta::Button.new(
scheme: :primary,
type: :submit
) do |button|
button.with_leading_visual_icon(icon: :check)
t(:button_save)
end
end
end
%>
<% end %>