summaryrefslogtreecommitdiff
path: root/help/app/views/tickets/new.html.haml
blob: c0a343d72b51e52d108b6e5e6c86a49899f97273 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
- @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
  = 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'