Project

General

Profile

Download (1.97 KB) Statistics
| Branch: | Tag: | Revision:
<div class="fields">
<table class="row">
<tbody>
<tr class="form-group <%= 'error' if f.object.errors.any? %>">
<td class="col-md-3">
<%= f.hidden_field :lookup_key_id, :'data-property' => 'lookup_key_id' %>
<% puppetclass = f.object.lookup_key ? f.object.lookup_key.puppetclass || f.object.lookup_key.param_class : nil %>
<%= text_field_tag '', (puppetclass.name rescue ''), :class => 'form-control', :'data-property' => 'class', :disabled => true, :title => _('Puppetclass') %>
</td>
<td class="col-md-2">
<%= text_field_tag '', (f.object.lookup_key.key rescue ''), :class => 'form-control', :'data-property' => 'name', :disabled => true, :title => _('Parameter name') %>
</td>
<td class="col-md-5">
<div class="input-group">
<%= f.text_area :value, :rows => 1, :class => 'form-control no-stretch', :'data-property' => 'value',
:disabled => (not authorized_via_my_scope("host_editing", "edit_params")) || f.object.use_puppet_default,
:placeholder => _("Value") %>
<%= fullscreen_input %>
</div>
<%= text_field_tag '', (f.object.lookup_key.key_type rescue 'unknown'), :class=> 'hide', :'data-property' => 'type', :disabled => true, :title => _('Parameter type') %>
</td>
<td class="col-md-4">
<%= f.check_box :use_puppet_default, :'data-property' => 'use_puppet_default',
:disabled => (not authorized_via_my_scope("host_editing", "edit_params")),
:onchange=>'toggleUsePuppetDefaultValue(this, "value")' %>
<%= use_puppet_default_help('') %>
</td>
<td>
<span class="help-block">
<%= link_to_remove_fields('', f) %>
</span>
</td>
<span class="help-block">
<%= f.object.errors.full_messages.to_sentence %>
</span>
</tr>
</tbody>
</table>
</div>
(6-6/11)