summaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorAzul <azul@leap.se>2014-05-28 09:26:17 +0200
committerAzul <azul@leap.se>2014-05-28 09:26:17 +0200
commitdf1c2438fcfe39edfb46546be8fcee5021f95fc3 (patch)
tree77be434e4cfbf4329f4c739cea58da97a9ee435e /engines
parent8ca32588c969ee9eca986da8cf1de92b39ce3576 (diff)
destroy_btn helper method
Diffstat (limited to 'engines')
-rw-r--r--engines/billing/app/views/subscriptions/show.html.haml2
-rw-r--r--engines/support/app/views/tickets/_edit_form.html.haml2
2 files changed, 2 insertions, 2 deletions
diff --git a/engines/billing/app/views/subscriptions/show.html.haml b/engines/billing/app/views/subscriptions/show.html.haml
index af1a5a5..246ebf0 100644
--- a/engines/billing/app/views/subscriptions/show.html.haml
+++ b/engines/billing/app/views/subscriptions/show.html.haml
@@ -4,4 +4,4 @@
Subscription
= render :partial => "subscription_details", :locals => {:subscription => @subscription}
- if allow_cancel_subscription(@subscription)
- = btn :cancel_subscription, user_subscription_path(@user, @subscription.id), :confirm => t(:are_you_sure), :method => :delete, :type => 'danger'
+ = destroy_btn :cancel_subscription, user_subscription_path(@user, @subscription.id), type: 'danger'
diff --git a/engines/support/app/views/tickets/_edit_form.html.haml b/engines/support/app/views/tickets/_edit_form.html.haml
index 9adc2cc..889dac2 100644
--- a/engines/support/app/views/tickets/_edit_form.html.haml
+++ b/engines/support/app/views/tickets/_edit_form.html.haml
@@ -43,4 +43,4 @@
= f.input :regarding_user, label: Ticket.human_attribute_name(:regarding_user) + regarding_user_link
= f.button :loading
- if admin?
- = btn t(".destroy", cascade: true), auto_ticket_path(@ticket), confirm: t("tickets.confirm.destroy.are_you_sure", cascade: true), method: :delete
+ = destroy_btn t(".destroy", cascade: true), auto_ticket_path(@ticket)