foreman/app/views/config_templates/_form.html.erb @ 82e47ae0
0c87d936 | Ohad Levy | <%= form_for @config_template, :html => { :multipart => true } do |f| %>
|
|
05ab4c16 | Ohad Levy | <%= base_errors_for @config_template %>
|
|
<%= text_f f, :name %>
|
|||
<%= checkbox_f f, :snippet, :onchange => "$('#kind_selector, #template_associations').toggle(!$('#config_template_snippet').attr('checked'))" %>
|
|||
cab0d8c6 | Ohad Levy | ||
05ab4c16 | Ohad Levy | <div id="kind_selector" <%= display? @config_template.snippet %>>
|
|
<%= select_f f, :template_kind_id, TemplateKind.all, :id, :name, :include_blank => true, :label => "Type" %>
|
|||
</div>
|
|||
0c87d936 | Ohad Levy | ||
82e47ae0 | Amos Benari | <%= textarea_f f, :template, :class => "input-xxlarge",
|
|
:help_block =>"<span class='label label-info'>Notice</span> #{link_to 'Useful template functions and macros', 'http://theforeman.org/projects/foreman/wiki/TemplateWriting#Functions-and-macros',
|
|||
f40d58aa | Ohad Levy | :rel => "external"}".html_safe
|
|
05ab4c16 | Ohad Levy | %>
|
|
82e47ae0 | Amos Benari | <%= file_field_f f, :template, :help_inline => "<span class='label label-info'>upload</span> a template instead".html_safe %>
|
|
05ab4c16 | Ohad Levy | ||
0c87d936 | Ohad Levy | <div id="template_associations" <%= display? @config_template.snippet %>>
|
|
<%= multiple_checkboxes f, :operatingsystems, @config_template, Operatingsystem, :label => "Operating Systems" %>
|
|||
<%= render "combinations", :f => f %>
|
|||
</div>
|
|||
05ab4c16 | Ohad Levy | ||
0c87d936 | Ohad Levy | <%= submit_or_cancel f %>
|
|
cab0d8c6 | Ohad Levy | <% end %>
|