theforeman/foreman-xen

View on GitHub
app/views/compute_resources_vms/form/_templates.html.erb

Summary

Maintainability
Test Coverage
<div class="fields">
  <div id='templates'>
    <div class="form-group ">
      <%= selectable_f_with_cache_invalidation(f, :builtin_template,
            options_from_collection_for_select(
              compute_resource.builtin_templates, :uuid, :name
            ),
            { prompt: 'Select a Template'},
            { class: 'span2', label: 'Builtin Template' },
            { title: 'Refresh available builtin templates',
              url: url_for(controller: "foreman_xen/cache",
                           action: "refresh", only_path: true),
              compute_resource_id: compute_resource.id,
              attribute: 'builtin_templates' }
           ) %>
    </div>
  </div>
</div>