Guest User

Untitled

a guest
Feb 20th, 2018
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.88 KB | None | 0 0
  1. <Page title="Add">
  2. <div id="left">
  3.  
  4. <h2>Add new #{@obj.class.name.humanize}</h2>
  5. <?r
  6. flash[:VERROR].errors.each do |sym,msg|
  7. @obj.annotation sym => {:control_style => 'border:1px solid red;'}
  8. end if flash[:VERROR]
  9. ?>
  10. #{form(:object => @obj, :action => '/add/' + @obj.class.name.methodize + (@parent_oid ? '/' + [@parent_symbol, @parent_oid].join('/') : ''), :method => 'post') do |f|
  11. f.attributes
  12. if @obj.respond_to?(:tag!)
  13. f.p :id => 'form_tags' do
  14. f.label "Nitro Version / Tags:", :for => 'tags'
  15. f.input(:type => 'text', :name => 'tags', :id => 'tags_ctl', :value => (@obj.tags.join(' ') if @obj.tags), :tabindex => '7', :style => Nitro::TextControl.style)
  16. end
  17. end
  18. f.br
  19. f.submit 'Submit'
  20. end
  21. }
  22. </div>
  23.  
  24. <render href="/help" />
  25. </Page>
Add Comment
Please, Sign In to add comment