summaryrefslogtreecommitdiff
path: root/help/app/views/tickets
diff options
context:
space:
mode:
Diffstat (limited to 'help/app/views/tickets')
-rw-r--r--help/app/views/tickets/index.html.haml5
-rw-r--r--help/app/views/tickets/new.html.haml15
-rw-r--r--help/app/views/tickets/show.html.haml5
3 files changed, 18 insertions, 7 deletions
diff --git a/help/app/views/tickets/index.html.haml b/help/app/views/tickets/index.html.haml
index 55bfa79..d2e0ea0 100644
--- a/help/app/views/tickets/index.html.haml
+++ b/help/app/views/tickets/index.html.haml
@@ -2,4 +2,7 @@
- @tickets.each do |ticket|
%p
= link_to ticket.title, ticket
-= #render(:partial => "ticket", :collection => @tickets) \ No newline at end of file
+%p
+Create a
+= link_to "new ticket", new_ticket_path
+= #render(:partial => "ticket", :collection => @tickets)
diff --git a/help/app/views/tickets/new.html.haml b/help/app/views/tickets/new.html.haml
index fd1bcd4..d0e6939 100644
--- a/help/app/views/tickets/new.html.haml
+++ b/help/app/views/tickets/new.html.haml
@@ -1,12 +1,19 @@
%h2=t :new_ticket
-= simple_form_for @ticket do |f|
+= simple_form_for (@ticket, :html => {:novalidate => true}) do |f| #turn off html5 validations to test
+ = @ticket.errors.messages
= f.input :title
= #f.input :email #if there is no current_user
- = f.input :email if !User.current_test
- = #simple_fields_for :comment do |c|
+ = f.input :email if !User.current_test #hmm--might authenticated users want to submit an alternate email?
+ = #f.simple_fields_for :comment do |c|
= #c.input :body, :label => 'Comment', :as => :text
+ = #f.input :comments, :label => 'Comment', :as => :text
+
+ = f.fields_for :comment do |c|
+ = c.input :body, :label => 'Comment', :as => :text
+
+
= #f.input :comment
- = render :partial => 'new_comment'
+ = #render :partial => 'new_comment' #what we were using
= # regarding_user if not logged in
= # email if not logged in
= #f.button :submit, :value => t(:submit), :class => 'btn-primary'
diff --git a/help/app/views/tickets/show.html.haml b/help/app/views/tickets/show.html.haml
index a37f5c8..1e1fab3 100644
--- a/help/app/views/tickets/show.html.haml
+++ b/help/app/views/tickets/show.html.haml
@@ -5,6 +5,7 @@ code:
= @ticket.code
= render(:partial => "comment", :collection => @ticket.comments)
-= simple_form_for @ticket do |f|
+= simple_form_for (@ticket, :html => {:novalidate => true}) do |f| #turn off html5 validations to test
= render :partial => 'new_comment'
- = f.button :submit \ No newline at end of file
+ = f.button :submit
+ = link_to t(:cancel), root_url, :class => :btn \ No newline at end of file