summaryrefslogtreecommitdiff
path: root/help/app/views/tickets/new.html.haml
diff options
context:
space:
mode:
authorjessib <jessib@leap.se>2013-07-08 11:30:35 -0700
committerjessib <jessib@leap.se>2013-07-08 11:30:35 -0700
commitfc3c5994df61de04b8b17b495a638efc0d760126 (patch)
tree644aa93dfd0a6da2ed9b20ba688712fb9082f425 /help/app/views/tickets/new.html.haml
parentcfb9e1d4c2e954222b77c4dd11e06ae3a0092be5 (diff)
parent3113f8b814417a896ad5340fda88927733f8ab22 (diff)
Merge branch 'master' into feature/disable_account
Conflicts: users/app/controllers/users_controller.rb users/app/helpers/users_helper.rb users/app/views/users/edit.html.haml users/app/views/users/show.html.haml users/config/locales/en.yml
Diffstat (limited to 'help/app/views/tickets/new.html.haml')
-rw-r--r--help/app/views/tickets/new.html.haml38
1 files changed, 29 insertions, 9 deletions
diff --git a/help/app/views/tickets/new.html.haml b/help/app/views/tickets/new.html.haml
index 1aa689b..c0a343d 100644
--- a/help/app/views/tickets/new.html.haml
+++ b/help/app/views/tickets/new.html.haml
@@ -1,10 +1,30 @@
-.span12
- %h2=t :new_ticket
- = simple_form_for @ticket, :validate => true, :html => {:class => 'form-horizontal'} do |f|
- = f.input :title
- = f.input :email if !current_user #hmm--might authenticated users want to submit an alternate email?
+- @show_navigation = !params[:user_id].nil?
+
+= render 'tickets/tabs'
+
+- if admin? && @user
+ - email = @user.email_address
+ - regarding = @user.login
+- elsif logged_in?
+ - email = current_user.email_address
+ - regarding = current_user.login
+
+= simple_form_for @ticket, :validate => true, :html => {:class => 'form-horizontal'} do |f|
+ = hidden_ticket_fields
+ = f.input :title, :label => t(:subject)
+ - if logged_in?
+ = f.input :email, input_html: {value: email}
+ = f.input :regarding_user, input_html: {value: regarding}
+ - else
+ = f.input :email
= f.input :regarding_user
- = render :partial => 'new_comment', :locals => {:f => f}
- .form-actions
- = f.button :submit, :class => 'btn-primary'
- = link_to t(:cancel), tickets_path, :class => :btn
+ = f.simple_fields_for :comments, @comment do |c|
+ = 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), root_path, :class => 'btn' \ No newline at end of file