summaryrefslogtreecommitdiff
path: root/engines/support/app/views
diff options
context:
space:
mode:
Diffstat (limited to 'engines/support/app/views')
-rw-r--r--engines/support/app/views/tickets/_edit_form.html.haml16
-rw-r--r--engines/support/app/views/tickets/_new_comment_form.html.haml4
-rw-r--r--engines/support/app/views/tickets/_tabs.html.haml4
-rw-r--r--engines/support/app/views/tickets/new.html.haml7
4 files changed, 13 insertions, 18 deletions
diff --git a/engines/support/app/views/tickets/_edit_form.html.haml b/engines/support/app/views/tickets/_edit_form.html.haml
index 714f8ff..bf175fe 100644
--- a/engines/support/app/views/tickets/_edit_form.html.haml
+++ b/engines/support/app/views/tickets/_edit_form.html.haml
@@ -17,13 +17,17 @@
regarding_user_link = ''
end
-= form_for @ticket do |f|
+= simple_form_for @ticket do |f|
= hidden_ticket_fields
%p.first
- if @ticket.is_open?
- %span.label.label-info= t(:open)
+ %span.label.label-info
+ %b{style: 'padding:10px'}= t(:open)
+ = f.button :loading, t(:close), value: 'close', class: 'btn-mini'
- else
- %span.label.label-success= t(:closed)
+ %span.label.label-success
+ %b{style: 'padding:10px'}= t(:closed)
+ = f.button :loading, t(:open), value: 'open', class: 'btn-mini'
%span.label.label-clear= t(:created_by_on, :user => created_by, :time => @ticket.created_at.to_s(:short)).html_safe
%div= t(:subject)
= f.text_field :subject, :class => 'large full-width'
@@ -39,10 +43,6 @@
= t(:regarding_account)
= regarding_user_link
= f.text_field :regarding_user
- = f.button t(:save), :name => 'commit', :class => 'btn', :type => 'submit', :value => 'save'
- - if @ticket.is_open?
- = f.button t(:close), :name => 'commit', :class => 'btn', :type => 'submit', :value => 'close'
- - else
- = f.button t(:open), :name => 'commit', :class => 'btn', :type => 'submit', :value => 'open'
+ = f.button :loading, t(:save), :value => 'save'
- if admin?
= link_to t(:destroy), auto_ticket_path(@ticket), :confirm => t(:are_you_sure), :method => :delete, :class => 'btn'
diff --git a/engines/support/app/views/tickets/_new_comment_form.html.haml b/engines/support/app/views/tickets/_new_comment_form.html.haml
index 8418e01..40c737f 100644
--- a/engines/support/app/views/tickets/_new_comment_form.html.haml
+++ b/engines/support/app/views/tickets/_new_comment_form.html.haml
@@ -7,7 +7,7 @@
= c.input :body, :label => false, :as => :text, :input_html => {:class => "full-width", :rows=> 5}
- if admin?
= c.input :private, :as => :boolean, :label => false, :inline_label => true
- = f.button :button, t(:post_reply), :name => 'commit', :class => 'btn-primary', :type => 'submit', :value => 'post_reply'
+ = f.button :loading, t(:post_reply), class: 'btn-primary', value: 'post_reply'
- if logged_in? && @ticket.is_open
- = f.button :button, t(:reply_and_close), :name => 'commit', :class => 'btn', :type => 'submit', :value => 'reply_and_close'
+ = f.button :loading, t(:reply_and_close), value: 'reply_and_close'
= link_to t(:cancel), auto_tickets_path, :class => :btn
diff --git a/engines/support/app/views/tickets/_tabs.html.haml b/engines/support/app/views/tickets/_tabs.html.haml
index b7b5d3a..445a909 100644
--- a/engines/support/app/views/tickets/_tabs.html.haml
+++ b/engines/support/app/views/tickets/_tabs.html.haml
@@ -1,7 +1,7 @@
-#
-# SORT ORDER TABS
-#
-- unless action?(:new)
+- unless action?(:new) or action?(:create)
%ul.nav.nav-pills.pull-right.slim
%li{:class=> ("active" if search_order.start_with? 'created_at')}
= link_to_order('created')
@@ -19,5 +19,5 @@
= link_to_status 'closed'
%li{:class => ("active" if search_status == 'all')}
= link_to_status 'all'
- %li{:class => ("active" if action?(:new))}
+ %li{:class => ("active" if action?(:new) || action?(:create))}
= link_to icon(:plus, :black) + t(:new_ticket), auto_new_ticket_path
diff --git a/engines/support/app/views/tickets/new.html.haml b/engines/support/app/views/tickets/new.html.haml
index 65ed67b..ab008d2 100644
--- a/engines/support/app/views/tickets/new.html.haml
+++ b/engines/support/app/views/tickets/new.html.haml
@@ -14,9 +14,4 @@
= c.input :body, :label => t(:description), :as => :text, :input_html => {:class => "full-width", :rows=> 5}
- if admin?
= c.input :private, :as => :boolean, :label => false, :inline_label => true
- .form-actions
- = f.button :submit, :class => 'btn-primary', :value => t(:create_thing, :thing => t(:ticket))
- - if logged_in?
- = link_to t(:cancel), auto_tickets_path, :class => :btn
- - else
- = link_to t(:cancel), home_path, :class => 'btn'
+ = f.button :wrapped, cancel: (logged_in? ? auto_tickets_path : home_path)