Sha256: e188170df97f69a6e7936e877558aa432b0a34d43585adc73ffb0a003a803b88

Contents?: true

Size: 1.05 KB

Versions: 2

Compression:

Stored size: 1.05 KB

Contents

<div class='configurable-container'>

  <div class="header">
    <h2>Config</h2>
  </div>

  <div class="configurable-options">
    <%= form_tag(configurable_path, :method => :put) do -%>
      <%- @keys.each do |key| -%>
        <%- options = Configurable.defaults[key] -%>
        <div class="configurable">
          <%= label_tag key, options[:name] %>
          <%- if options[:type] == 'boolean' %>
            <%= hidden_field_tag key, "0" %>
            <%= check_box_tag key, "1", Configurable.send(key) %>
          <%- elsif options[:type] == 'password' -%>
            <%= password_field_tag key, Configurable.send(key) %>
          <%- elsif options[:type] == 'text' -%>
            <%= text_area_tag key, Configurable.send(key) %>
          <%- elsif options[:type] == 'list' -%>
            <%= text_area_tag key, Configurable.serialized_value(key) -%>
          <%- else -%>
            <%= text_field_tag key, Configurable.send(key) %>
          <%- end -%>
        </div>
      <%- end -%>

      <%= submit_tag 'Save' %>
    <%- end -%>
  </div>
</div>

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
configurable_engine-2.0.1 app/views/configurable_engine/configurables/show.html.erb
configurable_engine-2.0.0 app/views/configurable_engine/configurables/show.html.erb