diff --git a/app/views/admin/domains/form/_pending_delete.haml b/app/views/admin/domains/form/_pending_delete.haml index e3d71f3f4d..673f72c4f2 100644 --- a/app/views/admin/domains/form/_pending_delete.haml +++ b/app/views/admin/domains/form/_pending_delete.haml @@ -1,8 +1,8 @@ - if status == DomainStatus::PENDING_DELETE_CONFIRMATION - = link_to(t(:accept_delete), admin_domain_pending_delete_path(f.object.id, f.object.id), + = link_to(t('.accept_btn'), admin_domain_pending_delete_path(f.object.id, f.object.id), method: :patch, data: { confirm: t(:are_you_sure) }, class: 'btn btn-danger btn-xs') - = link_to(t(:reject_delete), admin_domain_pending_delete_path(f.object.id, f.object.id), + = link_to(t('.reject_btn'), admin_domain_pending_delete_path(f.object.id, f.object.id), method: :delete, data: { confirm: t(:are_you_sure) }, class: 'btn btn-danger btn-xs') diff --git a/app/views/admin/domains/form/_pending_update.haml b/app/views/admin/domains/form/_pending_update.haml index 32f8b2882b..39656e410d 100644 --- a/app/views/admin/domains/form/_pending_update.haml +++ b/app/views/admin/domains/form/_pending_update.haml @@ -1,8 +1,8 @@ - if (status == DomainStatus::PENDING_UPDATE && f.object.pending_json.present?) - = link_to(t(:apply_pending), admin_domain_pending_update_path(f.object.id, f.object.id), + = link_to(t('.accept_btn'), admin_domain_pending_update_path(f.object.id, f.object.id), method: :patch, data: { confirm: t(:are_you_sure) }, class: 'btn btn-danger btn-xs') - = link_to(t(:delete_pending), admin_domain_pending_update_path(f.object.id, f.object.id), + = link_to(t('.reject_btn'), admin_domain_pending_update_path(f.object.id, f.object.id), method: :delete, data: { confirm: t(:are_you_sure) }, class: 'btn btn-danger btn-xs') diff --git a/config/locales/admin/domains.en.yml b/config/locales/admin/domains.en.yml index 7773331c83..c4fd1ccb27 100644 --- a/config/locales/admin/domains.en.yml +++ b/config/locales/admin/domains.en.yml @@ -12,6 +12,13 @@ en: search_form: reset_btn: Reset + form: + pending_delete: &pending_delete + accept_btn: Accept + reject_btn: Reject + + pending_update: *pending_delete + edit: header: "Edit:" add_new_status_btn: Add new status