Sha256: 7a4fe31b7d04e887c6f9616cdf4ae2254d6748eeba95169c1c4ef0be40e19480

Contents?: true

Size: 875 Bytes

Versions: 1

Compression:

Stored size: 875 Bytes

Contents

<%# locals => f %>

<%= f.hidden_field :metric_id %>

<% if f.object.metric.is_switch %>
	<span class="switch-type"><%=h f.object.switch_type %></span>
<% end %>

<div class="item name">
	<%= f.label :name, 'Name (whatever you want)' %>
	<%= f.text_field :name %>
</div>

<% if !f.object.metric.is_switch %>
	<div class="item value">
		<%= f.label :value, 'What\'s displayed' %>
		<%= f.text_area :value %>
	</div>
	
	<input type='checkbox' id="my_slider" class='slider' data-slider='.options' />
	<label for="my_slider">Add optional variants</label>
	<div class="options" style="display:none;">
		<div class="item opt1">
			<%= f.label :opt1, 'Option 1' %>
			<%= f.text_area :opt1 %>
		</div>
		
		<div class="item opt2">
			<%= f.label :opt2, 'Option 2' %>
			<%= f.text_area :opt2 %>
		</div>
	</div>
<% end %>

<div class="item submit">
	<%= f.submit 'Submit' %>
</div>

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
mountain-goat-1.0.0 lib/mountain-goat/views/mountain_goat/mg/metric_variants/_metric_variant_form.html.erb