Sha256: df694f8863893535c18252fe899f0dcb05286fc93bc8b4bc0fcfe88864b0c123

Contents?: true

Size: 1.03 KB

Versions: 1

Compression:

Stored size: 1.03 KB

Contents

<div class='configurable-container'>
  <div class="header">
    <h2>Config</h2>
  </div>

  <div class="configurable-options">
    <%= form_tag({}, 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

1 entries across 1 versions & 1 rubygems

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