mirror of
https://github.com/opf/openproject.git
synced 2026-06-13 19:20:00 +00:00
Replace confirm with turbo-confirm, method with turbo-method
This commit is contained in:
@@ -58,8 +58,8 @@ See COPYRIGHT and LICENSE files for more details.
|
||||
href: delete_token_admin_backups_path,
|
||||
aria: { label: I18n.t("backup.label_delete_token") },
|
||||
data: {
|
||||
confirm: I18n.t(:text_are_you_sure),
|
||||
method: :post
|
||||
turbo_confirm: I18n.t(:text_are_you_sure),
|
||||
turbo_method: :post
|
||||
},
|
||||
title: I18n.t(:button_delete)
|
||||
) do |button|
|
||||
|
||||
@@ -86,8 +86,11 @@ module Admin
|
||||
helpers.op_icon("icon icon-delete"),
|
||||
{ controller: "/admin/attachments/quarantined_attachments", action: :destroy, id: model },
|
||||
title: I18n.t("antivirus_scan.quarantined_attachments.delete"),
|
||||
method: :delete,
|
||||
data: { confirm: I18n.t(:text_are_you_sure), disable_with: I18n.t(:label_loading) }
|
||||
data: {
|
||||
turbo_method: :delete,
|
||||
turbo_confirm: I18n.t(:text_are_you_sure),
|
||||
turbo_submits_with: I18n.t(:label_loading)
|
||||
}
|
||||
)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -41,8 +41,8 @@ See COPYRIGHT and LICENSE files for more details.
|
||||
href: color_path(@color),
|
||||
aria: { label: I18n.t(:button_delete) },
|
||||
data: {
|
||||
confirm: I18n.t(:text_are_you_sure),
|
||||
method: :delete
|
||||
turbo_confirm: I18n.t(:text_are_you_sure),
|
||||
turbo_method: :delete
|
||||
},
|
||||
title: I18n.t(:button_delete)
|
||||
) do |button|
|
||||
|
||||
@@ -63,8 +63,10 @@ module CustomActions
|
||||
link_to(
|
||||
helpers.op_icon("icon icon-delete"),
|
||||
helpers.custom_action_path(action),
|
||||
method: :delete,
|
||||
data: { confirm: I18n.t(:text_are_you_sure) },
|
||||
data: {
|
||||
turbo_method: :delete,
|
||||
turbo_confirm: I18n.t(:text_are_you_sure)
|
||||
},
|
||||
title: t(:button_delete)
|
||||
)
|
||||
end
|
||||
|
||||
@@ -64,8 +64,7 @@ module Enumerations
|
||||
helpers.link_to(
|
||||
helpers.op_icon("icon icon-delete"),
|
||||
helpers.enumeration_path(enumeration),
|
||||
method: :delete,
|
||||
data: { confirm: I18n.t(:text_are_you_sure) },
|
||||
data: { turbo_method: :delete, turbo_confirm: I18n.t(:text_are_you_sure) },
|
||||
title: t(:button_delete)
|
||||
)
|
||||
end
|
||||
|
||||
@@ -54,8 +54,8 @@ See COPYRIGHT and LICENSE files for more details.
|
||||
href: group_path(@group),
|
||||
aria: { label: I18n.t(:button_delete) },
|
||||
data: {
|
||||
confirm: t(:text_are_you_sure),
|
||||
method: :delete
|
||||
turbo_confirm: t(:text_are_you_sure),
|
||||
turbo_method: :delete
|
||||
},
|
||||
title: I18n.t(:button_delete)
|
||||
) do |button|
|
||||
|
||||
@@ -55,8 +55,8 @@ See COPYRIGHT and LICENSE files for more details.
|
||||
href: group_path(@group),
|
||||
aria: { label: I18n.t(:button_delete) },
|
||||
data: {
|
||||
confirm: t(:text_are_you_sure),
|
||||
method: :delete
|
||||
turbo_confirm: t(:text_are_you_sure),
|
||||
turbo_method: :delete
|
||||
},
|
||||
title: I18n.t(:button_delete)
|
||||
) do |button|
|
||||
|
||||
@@ -62,8 +62,7 @@ module LdapAuthSources
|
||||
|
||||
link_to I18n.t(:button_delete),
|
||||
{ controller: "ldap_auth_sources", id: model.id, action: :destroy },
|
||||
method: :delete,
|
||||
data: { confirm: I18n.t(:text_are_you_sure) },
|
||||
data: { turbo_method: :delete, turbo_confirm: I18n.t(:text_are_you_sure) },
|
||||
class: "icon icon-delete",
|
||||
title: I18n.t(:button_delete)
|
||||
end
|
||||
|
||||
@@ -62,8 +62,8 @@ See COPYRIGHT and LICENSE files for more details.
|
||||
|
||||
<% dialog.with_footer do %>
|
||||
<%= cancel_button %>
|
||||
<%= button(scheme: :danger, tag: :a, href: delete_url(project: true), data: { method: :delete }) { t(:button_remove_member) } %>
|
||||
<%= button(scheme: :danger, tag: :a, href: delete_url(project: true, work_package_shares_role_id: "all"), data: { method: :delete }) { t(:button_remove_member_and_shares) } %>
|
||||
<%= button(scheme: :danger, tag: :a, href: delete_url(project: true), data: { turbo_method: :delete }) { t(:button_remove_member) } %>
|
||||
<%= button(scheme: :danger, tag: :a, href: delete_url(project: true, work_package_shares_role_id: "all"), data: { turbo_method: :delete }) { t(:button_remove_member_and_shares) } %>
|
||||
<% end %>
|
||||
<% when can_delete_roles? %>
|
||||
<% dialog.with_body do %>
|
||||
@@ -78,7 +78,7 @@ See COPYRIGHT and LICENSE files for more details.
|
||||
|
||||
<% dialog.with_footer do %>
|
||||
<%= cancel_button %>
|
||||
<%= button(scheme: :danger, tag: :a, href: delete_url(project: true), data: { method: :delete }) { t(:button_remove) } %>
|
||||
<%= button(scheme: :danger, tag: :a, href: delete_url(project: true), data: { turbo_method: :delete }) { t(:button_remove) } %>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<% dialog.with_body do %>
|
||||
|
||||
@@ -59,8 +59,8 @@ See COPYRIGHT and LICENSE files for more details.
|
||||
|
||||
<% dialog.with_footer do %>
|
||||
<%= cancel_button %>
|
||||
<%= button(scheme: :danger, tag: :a, href: delete_url(work_package_shares_role_id: "all"), data: { method: :delete }) { t(:button_revoke_all) } %>
|
||||
<%= button(scheme: :danger, tag: :a, href: delete_url(work_package_shares_role_id: shared_role_id), data: { method: :delete }) { t(:button_revoke_only, shared_role_name:) } %>
|
||||
<%= button(scheme: :danger, tag: :a, href: delete_url(work_package_shares_role_id: "all"), data: { turbo_method: :delete }) { t(:button_revoke_all) } %>
|
||||
<%= button(scheme: :danger, tag: :a, href: delete_url(work_package_shares_role_id: shared_role_id), data: { turbo_method: :delete }) { t(:button_revoke_only, shared_role_name:) } %>
|
||||
<% end %>
|
||||
<% when direct_shared_work_packages_count? %>
|
||||
<% dialog.with_body do %>
|
||||
@@ -84,7 +84,7 @@ See COPYRIGHT and LICENSE files for more details.
|
||||
|
||||
<% dialog.with_footer do %>
|
||||
<%= cancel_button %>
|
||||
<%= button(scheme: :danger, tag: :a, href: delete_url(work_package_shares_role_id: "all"), data: { method: :delete }) { t(:button_revoke_access) } %>
|
||||
<%= button(scheme: :danger, tag: :a, href: delete_url(work_package_shares_role_id: "all"), data: { turbo_method: :delete }) { t(:button_revoke_access) } %>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<% dialog.with_body do %>
|
||||
|
||||
@@ -49,8 +49,8 @@
|
||||
href: topic_path(@topic),
|
||||
aria: { label: I18n.t(:button_delete) },
|
||||
data: {
|
||||
confirm: I18n.t(:text_are_you_sure),
|
||||
method: :delete
|
||||
turbo_confirm: I18n.t(:text_are_you_sure),
|
||||
turbo_method: :delete
|
||||
},
|
||||
title: I18n.t(:button_delete)
|
||||
) do |button|
|
||||
|
||||
@@ -62,8 +62,11 @@ module My
|
||||
action: delete_action,
|
||||
access_token_id: api_token.id
|
||||
},
|
||||
method: :delete,
|
||||
data: { confirm: t("my_account.access_tokens.simple_revoke_confirmation"), test_selector: "api-token-revoke" },
|
||||
data: {
|
||||
turbo_method: :delete,
|
||||
turbo_confirm: t("my_account.access_tokens.simple_revoke_confirmation"),
|
||||
test_selector: "api-token-revoke"
|
||||
},
|
||||
class: "icon icon-delete"
|
||||
end
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
subheader.with_action_button(
|
||||
tag: :a,
|
||||
href: mark_all_read_notifications_path(**current_filters),
|
||||
data: { method: :post, confirm: I18n.t("js.notifications.center.mark_all_read_confirmation") },
|
||||
data: { turbo_method: :post, turbo_confirm: I18n.t("js.notifications.center.mark_all_read_confirmation") },
|
||||
size: :medium,
|
||||
leading_icon: :"op-read-all",
|
||||
label: I18n.t("js.notifications.center.mark_all_read"),
|
||||
|
||||
@@ -55,8 +55,8 @@ See COPYRIGHT and LICENSE files for more details.
|
||||
href: oauth_application_path(@application),
|
||||
aria: { label: I18n.t(:button_delete) },
|
||||
data: {
|
||||
confirm: I18n.t(:text_are_you_sure),
|
||||
method: :delete
|
||||
turbo_confirm: I18n.t(:text_are_you_sure),
|
||||
turbo_method: :delete
|
||||
},
|
||||
title: I18n.t(:button_delete)
|
||||
) do |button|
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
classes: "op-primer--star-icon",
|
||||
tag: :a,
|
||||
href: helpers.build_favorite_path(query, format: :html),
|
||||
data: { method: :delete, "test-selector": "project-query-unfavorite" }
|
||||
data: { turbo_method: :delete, "test-selector": "project-query-unfavorite" }
|
||||
)
|
||||
else
|
||||
header.with_action_icon_button(
|
||||
@@ -63,7 +63,7 @@
|
||||
label: t(:button_favorite),
|
||||
tag: :a,
|
||||
href: helpers.build_favorite_path(query, format: :html),
|
||||
data: { method: :post, "test-selector": "project-query-favorite" }
|
||||
data: { turbo_method: :post, "test-selector": "project-query-favorite" }
|
||||
)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -58,7 +58,7 @@ module Projects
|
||||
tag: :a,
|
||||
tooltip_direction: :e,
|
||||
href: helpers.build_favorite_path(project, format: :html),
|
||||
data: { "turbo-method": currently_favorited? ? :delete : :post },
|
||||
data: { turbo_method: currently_favorited? ? :delete : :post },
|
||||
classes: currently_favorited? ? "op-primer--star-icon " : "op-project-row-component--favorite",
|
||||
label: currently_favorited? ? I18n.t(:button_unfavorite) : I18n.t(:button_favorite),
|
||||
aria: { label: currently_favorited? ? I18n.t(:button_unfavorite) : I18n.t(:button_favorite) },
|
||||
@@ -362,8 +362,8 @@ module Projects
|
||||
label: I18n.t(:button_archive),
|
||||
href: project_archive_path(project, status: params[:status]),
|
||||
data: {
|
||||
confirm: t("project.archive.are_you_sure", name: project.name),
|
||||
method: :post
|
||||
turbo_method: :post,
|
||||
turbo_confirm: t("project.archive.are_you_sure", name: project.name)
|
||||
}
|
||||
}
|
||||
end
|
||||
@@ -376,7 +376,7 @@ module Projects
|
||||
icon: :unlock,
|
||||
label: I18n.t(:button_unarchive),
|
||||
href: project_archive_path(project, status: params[:status]),
|
||||
data: { method: :delete }
|
||||
data: { turbo_method: :delete }
|
||||
}
|
||||
end
|
||||
end
|
||||
|
||||
@@ -81,7 +81,7 @@
|
||||
label: t(:button_archive),
|
||||
href: project_archive_path(@project, status: "", name: @project.name),
|
||||
content_arguments: {
|
||||
data: { confirm: t("project.archive.are_you_sure", name: @project.name), method: :post },
|
||||
data: { turbo_method: :post, turbo_confirm: t("project.archive.are_you_sure", name: @project.name) },
|
||||
test_selector: "project-settings--archive"
|
||||
}
|
||||
) do |item|
|
||||
@@ -96,7 +96,7 @@
|
||||
label: t("project.template.#{label}"),
|
||||
href: project_templated_path(@project),
|
||||
content_arguments: {
|
||||
data: { method: @project.templated ? :delete : :post },
|
||||
data: { turbo_method: @project.templated ? :delete : :post },
|
||||
test_selector: "project-settings--mark-template"
|
||||
}
|
||||
) do |item|
|
||||
|
||||
@@ -89,8 +89,12 @@ module Settings
|
||||
scheme: :danger,
|
||||
href: admin_settings_project_custom_field_path(@project_custom_field),
|
||||
form_arguments: {
|
||||
method: :delete, data: { confirm: t("text_are_you_sure_with_project_custom_fields"),
|
||||
"turbo-stream": true, test_selector: "project-custom-field-delete" }
|
||||
method: :delete,
|
||||
data: {
|
||||
turbo_confirm: t("text_are_you_sure_with_project_custom_fields"),
|
||||
turbo_stream: true,
|
||||
test_selector: "project-custom-field-delete"
|
||||
}
|
||||
}) do |item|
|
||||
item.with_leading_visual_icon(icon: :trash)
|
||||
end
|
||||
|
||||
@@ -116,8 +116,12 @@ module Settings
|
||||
scheme: :danger,
|
||||
href: admin_settings_project_custom_field_section_path(@project_custom_field_section),
|
||||
form_arguments: {
|
||||
method: :delete, data: { confirm: t("text_are_you_sure"), "turbo-stream": true,
|
||||
test_selector: "project-custom-field-section-delete" }
|
||||
method: :delete,
|
||||
data: {
|
||||
turbo_confirm: t(:text_are_you_sure),
|
||||
turbo_stream: true,
|
||||
test_selector: "project-custom-field-section-delete"
|
||||
}
|
||||
}) do |item|
|
||||
item.with_leading_visual_icon(icon: :trash)
|
||||
end
|
||||
|
||||
@@ -81,7 +81,7 @@ See COPYRIGHT and LICENSE files for more details.
|
||||
form_arguments: {
|
||||
method: :delete,
|
||||
data: {
|
||||
confirm: t("text_are_you_sure_with_project_life_cycle_step")
|
||||
turbo_confirm: t("text_are_you_sure_with_project_life_cycle_step")
|
||||
}
|
||||
}
|
||||
) do |item|
|
||||
|
||||
@@ -78,8 +78,7 @@ module Statuses
|
||||
link_to(
|
||||
helpers.op_icon("icon icon-delete"),
|
||||
status_path(status),
|
||||
method: :delete,
|
||||
data: { confirm: I18n.t(:text_are_you_sure) },
|
||||
data: { turbo_method: :delete, turbo_confirm: I18n.t(:text_are_you_sure) },
|
||||
title: t(:button_delete)
|
||||
)
|
||||
end
|
||||
|
||||
@@ -51,7 +51,7 @@ See COPYRIGHT and LICENSE files for more details.
|
||||
mobile_label: t(:label_send_invitation),
|
||||
size: :medium,
|
||||
href: resend_invitation_user_path(@user),
|
||||
data: { method: :post },
|
||||
data: { turbo_method: :post },
|
||||
aria: { label: I18n.t(:label_send_invitation) },
|
||||
title: I18n.t(:tooltip_resend_invitation)
|
||||
) do |button|
|
||||
@@ -70,7 +70,7 @@ See COPYRIGHT and LICENSE files for more details.
|
||||
size: :medium,
|
||||
name: name,
|
||||
href: change_status_user_path(@user, { name => "" }),
|
||||
data: { method: :post },
|
||||
data: { turbo_method: :post },
|
||||
aria: { label: title },
|
||||
title: title
|
||||
) do |button|
|
||||
|
||||
@@ -105,9 +105,9 @@ module Users
|
||||
href: url_for(revoke_path),
|
||||
"aria-label": I18n.t(:button_revoke),
|
||||
data: {
|
||||
method: :delete,
|
||||
confirm: I18n.t(:text_are_you_sure),
|
||||
disable_with: I18n.t(:label_loading)
|
||||
turbo_method: :delete,
|
||||
turbo_confirm: I18n.t(:text_are_you_sure),
|
||||
turbo_submits_with: I18n.t(:label_loading)
|
||||
}
|
||||
)
|
||||
)
|
||||
|
||||
@@ -55,7 +55,7 @@ See COPYRIGHT and LICENSE files for more details.
|
||||
mobile_label: t(:label_send_invitation),
|
||||
size: :medium,
|
||||
href: resend_invitation_user_path(@user),
|
||||
data: { method: :post },
|
||||
data: { turbo_method: :post },
|
||||
aria: { label: I18n.t(:label_send_invitation) },
|
||||
title: I18n.t(:tooltip_resend_invitation)
|
||||
) do |button|
|
||||
|
||||
@@ -108,8 +108,7 @@ module Versions
|
||||
|
||||
helpers.link_to_if_authorized "",
|
||||
{ controller: "/versions", action: "destroy", id: version },
|
||||
data: { confirm: t(:text_are_you_sure) },
|
||||
method: :delete,
|
||||
data: { turbo_method: :delete, turbo_confirm: t(:text_are_you_sure) },
|
||||
class: "icon icon-delete",
|
||||
title: t(:button_delete)
|
||||
end
|
||||
|
||||
@@ -80,7 +80,7 @@ See COPYRIGHT and LICENSE files for more details.
|
||||
label: lock_data[:label],
|
||||
tag: :a,
|
||||
size: :medium,
|
||||
content_arguments: { data: { method: :post } },
|
||||
content_arguments: { data: { turbo_method: :post } },
|
||||
href: url_for(controller: "wiki", action: "protect", id: @page, protected: lock_data[:protected])
|
||||
) do |item|
|
||||
item.with_leading_visual_icon(icon: lock_data[:icon])
|
||||
@@ -116,7 +116,7 @@ See COPYRIGHT and LICENSE files for more details.
|
||||
scheme: :danger,
|
||||
tag: :a,
|
||||
size: :medium,
|
||||
content_arguments: { data: { confirm: t(:text_are_you_sure), method: :delete } },
|
||||
content_arguments: { data: { turbo_confirm: t(:text_are_you_sure), turbo_method: :delete } },
|
||||
href: url_for(controller: "wiki", action: "destroy", id: @page),
|
||||
data: { "test-selector": "wiki-delete-action-menu-item" }
|
||||
) do |item|
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
form_arguments: {
|
||||
method: :delete,
|
||||
data: {
|
||||
confirm: t("text_are_you_sure"),
|
||||
turbo_confirm: t("text_are_you_sure"),
|
||||
turbo_stream: true,
|
||||
update_work_package: true
|
||||
}
|
||||
|
||||
@@ -86,8 +86,7 @@ module WorkPackageTypes
|
||||
link_to(
|
||||
"",
|
||||
model,
|
||||
method: :delete,
|
||||
data: { confirm: t(:text_are_you_sure) },
|
||||
data: { turbo_method: :delete, turbo_confirm: t(:text_are_you_sure) },
|
||||
class: "icon icon-delete",
|
||||
title: t(:button_delete)
|
||||
)
|
||||
|
||||
@@ -52,7 +52,7 @@ module Admin
|
||||
I18n.t("antivirus_scan.deleted_by_admin", filename: @attachment.filename))
|
||||
|
||||
flash[:notice] = t(:notice_successful_delete)
|
||||
redirect_to action: :index
|
||||
redirect_to action: :index, status: :see_other
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
@@ -62,7 +62,7 @@ class AdminController < ApplicationController
|
||||
@plugins = Redmine::Plugin.not_bundled.sort
|
||||
end
|
||||
|
||||
def test_email
|
||||
def test_email # rubocop:disable Metrics/AbcSize
|
||||
raise_delivery_errors = ActionMailer::Base.raise_delivery_errors
|
||||
# Force ActionMailer to raise delivery errors so we can catch it
|
||||
ActionMailer::Base.raise_delivery_errors = true
|
||||
@@ -73,7 +73,7 @@ class AdminController < ApplicationController
|
||||
flash[:error] = I18n.t(:notice_email_error, value: Redmine::CodesetUtil.replace_invalid_utf8(e.message.dup))
|
||||
end
|
||||
ActionMailer::Base.raise_delivery_errors = raise_delivery_errors
|
||||
redirect_to admin_settings_mail_notifications_path
|
||||
redirect_to admin_settings_mail_notifications_path, status: :see_other
|
||||
end
|
||||
|
||||
def info
|
||||
|
||||
@@ -93,7 +93,8 @@ class AttributeHelpTextsController < ApplicationController
|
||||
flash[:error] = t(:error_can_not_delete_entry)
|
||||
end
|
||||
|
||||
redirect_to attribute_help_texts_path(tab: @attribute_help_text.attribute_scope)
|
||||
redirect_to attribute_help_texts_path(tab: @attribute_help_text.attribute_scope),
|
||||
status: :see_other
|
||||
end
|
||||
|
||||
protected
|
||||
|
||||
@@ -100,7 +100,7 @@ module CustomFields
|
||||
rescue StandardError
|
||||
flash[:error] = I18n.t(:error_can_not_delete_custom_field)
|
||||
end
|
||||
redirect_to index_path(@custom_field, tab: @custom_field.class.name)
|
||||
redirect_to index_path(@custom_field, tab: @custom_field.class.name), status: :see_other
|
||||
end
|
||||
|
||||
def delete_option
|
||||
@@ -114,7 +114,7 @@ module CustomFields
|
||||
flash[:error] = @custom_option.errors.full_messages
|
||||
end
|
||||
|
||||
redirect_to edit_path(@custom_field, id: @custom_field.id)
|
||||
redirect_to edit_path(@custom_field, id: @custom_field.id), status: :see_other
|
||||
end
|
||||
|
||||
def new_custom_field
|
||||
|
||||
@@ -68,7 +68,7 @@ class CustomActionsController < ApplicationController
|
||||
def destroy
|
||||
@custom_action.destroy
|
||||
|
||||
redirect_to custom_actions_path
|
||||
redirect_to custom_actions_path, status: :see_other
|
||||
end
|
||||
|
||||
private
|
||||
@@ -76,7 +76,7 @@ class CustomActionsController < ApplicationController
|
||||
def index_or_render(render_action)
|
||||
->(call) {
|
||||
call.on_success do
|
||||
redirect_to custom_actions_path
|
||||
redirect_to custom_actions_path, status: :see_other
|
||||
end
|
||||
|
||||
call.on_failure do
|
||||
|
||||
@@ -77,7 +77,7 @@ class GroupsController < ApplicationController
|
||||
|
||||
if service_call.success?
|
||||
flash[:notice] = I18n.t(:notice_successful_update)
|
||||
redirect_to(groups_path)
|
||||
redirect_to(groups_path, status: :see_other)
|
||||
else
|
||||
render action: :edit, status: :unprocessable_entity
|
||||
end
|
||||
@@ -89,7 +89,7 @@ class GroupsController < ApplicationController
|
||||
.call
|
||||
|
||||
flash[:info] = I18n.t(:notice_deletion_scheduled)
|
||||
redirect_to(action: :index)
|
||||
redirect_to(action: :index, status: :see_other)
|
||||
end
|
||||
|
||||
def add_users
|
||||
@@ -139,7 +139,11 @@ class GroupsController < ApplicationController
|
||||
.call
|
||||
|
||||
flash[:notice] = I18n.t :notice_successful_delete
|
||||
redirect_to controller: "/groups", action: "edit", id: @group, tab: redirected_to_tab(member)
|
||||
redirect_to controller: "/groups",
|
||||
action: "edit",
|
||||
id: @group,
|
||||
tab: redirected_to_tab(member),
|
||||
status: :see_other
|
||||
end
|
||||
|
||||
protected
|
||||
@@ -187,6 +191,10 @@ class GroupsController < ApplicationController
|
||||
service_call.apply_flash_message!(flash)
|
||||
end
|
||||
|
||||
redirect_to controller: "/groups", action: "edit", id: @group, tab: "users"
|
||||
redirect_to controller: "/groups",
|
||||
action: "edit",
|
||||
id: @group,
|
||||
tab: "users",
|
||||
status: :see_other
|
||||
end
|
||||
end
|
||||
|
||||
@@ -96,7 +96,7 @@ class LdapAuthSourcesController < ApplicationController
|
||||
else
|
||||
flash[:warning] = t(:notice_wont_delete_auth_source)
|
||||
end
|
||||
redirect_to action: "index"
|
||||
redirect_to action: "index", status: :see_other
|
||||
end
|
||||
|
||||
protected
|
||||
|
||||
@@ -97,7 +97,7 @@ class MembersController < ApplicationController
|
||||
display_error(service_call)
|
||||
end
|
||||
|
||||
redirect_to project_members_path(project_id: @project)
|
||||
redirect_to project_members_path(project_id: @project), status: :see_other
|
||||
end
|
||||
|
||||
def autocomplete_for_member
|
||||
|
||||
@@ -77,7 +77,7 @@ module My
|
||||
else
|
||||
flash[:error] = I18n.t("my_account.access_tokens.storages.failed")
|
||||
end
|
||||
redirect_to action: :index
|
||||
redirect_to action: :index, status: :see_other
|
||||
end
|
||||
|
||||
def generate_rss_key # rubocop:disable Metrics/AbcSize
|
||||
@@ -91,7 +91,7 @@ module My
|
||||
Rails.logger.error "Failed to reset user ##{current_user.id} RSS key: #{e}"
|
||||
flash[:error] = t("my.access_token.failed_to_reset_token", error: e.message)
|
||||
ensure
|
||||
redirect_to action: :index
|
||||
redirect_to action: :index, status: :see_other
|
||||
end
|
||||
|
||||
def revoke_rss_key
|
||||
@@ -101,7 +101,7 @@ module My
|
||||
Rails.logger.error "Failed to revoke rss token ##{current_user.id}: #{e}"
|
||||
flash[:error] = t("my.access_token.failed_to_reset_token", error: e.message)
|
||||
ensure
|
||||
redirect_to action: :index
|
||||
redirect_to action: :index, status: :see_other
|
||||
end
|
||||
|
||||
def generate_api_key
|
||||
@@ -139,7 +139,7 @@ module My
|
||||
end
|
||||
# rubocop:enable Rails/ActionControllerFlashBeforeRender
|
||||
|
||||
redirect_to action: :index
|
||||
redirect_to action: :index, status: :see_other
|
||||
end
|
||||
|
||||
def revoke_ical_meeting_token # rubocop:disable Metrics/AbcSize
|
||||
@@ -158,7 +158,7 @@ module My
|
||||
end
|
||||
# rubocop:enable Rails/ActionControllerFlashBeforeRender
|
||||
|
||||
redirect_to action: :index
|
||||
redirect_to action: :index, status: :see_other
|
||||
end
|
||||
|
||||
def revoke_ical_token
|
||||
@@ -169,7 +169,7 @@ module My
|
||||
Rails.logger.error "Failed to revoke all ical tokens for ##{current_user.id}: #{e}"
|
||||
flash[:error] = t("my.access_token.failed_to_reset_token", error: e.message)
|
||||
ensure
|
||||
redirect_to action: :index
|
||||
redirect_to action: :index, status: :see_other
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
@@ -42,7 +42,7 @@ module My
|
||||
@token.destroy
|
||||
|
||||
flash[:notice] = I18n.t(:notice_successful_delete)
|
||||
redirect_to my_sessions_path
|
||||
redirect_to my_sessions_path, status: :see_other
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
@@ -65,7 +65,7 @@ module My
|
||||
@session.delete
|
||||
|
||||
flash[:notice] = I18n.t(:notice_successful_delete)
|
||||
redirect_to action: :index
|
||||
redirect_to action: :index, status: :see_other
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
@@ -96,7 +96,7 @@ module OAuth
|
||||
flash[:error] = t(:error_can_not_delete_entry)
|
||||
end
|
||||
|
||||
redirect_to action: :index
|
||||
redirect_to action: :index, status: :see_other
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
@@ -47,11 +47,12 @@ class Projects::ArchiveController < ApplicationController
|
||||
service_call = change_status(status)
|
||||
|
||||
if service_call.success?
|
||||
redirect_to(projects_path)
|
||||
redirect_to(projects_path, status: :see_other)
|
||||
else
|
||||
flash[:error] = t(:"error_can_not_#{status}_project",
|
||||
errors: service_call.errors.full_messages.join(", "))
|
||||
redirect_back fallback_location: projects_path
|
||||
redirect_back fallback_location: projects_path,
|
||||
status: :see_other
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ class Projects::TemplatedController < ApplicationController
|
||||
|
||||
private
|
||||
|
||||
def change_templated_action(templated)
|
||||
def change_templated_action(templated) # rubocop:disable Metrics/AbcSize
|
||||
service_call = Projects::UpdateService
|
||||
.new(user: current_user,
|
||||
model: @project)
|
||||
@@ -59,6 +59,6 @@ class Projects::TemplatedController < ApplicationController
|
||||
flash[:error] = messages.join(". ")
|
||||
end
|
||||
|
||||
redirect_to project_settings_general_path(@project)
|
||||
redirect_to project_settings_general_path(@project), status: :see_other
|
||||
end
|
||||
end
|
||||
|
||||
@@ -129,7 +129,8 @@ class RepositoriesController < ApplicationController
|
||||
else
|
||||
flash[:error] = repository.errors.full_messages
|
||||
end
|
||||
redirect_to project_settings_repository_path(@project)
|
||||
redirect_to project_settings_repository_path(@project),
|
||||
status: :see_other
|
||||
end
|
||||
|
||||
alias_method :browse, :show
|
||||
|
||||
@@ -111,7 +111,7 @@ class VersionsController < ApplicationController
|
||||
flash[:error] << archived_project_mesage if archived_projects.any?
|
||||
end
|
||||
|
||||
redirect_to project_settings_versions_path(@project)
|
||||
redirect_to project_settings_versions_path(@project), status: :see_other
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
@@ -60,7 +60,7 @@ class WatchersController < ApplicationController
|
||||
|
||||
def set_watcher(user, watching)
|
||||
@watched.set_watcher(user, watching)
|
||||
redirect_back(fallback_location: home_url)
|
||||
redirect_back(fallback_location: home_url, status: :see_other)
|
||||
end
|
||||
|
||||
def deny_access_unless_visible
|
||||
|
||||
@@ -280,9 +280,9 @@ class WikiController < ApplicationController
|
||||
|
||||
# Removes a wiki page and its history
|
||||
# Children can be either set as root pages, removed or reassigned to another parent page
|
||||
def destroy
|
||||
def destroy # rubocop:disable Metrics/AbcSize, Metrics/PerceivedComplexity
|
||||
unless editable?
|
||||
flash[:error] = I18n.t(:error_unable_delete_wiki)
|
||||
flash.now[:error] = I18n.t(:error_unable_delete_wiki)
|
||||
return render_403
|
||||
end
|
||||
|
||||
@@ -309,12 +309,11 @@ class WikiController < ApplicationController
|
||||
end
|
||||
@page.destroy
|
||||
|
||||
flash[:notice] = I18n.t(:notice_successful_delete)
|
||||
if page = @wiki.find_page(@wiki.start_page) || @wiki.pages.first
|
||||
flash[:notice] = I18n.t(:notice_successful_delete)
|
||||
redirect_to action: "index", project_id: @project, id: page
|
||||
redirect_to action: "index", project_id: @project, id: page, status: :see_other
|
||||
else
|
||||
flash[:notice] = I18n.t(:notice_successful_delete)
|
||||
redirect_to project_path(@project)
|
||||
redirect_to project_path(@project), status: :see_other
|
||||
end
|
||||
end
|
||||
|
||||
@@ -345,6 +344,7 @@ class WikiController < ApplicationController
|
||||
def show_create?
|
||||
@editable && @page && User.current.allowed_in_project?(:edit_wiki_pages, @project)
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def locked?
|
||||
|
||||
@@ -103,7 +103,7 @@ class WikiMenuItemsController < ApplicationController
|
||||
flash[:notice] = t(:notice_successful_update)
|
||||
end
|
||||
|
||||
redirect_back_or_default({ action: "edit", id: @page })
|
||||
redirect_back_or_default({ action: "edit", id: @page }, status: :see_other)
|
||||
else
|
||||
respond_to do |format|
|
||||
format.html do
|
||||
|
||||
@@ -93,7 +93,7 @@ module WorkPackageTypes
|
||||
else
|
||||
flash[:error] = destroy_error_message
|
||||
end
|
||||
redirect_to action: "index"
|
||||
redirect_to action: "index", status: :see_other
|
||||
end
|
||||
|
||||
protected
|
||||
|
||||
@@ -99,8 +99,7 @@ module ApplicationHelper
|
||||
|
||||
def delete_link(url, options = {})
|
||||
options = {
|
||||
method: :delete,
|
||||
data: { confirm: I18n.t(:text_are_you_sure) },
|
||||
data: { turbo_method: :delete, turbo_confirm: I18n.t(:text_are_you_sure) },
|
||||
class: "icon icon-delete"
|
||||
}.merge(options)
|
||||
|
||||
@@ -199,10 +198,10 @@ module ApplicationHelper
|
||||
|
||||
def time_tag(time)
|
||||
text = distance_of_time_in_words(Time.now, time)
|
||||
if @project and @project.module_enabled?("activity")
|
||||
if @project&.module_enabled?("activity") # rubocop:disable Rails/HelperInstanceVariable
|
||||
link_to(text, { controller: "/activities",
|
||||
action: "index",
|
||||
project_id: @project,
|
||||
project_id: @project, # rubocop:disable Rails/HelperInstanceVariable
|
||||
from: time.to_date },
|
||||
title: format_time(time))
|
||||
else
|
||||
|
||||
@@ -38,13 +38,16 @@ module MembersHelper
|
||||
if member.roles.length == 1
|
||||
link_to("",
|
||||
principal_membership_path(member.principal, member),
|
||||
{ method: :delete, class: "icon icon-delete", title: t(:button_delete),
|
||||
data: { "test-selector" => "delete-global-role" } })
|
||||
{ class: "icon icon-delete", title: t(:button_delete),
|
||||
data: { turbo_method: :delete, "test-selector" => "delete-global-role" } })
|
||||
else
|
||||
link_to("",
|
||||
principal_membership_path(member.principal, member, "membership[role_ids]" => member.roles - [role]),
|
||||
{ method: :patch, class: "icon icon-delete", title: t(:button_delete),
|
||||
data: { "test-selector" => "delete-global-role" } })
|
||||
{
|
||||
class: "icon icon-delete",
|
||||
title: t(:button_delete),
|
||||
data: { turbo_method: :patch, "test-selector" => "delete-global-role" }
|
||||
})
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -49,7 +49,7 @@ module ReorderLinksHelper
|
||||
class: "icon-context #{icon_class} icon-small")
|
||||
link_to(text + icon,
|
||||
url.merge("#{name}[move_to]" => direction),
|
||||
method:,
|
||||
data: { turbo_method: method },
|
||||
title: label)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -130,7 +130,7 @@ module UsersHelper
|
||||
href: change_status_user_path(user,
|
||||
name.to_sym => "1",
|
||||
back_url: request.fullpath),
|
||||
data: { method: :post }) do |button|
|
||||
data: { turbo_method: :post }) do |button|
|
||||
button.with_leading_visual_icon(icon: change_user_status_icons[name])
|
||||
title
|
||||
end
|
||||
|
||||
@@ -65,8 +65,6 @@ module WatchersHelper
|
||||
object_type: object.class.to_s.underscore.pluralize,
|
||||
object_id: object.id)
|
||||
|
||||
method = watched ? :delete : :post
|
||||
|
||||
label = watched ? I18n.t(:button_unwatch) : I18n.t(:button_watch)
|
||||
|
||||
{
|
||||
@@ -75,7 +73,7 @@ module WatchersHelper
|
||||
scheme: :default,
|
||||
aria: { label: label },
|
||||
data: {
|
||||
method:
|
||||
turbo_method: watched ? :delete : :post
|
||||
},
|
||||
mobile_icon: watched ? "eye-closed" : "eye",
|
||||
mobile_label: label
|
||||
|
||||
@@ -64,7 +64,7 @@ See COPYRIGHT and LICENSE files for more details.
|
||||
<%= submit_tag t(:button_login),
|
||||
name: :login,
|
||||
class: "button -primary button_no-margin",
|
||||
data: { disable_with: t(:label_loading) } %>
|
||||
data: { turbo_submits_with: t(:label_loading) } %>
|
||||
|
||||
<div class="login-options-container">
|
||||
<div class="login-links">
|
||||
|
||||
@@ -66,6 +66,6 @@ See COPYRIGHT and LICENSE files for more details.
|
||||
<%= styled_button_tag t(:button_save),
|
||||
class: "-primary -with-icon icon-checkmark",
|
||||
data: {
|
||||
confirm: t("settings.experimental.save_confirmation")
|
||||
turbo_confirm: t("settings.experimental.save_confirmation")
|
||||
} %>
|
||||
<% end %>
|
||||
|
||||
@@ -100,7 +100,7 @@ See COPYRIGHT and LICENSE files for more details.
|
||||
<div style="float:none;display:inline-block;font-weight:bold;">
|
||||
<%= link_to t(:label_send_test_email),
|
||||
{ controller: "/admin", action: "test_email" },
|
||||
method: :post %>
|
||||
data: { turbo_method: :post } %>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
@@ -52,8 +52,10 @@
|
||||
<%= link_to(
|
||||
op_icon("icon icon-delete"),
|
||||
attribute_help_text_path(attribute_help_text),
|
||||
method: :delete,
|
||||
data: { confirm: I18n.t(:text_are_you_sure) },
|
||||
data: {
|
||||
turbo_method: :delete,
|
||||
turbo_confirm: I18n.t(:text_are_you_sure)
|
||||
},
|
||||
title: t(:button_delete)
|
||||
) %>
|
||||
</td>
|
||||
|
||||
@@ -141,10 +141,10 @@ See COPYRIGHT and LICENSE files for more details.
|
||||
<td>
|
||||
<%= link_to "",
|
||||
delete_option_of_custom_field_path(id: custom_field.id || 0, option_id: custom_option.id || 0),
|
||||
method: :delete,
|
||||
data: {
|
||||
turbo_method: :delete,
|
||||
action: "admin--custom-fields#removeOption",
|
||||
confirm: t(:"custom_fields.confirm_destroy_option")
|
||||
turbo_confirm: t(:"custom_fields.confirm_destroy_option")
|
||||
},
|
||||
class: "icon icon-delete delete-custom-option",
|
||||
title: t(:button_delete) %>
|
||||
|
||||
@@ -92,8 +92,10 @@ See COPYRIGHT and LICENSE files for more details.
|
||||
<span class="form--toolbar-item">
|
||||
<%= link_to t("custom_fields.reorder_alphabetical"),
|
||||
{ action: :reorder_alphabetical },
|
||||
method: :post,
|
||||
data: { confirm: t("custom_fields.reorder_confirmation") } %>
|
||||
data: {
|
||||
turbo_method: :post,
|
||||
turbo_confirm: t("custom_fields.reorder_confirmation")
|
||||
} %>
|
||||
</span>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
@@ -160,8 +160,10 @@ See COPYRIGHT and LICENSE files for more details.
|
||||
<%= link_to(
|
||||
op_icon("icon icon-delete"),
|
||||
custom_field_path(custom_field),
|
||||
method: :delete,
|
||||
data: { confirm: I18n.t(:text_are_you_sure) },
|
||||
data: {
|
||||
turbo_method: :delete,
|
||||
turbo_confirm: I18n.t(:text_are_you_sure)
|
||||
},
|
||||
title: t(:button_delete)
|
||||
) %>
|
||||
</td>
|
||||
|
||||
@@ -48,7 +48,10 @@ See COPYRIGHT and LICENSE files for more details.
|
||||
</div>
|
||||
|
||||
<%= styled_button_tag t(:button_save),
|
||||
data: { test_selector: "color-theme-button", confirm: (t("admin.custom_styles.theme_warning") if @current_theme.blank?) } %>
|
||||
data: {
|
||||
test_selector: "color-theme-button",
|
||||
turbo_confirm: (t("admin.custom_styles.theme_warning") if @current_theme.blank?)
|
||||
} %>
|
||||
</fieldset>
|
||||
</section>
|
||||
<% end %>
|
||||
|
||||
@@ -56,7 +56,7 @@ See COPYRIGHT and LICENSE files for more details.
|
||||
<%= render(Primer::Beta::Button.new(
|
||||
tag: :a,
|
||||
href: image[:delete_path],
|
||||
data: { method: :delete }
|
||||
data: { turbo_method: :delete }
|
||||
)) do |button|
|
||||
button.with_leading_visual_icon(icon: :trash)
|
||||
t(:button_delete)
|
||||
|
||||
@@ -153,8 +153,7 @@ See COPYRIGHT and LICENSE files for more details.
|
||||
title: t(:button_edit) %>
|
||||
<%= link_to_if_authorized "",
|
||||
{ controller: "/forums", action: "destroy", project_id: @project, id: forum },
|
||||
data: { confirm: t(:text_are_you_sure) },
|
||||
method: :delete,
|
||||
data: { turbo_method: :delete, turbo_confirm: t(:text_are_you_sure) },
|
||||
class: "icon icon-delete",
|
||||
title: t(:button_delete) %>
|
||||
</td>
|
||||
|
||||
@@ -42,75 +42,78 @@ See COPYRIGHT and LICENSE files for more details.
|
||||
<col data-highlight="false">
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
<div class="generic-table--sort-header-outer">
|
||||
<div class="generic-table--sort-header">
|
||||
<tr>
|
||||
<th>
|
||||
<div class="generic-table--sort-header-outer">
|
||||
<div class="generic-table--sort-header">
|
||||
<span>
|
||||
<%= Project.model_name.human %>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</th>
|
||||
<th>
|
||||
<div class="generic-table--sort-header-outer">
|
||||
<div class="generic-table--sort-header">
|
||||
</div>
|
||||
</th>
|
||||
<th>
|
||||
<div class="generic-table--sort-header-outer">
|
||||
<div class="generic-table--sort-header">
|
||||
<span>
|
||||
<%= t(:label_role_plural) %>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</th>
|
||||
<th><div class="generic-table--empty-header"></div></th>
|
||||
</tr>
|
||||
</div>
|
||||
</th>
|
||||
<th>
|
||||
<div class="generic-table--empty-header"></div>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% memberships.where.not(project: nil).each do |membership| %>
|
||||
<% next if membership.new_record? %>
|
||||
<tr id="member-<%= membership.id %>" class="member">
|
||||
<td class="project">
|
||||
<%= link_to membership.project.name, project_members_path(membership.project) %>
|
||||
</td>
|
||||
<td class="roles">
|
||||
<% memberships.where.not(project: nil).each do |membership| %>
|
||||
<% next if membership.new_record? %>
|
||||
<tr id="member-<%= membership.id %>" class="member">
|
||||
<td class="project">
|
||||
<%= link_to membership.project.name, project_members_path(membership.project) %>
|
||||
</td>
|
||||
<td class="roles">
|
||||
<span id="member-<%= membership.id %>-roles">
|
||||
<%=h membership.roles.sort.collect(&:to_s).join(', ') %>
|
||||
<%= h membership.roles.sort.collect(&:to_s).join(', ') %>
|
||||
</span>
|
||||
<%= labelled_tabular_form_for(:membership,
|
||||
url: membership_of_group_path(@group, membership),
|
||||
method: :patch,
|
||||
html: {
|
||||
id: "member-#{membership.id}-roles-form",
|
||||
style: 'display:none;'
|
||||
}) do |f| %>
|
||||
<% roles.each do |role| %>
|
||||
<label class="form--label-with-check-box">
|
||||
<%= f.collection_check_box :role_ids,
|
||||
role.id,
|
||||
membership.roles.include?(role),
|
||||
role.name,
|
||||
no_label: true,
|
||||
id: nil
|
||||
%>
|
||||
<%= role %>
|
||||
</label>
|
||||
<% end %>
|
||||
<p class="generic-table--cell-controls">
|
||||
<%= submit_tag t(:button_change), class: 'button -primary -small' %>
|
||||
<%= link_to_function t(:button_cancel), "jQuery('#member-#{membership.id}-roles').show(); jQuery('#member-#{membership.id}-roles-form').hide();",
|
||||
class: 'button -small' %>
|
||||
</p>
|
||||
<% end %>
|
||||
</td>
|
||||
<td class="buttons">
|
||||
<%= link_to_function icon_wrapper('icon icon-edit', t(:button_edit)),
|
||||
"jQuery('#member-#{membership.id}-roles').hide(); jQuery('#member-#{membership.id}-roles-form').show();" do %>
|
||||
<% end %>
|
||||
<%= link_to t(:button_remove), membership_of_group_path(@group, membership),
|
||||
method: :delete,
|
||||
class: 'icon icon-remove' %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
<%= labelled_tabular_form_for(:membership,
|
||||
url: membership_of_group_path(@group, membership),
|
||||
method: :patch,
|
||||
html: {
|
||||
id: "member-#{membership.id}-roles-form",
|
||||
style: 'display:none;'
|
||||
}) do |f| %>
|
||||
<% roles.each do |role| %>
|
||||
<label class="form--label-with-check-box">
|
||||
<%= f.collection_check_box :role_ids,
|
||||
role.id,
|
||||
membership.roles.include?(role),
|
||||
role.name,
|
||||
no_label: true,
|
||||
id: nil
|
||||
%>
|
||||
<%= role %>
|
||||
</label>
|
||||
<% end %>
|
||||
<p class="generic-table--cell-controls">
|
||||
<%= submit_tag t(:button_change), class: 'button -primary -small' %>
|
||||
<%= link_to_function t(:button_cancel), "jQuery('#member-#{membership.id}-roles').show(); jQuery('#member-#{membership.id}-roles-form').hide();",
|
||||
class: 'button -small' %>
|
||||
</p>
|
||||
<% end %>
|
||||
</td>
|
||||
<td class="buttons">
|
||||
<%= link_to_function icon_wrapper('icon icon-edit', t(:button_edit)),
|
||||
"jQuery('#member-#{membership.id}-roles').hide(); jQuery('#member-#{membership.id}-roles-form').show();" do %>
|
||||
<% end %>
|
||||
<%= link_to t(:button_remove),
|
||||
membership_of_group_path(@group, membership),
|
||||
data: { turbo_method: :delete },
|
||||
class: 'icon icon-remove' %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
@@ -124,11 +127,11 @@ See COPYRIGHT and LICENSE files for more details.
|
||||
<% if projects.any? %>
|
||||
<%= styled_form_tag(memberships_of_group_path(@group), method: :post) do %>
|
||||
<fieldset class="form--fieldset add-membership-form-fieldset">
|
||||
<legend class="form--fieldset-legend"><%=t(:label_project_new)%></legend>
|
||||
<legend class="form--fieldset-legend"><%= t(:label_project_new) %></legend>
|
||||
<%= label_tag "membership_project_id", t(:description_choose_project), class: "sr-only" %>
|
||||
|
||||
<% group_project_ids = @group.projects.ids %>
|
||||
<% filters = [{ name: 'active', operator: '=', values: ['t']}] %>
|
||||
<% group_project_ids = @group.projects.ids %>
|
||||
<% filters = [{ name: 'active', operator: '=', values: ['t'] }] %>
|
||||
<% filters << { name: 'id', operator: '!', values: group_project_ids.map(&:to_s) } if group_project_ids.any? %>
|
||||
<%= angular_component_tag 'opce-project-autocompleter',
|
||||
inputs: {
|
||||
|
||||
@@ -50,8 +50,9 @@ See COPYRIGHT and LICENSE files for more details.
|
||||
<tr id="user-<%= user.id %>">
|
||||
<td class="user"><%= link_to_user user %></td>
|
||||
<td class="buttons">
|
||||
<%= link_to "", member_of_group_path(@group, user),
|
||||
method: :delete,
|
||||
<%= link_to "",
|
||||
member_of_group_path(@group, user),
|
||||
data: { turbo_method: :delete },
|
||||
class: "icon icon-remove",
|
||||
title: t(:button_remove) %>
|
||||
</td>
|
||||
|
||||
@@ -123,7 +123,7 @@ See COPYRIGHT and LICENSE files for more details.
|
||||
title: t(:button_edit) %>
|
||||
<%= link_to(icon_wrapper('icon icon-remove', t(:button_remove)),
|
||||
polymorphic_path([@individual_principal, :membership], id: membership),
|
||||
method: :delete,
|
||||
data: { turbo_method: :delete },
|
||||
title: t(:button_remove)) if membership.deletable? %>
|
||||
<% end %>
|
||||
</td>
|
||||
|
||||
@@ -66,8 +66,7 @@ See COPYRIGHT and LICENSE files for more details.
|
||||
alt: t(:button_edit)) if message.editable_by?(User.current) %>
|
||||
<%= link_to(icon_wrapper('icon-context icon-delete', t(:button_delete)),
|
||||
{ action: 'destroy', id: message },
|
||||
method: :delete,
|
||||
data: { confirm: t(:text_are_you_sure) },
|
||||
data: { turbo_method: :delete, turbo_confirm: t(:text_are_you_sure) },
|
||||
title: t(:button_delete),
|
||||
class: 'no-decoration-on-hover',
|
||||
alt: t(:button_delete)) if message.destroyable_by?(User.current) %>
|
||||
|
||||
@@ -82,8 +82,11 @@ See COPYRIGHT and LICENSE files for more details.
|
||||
<td class="buttons">
|
||||
<%= link_to "",
|
||||
{ action: "revoke_ical_token", access_token_id: token.id },
|
||||
data: { confirm: t("my_account.access_tokens.simple_revoke_confirmation"), test_selector: "ical-token-row-#{token.id}-revoke" },
|
||||
method: :delete,
|
||||
data: {
|
||||
turbo_method: :delete,
|
||||
turbo_confirm: t("my_account.access_tokens.simple_revoke_confirmation"),
|
||||
test_selector: "ical-token-row-#{token.id}-revoke"
|
||||
},
|
||||
class: "icon icon-delete" %>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -40,42 +40,47 @@ See COPYRIGHT and LICENSE files for more details.
|
||||
<div class="generic-table--container">
|
||||
<div class="generic-table--results-container">
|
||||
<table class="generic-table" data-controller="table-highlighting">
|
||||
<%= render partial: "token_table_header",
|
||||
locals: {
|
||||
column_headers: [
|
||||
t("attributes.name"),
|
||||
User.human_attribute_name(:created_at),
|
||||
t("my_account.access_tokens.headers.expiration")
|
||||
]
|
||||
} %>
|
||||
<%= render partial: "token_table_header",
|
||||
locals: {
|
||||
column_headers: [
|
||||
t("attributes.name"),
|
||||
User.human_attribute_name(:created_at),
|
||||
t("my_account.access_tokens.headers.expiration")
|
||||
]
|
||||
} %>
|
||||
<tbody>
|
||||
<% granted_applications.each do |application, tokens| %>
|
||||
<% latest = tokens.max_by(&:created_at) %>
|
||||
<tr id="oauth-application-grant-<%= application.id %>">
|
||||
<td class="-w-rel-60" data-test-selector="oauth-token-row-<%= application.id %>-name">
|
||||
<%= t("oauth.application.named", name: application.name) %>
|
||||
|
||||
(<%= t("oauth.x_active_tokens", count: tokens.count) %>)
|
||||
</td>
|
||||
<td>
|
||||
<span><%= format_time(latest.created_at) %></span>
|
||||
</td>
|
||||
<td>
|
||||
<span><%= format_time(latest.created_at + latest.expires_in.seconds) %></span>
|
||||
</td>
|
||||
<td class="buttons">
|
||||
<%= link_to "",
|
||||
revoke_my_oauth_application_path(application_id: application.id),
|
||||
data: { confirm: t(
|
||||
"oauth.revoke_my_application_confirmation",
|
||||
token_count: t("oauth.x_active_tokens", count: tokens.count)
|
||||
),
|
||||
test_selector: "oauth-token-row-#{application.id}-revoke" },
|
||||
method: :post,
|
||||
class: "icon icon-delete" %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
<% granted_applications.each do |application, tokens| %>
|
||||
<% latest = tokens.max_by(&:created_at) %>
|
||||
<tr id="oauth-application-grant-<%= application.id %>">
|
||||
<td class="-w-rel-60" data-test-selector="oauth-token-row-<%= application.id %>-name">
|
||||
<%= t("oauth.application.named", name: application.name) %>
|
||||
|
||||
(<%= t("oauth.x_active_tokens", count: tokens.count) %>)
|
||||
</td>
|
||||
<td>
|
||||
<span><%= format_time(latest.created_at) %></span>
|
||||
</td>
|
||||
<td>
|
||||
<span><%= format_time(latest.created_at + latest.expires_in.seconds) %></span>
|
||||
</td>
|
||||
<td class="buttons">
|
||||
<%= link_to "",
|
||||
revoke_my_oauth_application_path(application_id: application.id),
|
||||
data: {
|
||||
turbo_method: :post,
|
||||
turbo_confirm: t(
|
||||
"oauth.revoke_my_application_confirmation",
|
||||
token_count: t(
|
||||
"oauth.x_active_tokens",
|
||||
count: tokens.count
|
||||
)
|
||||
),
|
||||
test_selector: "oauth-token-row-#{application.id}-revoke"
|
||||
},
|
||||
class: "icon icon-delete" %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
@@ -61,8 +61,11 @@ See COPYRIGHT and LICENSE files for more details.
|
||||
<td class="buttons">
|
||||
<%= link_to "",
|
||||
{ action: "revoke_rss_key" },
|
||||
method: :delete,
|
||||
data: { confirm: t("my_account.access_tokens.simple_revoke_confirmation"), test_selector: "rss-token-revoke" },
|
||||
data: {
|
||||
turbo_method: :delete,
|
||||
turbo_confirm: t("my_account.access_tokens.simple_revoke_confirmation"),
|
||||
test_selector: "rss-token-revoke"
|
||||
},
|
||||
class: "icon icon-delete" %>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -72,7 +75,7 @@ See COPYRIGHT and LICENSE files for more details.
|
||||
</div>
|
||||
<% else %>
|
||||
<%=
|
||||
render Primer::Beta::Link.new(href: generate_rss_key_my_access_tokens_path, data: { method: :post }, test_selector: "rss-token-add") do |link|
|
||||
render Primer::Beta::Link.new(href: generate_rss_key_my_access_tokens_path, data: { turbo_method: :post }, test_selector: "rss-token-add") do |link|
|
||||
link.with_leading_visual_icon(icon: :plus)
|
||||
t("my_account.access_tokens.rss.static_token_name")
|
||||
end
|
||||
|
||||
@@ -63,9 +63,11 @@ See COPYRIGHT and LICENSE files for more details.
|
||||
<td class="buttons">
|
||||
<%= link_to "",
|
||||
my_access_token_revoke_storage_token_path(token),
|
||||
data: { confirm: t("my_account.access_tokens.storages.revoke_token", storage: token.oauth_client.integration.name),
|
||||
test_selector: "storages-token-row-#{token.id}-revoke" },
|
||||
method: :delete,
|
||||
data: {
|
||||
turbo_method: :delete,
|
||||
turbo_confirm: t("my_account.access_tokens.storages.revoke_token", storage: token.oauth_client.integration.name),
|
||||
test_selector: "storages-token-row-#{token.id}-revoke"
|
||||
},
|
||||
class: "icon icon-delete" %>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -62,7 +62,7 @@ See COPYRIGHT and LICENSE files for more details.
|
||||
href: news_path(@news),
|
||||
mobile_icon: :trash,
|
||||
mobile_label: I18n.t("button_delete"),
|
||||
data: { confirm: t(:text_are_you_sure), method: :delete },
|
||||
data: { turbo_confirm: t(:text_are_you_sure), turbo_method: :delete },
|
||||
aria: { label: I18n.t("button_delete") }
|
||||
) do |button|
|
||||
button.with_leading_visual_icon(icon: :trash)
|
||||
@@ -77,7 +77,8 @@ See COPYRIGHT and LICENSE files for more details.
|
||||
<%= labelled_tabular_form_for @news, html: { id: "news-form" } do |f| %>
|
||||
<%= render partial: "form", locals: { f: f } %>
|
||||
<%= styled_button_tag t(:button_save), class: "-primary -with-icon icon-checkmark" %>
|
||||
<%= link_to_function t(:button_cancel), 'jQuery("#edit-news").hide()', class: "button -with-icon icon-cancel" %>
|
||||
<%= link_to_function t(:button_cancel), 'jQuery("#edit-news").hide()',
|
||||
class: "button -with-icon icon-cancel" %>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
@@ -99,8 +100,7 @@ See COPYRIGHT and LICENSE files for more details.
|
||||
<div class="contextual">
|
||||
<%= link_to_if_authorized icon_wrapper("icon-context icon-delete", t(:button_delete)),
|
||||
{ controller: "/news/comments", action: "destroy", id: comment },
|
||||
data: { confirm: t(:text_are_you_sure) },
|
||||
method: :delete,
|
||||
data: { turbo_method: :delete, turbo_confirm: t(:text_are_you_sure) },
|
||||
class: "no-decoration-on-hover",
|
||||
title: t(:button_delete),
|
||||
alt: t(:button_delete) %>
|
||||
|
||||
@@ -89,8 +89,10 @@ See COPYRIGHT and LICENSE files for more details.
|
||||
title: t(:button_edit) %>
|
||||
<%= link_to_if_authorized "",
|
||||
{ controller: "/categories", action: "destroy", id: category },
|
||||
data: { confirm: t(:text_are_you_sure) },
|
||||
method: :delete,
|
||||
data: {
|
||||
turbo_method: :delete,
|
||||
turbo_confirm: t(:text_are_you_sure)
|
||||
},
|
||||
class: "icon icon-delete",
|
||||
title: t(:button_delete) %>
|
||||
</td>
|
||||
|
||||
@@ -60,7 +60,7 @@ See COPYRIGHT and LICENSE files for more details.
|
||||
<div class="danger-zone--verification">
|
||||
<input type="text">
|
||||
<%= styled_button_tag project_repository_path(@project),
|
||||
method: :delete,
|
||||
turbo_method: :delete,
|
||||
title: t(:button_delete),
|
||||
disabled: true,
|
||||
class: "-primary" do %>
|
||||
@@ -93,8 +93,10 @@ See COPYRIGHT and LICENSE files for more details.
|
||||
<p>
|
||||
<%= link_to project_repository_path(@project),
|
||||
title: t(:button_delete),
|
||||
method: :delete,
|
||||
data: { "test-selector": "remove-repository-button" },
|
||||
data: {
|
||||
turbo_method: :delete,
|
||||
"test-selector": "remove-repository-button"
|
||||
},
|
||||
class: "button" do %>
|
||||
<%= op_icon("button--icon icon-remove") %>
|
||||
<span class="button--text"><%= t(:button_remove) %></span>
|
||||
|
||||
@@ -113,8 +113,7 @@ See COPYRIGHT and LICENSE files for more details.
|
||||
<%= unless role.builtin?
|
||||
link_to(
|
||||
"", role_path(role),
|
||||
method: :delete,
|
||||
data: { confirm: t(:text_are_you_sure) },
|
||||
data: { turbo_method: :delete, turbo_confirm: t(:text_are_you_sure) },
|
||||
class: "icon icon-delete",
|
||||
title: t(:button_delete)
|
||||
)
|
||||
|
||||
@@ -60,8 +60,8 @@ See COPYRIGHT and LICENSE files for more details.
|
||||
href: version_path(@version),
|
||||
aria: { label: I18n.t(:button_delete) },
|
||||
data: {
|
||||
confirm: I18n.t(:text_are_you_sure),
|
||||
method: :delete,
|
||||
turbo_confirm: I18n.t(:text_are_you_sure),
|
||||
turbo_method: :delete,
|
||||
test_selector: "version-delete-button"
|
||||
},
|
||||
title: I18n.t(:button_delete)
|
||||
|
||||
@@ -38,5 +38,5 @@
|
||||
|
||||
<%= link_to t(:button_cancel),
|
||||
{ controller: "/wiki", action: "show", project_id: @project, id: (@page.new_record? ? nil : @page) },
|
||||
data: { confirm: t(:text_are_you_sure) },
|
||||
data: { turbo_confirm: t(:text_are_you_sure) },
|
||||
class: "button -with-icon icon-cancel" %>
|
||||
|
||||
@@ -65,7 +65,7 @@ See COPYRIGHT and LICENSE files for more details.
|
||||
<div class="grid-block">
|
||||
<div class="generic-table--action-buttons">
|
||||
<%= styled_button_tag t(@type.new_record? ? :button_create : :button_save),
|
||||
data: { disable_with: t(@type.new_record? ? :button_create : :button_save) },
|
||||
data: { turbo_submits_with: t(@type.new_record? ? :button_create : :button_save) },
|
||||
class: "form-configuration--save -primary -with-icon icon-checkmark" %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -44,7 +44,8 @@ module IndividualPrincipals
|
||||
flash[:error] = call.errors.full_messages.join("\n")
|
||||
end
|
||||
|
||||
redirect_to edit_polymorphic_path(@individual_principal, tab: redirected_to_tab(call.result))
|
||||
redirect_to edit_polymorphic_path(@individual_principal, tab: redirected_to_tab(call.result)),
|
||||
status: :see_other
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -52,8 +52,7 @@ module Saml
|
||||
link_to(
|
||||
helpers.op_icon("icon icon-delete button--link"),
|
||||
url_for(action: :destroy, id: provider.id),
|
||||
method: :delete,
|
||||
data: { confirm: I18n.t(:text_are_you_sure) },
|
||||
data: { turbo_method: :delete, turbo_confirm: I18n.t(:text_are_you_sure) },
|
||||
title: t(:button_delete)
|
||||
)
|
||||
end
|
||||
|
||||
@@ -23,7 +23,7 @@ module ::Avatars
|
||||
else
|
||||
flash[:error] = result.errors.full_messages.join(", ")
|
||||
end
|
||||
redirect_to redirect_path
|
||||
redirect_to redirect_path, status: :see_other
|
||||
else
|
||||
head :method_not_allowed
|
||||
end
|
||||
|
||||
@@ -23,9 +23,8 @@
|
||||
<% if local_avatar? @user %>
|
||||
<%= link_to t(:button_delete),
|
||||
@target_avatar_path,
|
||||
method: :delete,
|
||||
class: "avatars--local-avatar-delete-link",
|
||||
data: { confirm: t(:are_you_sure_delete_avatar) } %>
|
||||
data: { turbo_method: :delete, turbo_confirm: t(:are_you_sure_delete_avatar) } %>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -68,9 +68,8 @@ module Bim
|
||||
link_to "",
|
||||
bcf_project_ifc_model_path(model.project, model),
|
||||
class: "icon icon-delete",
|
||||
data: { confirm: I18n.t(:text_are_you_sure) },
|
||||
title: I18n.t(:button_delete),
|
||||
method: :delete
|
||||
data: { turbo_method: :delete, turbo_confirm: I18n.t(:text_are_you_sure) },
|
||||
title: I18n.t(:button_delete)
|
||||
end
|
||||
|
||||
def download_link
|
||||
|
||||
@@ -174,7 +174,7 @@ module Bim
|
||||
|
||||
def destroy
|
||||
@ifc_model.destroy
|
||||
redirect_to action: :index
|
||||
redirect_to action: :index, status: :see_other
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
@@ -60,10 +60,10 @@ module Boards
|
||||
link_to(
|
||||
"",
|
||||
work_package_board_path(model),
|
||||
method: :delete,
|
||||
class: "icon icon-delete",
|
||||
data: {
|
||||
confirm: I18n.t(:text_are_you_sure),
|
||||
turbo_method: :delete,
|
||||
turbo_confirm: I18n.t(:text_are_you_sure),
|
||||
"test-selector": "board-remove-#{model.id}"
|
||||
},
|
||||
title: t(:button_delete)
|
||||
|
||||
@@ -43,8 +43,8 @@
|
||||
href: url_for({ controller: "budgets", action: "destroy", id: @budget }),
|
||||
aria: { label: I18n.t(:button_delete) },
|
||||
data: {
|
||||
confirm: I18n.t(:text_are_you_sure),
|
||||
method: :delete,
|
||||
turbo_confirm: I18n.t(:text_are_you_sure),
|
||||
turbo_method: :delete,
|
||||
test_selector: "budget-delete-button"
|
||||
},
|
||||
title: I18n.t(:button_delete)
|
||||
|
||||
@@ -144,7 +144,7 @@ class BudgetsController < ApplicationController
|
||||
def destroy
|
||||
@budgets.each(&:destroy)
|
||||
flash[:notice] = t(:notice_successful_delete)
|
||||
redirect_to action: "index", project_id: @project
|
||||
redirect_to action: "index", project_id: @project, status: :see_other
|
||||
end
|
||||
|
||||
def destroy_info
|
||||
@@ -260,7 +260,7 @@ class BudgetsController < ApplicationController
|
||||
|
||||
budget = Budget.find(params[:id])
|
||||
if budget.work_packages.any?
|
||||
redirect_to destroy_info_budget_path(budget)
|
||||
redirect_to destroy_info_budget_path(budget), status: :see_other
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -55,10 +55,10 @@ module Calendar
|
||||
link_to(
|
||||
"",
|
||||
project_calendar_path(project, query.id),
|
||||
method: :delete,
|
||||
class: "icon icon-delete",
|
||||
data: {
|
||||
confirm: I18n.t(:text_are_you_sure),
|
||||
turbo_method: :delete,
|
||||
turbo_confirm: I18n.t(:text_are_you_sure),
|
||||
"test-selector": "calendar-remove-#{query.id}"
|
||||
},
|
||||
title: t(:button_delete)
|
||||
|
||||
@@ -62,8 +62,8 @@ See COPYRIGHT and LICENSE files for more details.
|
||||
href: url_for({ controller: "/documents", action: "destroy", id: @document }),
|
||||
aria: { label: I18n.t(:button_delete) },
|
||||
data: {
|
||||
confirm: I18n.t(:text_are_you_sure),
|
||||
method: :delete
|
||||
turbo_confirm: I18n.t(:text_are_you_sure),
|
||||
turbo_method: :delete
|
||||
},
|
||||
title: I18n.t(:button_delete)
|
||||
) do |button|
|
||||
|
||||
@@ -47,7 +47,7 @@ module DeployTargets
|
||||
def delete_link
|
||||
link_to I18n.t(:button_delete),
|
||||
deploy_target_path(deploy_target),
|
||||
method: :delete,
|
||||
data: { turbo_method: :delete },
|
||||
class: "icon icon-delete"
|
||||
end
|
||||
end
|
||||
|
||||
+2
-2
@@ -55,8 +55,8 @@ See COPYRIGHT and LICENSE files for more details.
|
||||
href: ldap_groups_synchronized_filter_path(@filter),
|
||||
aria: { label: I18n.t(:button_delete) },
|
||||
data: {
|
||||
confirm: I18n.t(:text_are_you_sure),
|
||||
method: :delete
|
||||
turbo_confirm: I18n.t(:text_are_you_sure),
|
||||
turbo_method: :delete
|
||||
},
|
||||
title: I18n.t(:button_delete)
|
||||
) do |button|
|
||||
|
||||
+1
-1
@@ -178,7 +178,7 @@ module MeetingAgendaItems
|
||||
scheme: :danger,
|
||||
href: meeting_agenda_item_path(@meeting_agenda_item.meeting, @meeting_agenda_item),
|
||||
form_arguments: {
|
||||
method: :delete, data: { confirm: t("text_are_you_sure"), "turbo-stream": true }
|
||||
method: :delete, data: { turbo_confirm: t(:text_are_you_sure), "turbo-stream": true }
|
||||
}) do |item|
|
||||
item.with_leading_visual_icon(icon: :trash)
|
||||
end
|
||||
|
||||
+5
-1
@@ -84,7 +84,11 @@ module MeetingAgendaItems
|
||||
scheme: :danger,
|
||||
href: meeting_outcome_path(@meeting, @meeting_outcome),
|
||||
form_arguments: {
|
||||
method: :delete, data: { confirm: t("text_are_you_sure"), "turbo-stream": true }
|
||||
method: :delete,
|
||||
data: {
|
||||
turbo_confirm: t(:text_are_you_sure),
|
||||
turbo_stream: true
|
||||
}
|
||||
}) do |item|
|
||||
item.with_leading_visual_icon(icon: :trash)
|
||||
end
|
||||
|
||||
@@ -156,8 +156,12 @@ module MeetingSections
|
||||
scheme: :danger,
|
||||
href: meeting_section_path(@meeting_section.meeting, @meeting_section),
|
||||
form_arguments: {
|
||||
method: :delete, data: { confirm: confirm_text, "turbo-stream": true,
|
||||
test_selector: "meeting-section-delete" }
|
||||
method: :delete,
|
||||
data: {
|
||||
turbo_confirm: confirm_text,
|
||||
turbo_stream: true,
|
||||
test_selector: "meeting-section-delete"
|
||||
}
|
||||
}) do |item|
|
||||
item.with_leading_visual_icon(icon: :trash)
|
||||
end
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
size: :medium,
|
||||
tag: :a,
|
||||
href: helpers.build_favorite_path(project, format: :html),
|
||||
data: { method: favorited? ? :delete : :post },
|
||||
data: { turbo_method: favorited? ? :delete : :post },
|
||||
classes: favorited? ? "op-primer--star-icon" : "",
|
||||
label: favorited? ? I18n.t(:button_unfavorite) : I18n.t(:button_favorite),
|
||||
aria: { label: favorited? ? I18n.t(:button_unfavorite) : I18n.t(:button_favorite) },
|
||||
@@ -35,7 +35,7 @@
|
||||
label: t(:label_archive_project),
|
||||
href: helpers.project_archive_path(project, status: "", name: project.name),
|
||||
content_arguments: {
|
||||
data: { method: :post, turbo: false, confirm: t("project.archive.are_you_sure", name: project.name) }
|
||||
data: { turbo_method: :post, confirm: t("project.archive.are_you_sure", name: project.name) }
|
||||
}
|
||||
) do |item|
|
||||
item.with_leading_visual_icon(icon: :lock)
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
#++
|
||||
|
||||
class Widget::Controls::Delete < Widget::Controls
|
||||
def render
|
||||
def render # rubocop:disable Metrics/AbcSize
|
||||
return "" if @subject.new_record? or !@options[:can_delete]
|
||||
|
||||
button = link_to(I18n.t(:button_delete),
|
||||
@@ -41,7 +41,7 @@ class Widget::Controls::Delete < Widget::Controls
|
||||
url_opts[request_forgery_protection_token] = form_authenticity_token # if protect_against_forgery?
|
||||
opt1 = link_to I18n.t(:button_delete),
|
||||
url_for(url_opts),
|
||||
method: :delete,
|
||||
data: { turbo_method: :delete },
|
||||
class: "button -danger icon-context icon-delete"
|
||||
opt2 = link_to I18n.t(:button_cancel),
|
||||
"#",
|
||||
|
||||
@@ -175,8 +175,7 @@ class Widget::Table::EntryTable < Widget::Table
|
||||
icons << link_to(icon_wrapper("icon-context icon-delete", I18n.t(:button_delete)),
|
||||
action_for(result, action: "destroy")
|
||||
.reverse_merge(authenticity_token: form_authenticity_token),
|
||||
data: { confirm: I18n.t(:text_are_you_sure) },
|
||||
method: :delete,
|
||||
data: { turbo_method: :delete, turbo_confirm: I18n.t(:text_are_you_sure) },
|
||||
class: "no-decoration-on-hover",
|
||||
title: I18n.t(:button_delete))
|
||||
else
|
||||
|
||||
+1
-1
@@ -31,7 +31,7 @@
|
||||
scheme: :invisible,
|
||||
type: :submit,
|
||||
aria: { label: I18n.t("storages.buttons.replace_oauth_application") },
|
||||
data: { confirm: I18n.t("storages.confirm_replace_oauth_application") },
|
||||
data: { turbo_confirm: I18n.t("storages.confirm_replace_oauth_application") },
|
||||
test_selector: "storage-replace-openproject-oauth-application-button"
|
||||
)
|
||||
)
|
||||
|
||||
@@ -68,9 +68,8 @@ module Storages::Admin
|
||||
link_to "",
|
||||
admin_settings_storage_path(storage),
|
||||
class: "icon icon-delete",
|
||||
data: { confirm: I18n.t("storages.delete_warning.storage") },
|
||||
title: I18n.t(:button_delete),
|
||||
method: :delete
|
||||
data: { turbo_method: :delete, turbo_confirm: I18n.t("storages.delete_warning.storage") },
|
||||
title: I18n.t(:button_delete)
|
||||
end
|
||||
|
||||
def edit_link
|
||||
|
||||
@@ -59,9 +59,9 @@ module TeamPlanner
|
||||
"",
|
||||
project_team_planner_path(project, query.id),
|
||||
class: "spot-link icon icon-delete",
|
||||
method: :delete,
|
||||
data: {
|
||||
confirm: I18n.t(:text_are_you_sure),
|
||||
turbo_method: :delete,
|
||||
turbo_confirm: I18n.t(:text_are_you_sure),
|
||||
"test-selector": "team-planner-remove-#{query.id}"
|
||||
},
|
||||
title: t(:button_delete)
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user