26 lines
705 B
Text
26 lines
705 B
Text
%div
|
|
= form_for [@project, @snippet] do |f|
|
|
-if @snippet.errors.any?
|
|
%ul
|
|
- @snippet.errors.full_messages.each do |msg|
|
|
%li= msg
|
|
|
|
%table.round-borders
|
|
%tr
|
|
%td= f.label :title
|
|
%td= f.text_field :title, :placeholder => "Example Snippet"
|
|
%tr
|
|
%td= f.label :file_name
|
|
%td= f.text_field :file_name, :placeholder => "example.rb"
|
|
%tr
|
|
%td= f.label "Lifetime"
|
|
%td= f.select :expires_at, lifetime_select_options
|
|
%tr
|
|
%td{:colspan => 2}
|
|
= f.label :content, "Code"
|
|
%br
|
|
%br
|
|
= f.text_area :content
|
|
|
|
.actions.prepend-top
|
|
= f.submit 'Save', :class => "button"
|