foreman/app/views/lookup_keys/_value.html.erb @ 09ce8a63
09ce8a63 | Ori Rabin | <% if is_template %>
|
|
<table>
|
|||
<% end %>
|
|||
<tr class="fields matchers form-group <%= 'has-error' if f.object.errors.any? %>">
|
|||
<td>
|
|||
<%= f.hidden_field :match, :class => 'match' %>
|
|||
<%= select_tag '', nil, :class => 'matcher_key' %>
|
|||
=
|
|||
<%= text_field_tag '', nil, :class => 'matcher_value' %>
|
|||
</td>
|
|||
<td>
|
|||
<%= f.text_area :value, :rows => line_count(f, :value), :class => 'form-control', :'data-property' => 'value',
|
|||
8e53b7c9 | Ori Rabin | :disabled => f.object.use_puppet_default,
|
|
09ce8a63 | Ori Rabin | :placeholder => _("Value") %>
|
|
</td>
|
|||
<td>
|
|||
<%= fullscreen_button("$(this).parent().prev().find('textarea')") %>
|
|||
</td>
|
|||
<td class="ca">
|
|||
<%= f.check_box :use_puppet_default, :'data-property' => 'use_puppet_default',
|
|||
:disabled => !is_param,
|
|||
:onchange => 'toggleUsePuppetDefaultValue(this, "value")' if is_param %>
|
|||
</td>
|
|||
<td>
|
|||
<span class="help-block">
|
|||
<%= link_to_remove_fields('', f) %>
|
|||
</span>
|
|||
</td>
|
|||
</tr>
|
|||
<% if f.object.errors.any? %>
|
|||
<tr class="has-error">
|
|||
<td colspan="5">
|
|||
<span class="help-block">
|
|||
<%= f.object.errors.full_messages.to_sentence %>
|
|||
</span>
|
|||
</td>
|
|||
</tr>
|
|||
<% end %>
|
|||
<% if is_template %>
|
|||
</table>
|
|||
<% end %>
|