Sha256: 0d19cbe006d2791b53b08532edd651ede77575cd7d77eff4341c5449c674986e

Contents?: true

Size: 1.11 KB

Versions: 3

Compression:

Stored size: 1.11 KB

Contents

<%
    template_prefix = field.options[:prefix] or
        raise ArgumentError.new("field_select_template requires :prefix option to be set")
    template_label = field.value.present? ? field.value.sub(/^#{template_prefix}/, '') : ''
%>

<div class="input-group input-group-sm field-select-template id-<%= field.css_id %>"
    data-prefix="<%= h template_prefix %>"
>
    <span class="input-group-btn">
        <button class="btn btn-default btn-clear" type="button"
        >
            <%= icon 'fa-times' %>
        </button>
    </span>
    <span class="input-group-addon">
        <%= template_prefix %>
    </span>
    <input id="<%= field.css_id %>" type="hidden" name="<%= field.html_name %>"
        value="<%= h field.value %>"
        class="form-control input-text-inline template-id"
    />
    <input type="text" placeholder="<%= h field.placeholder %>" class="form-control template-label" readonly="readonly"
        value="<%= h template_label %>"
    />
    <span class="input-group-btn">
        <button class="btn btn-default btn-select" type="button"
        >
            &hellip;
        </button>
    </span>
</div>

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
aerogel-pages-1.4.16 views/form_builder/admin-pages-edit-block/field_select_template.erb
aerogel-pages-1.4.14 views/form_builder/admin-pages-edit-block/field_select_template.erb
aerogel-pages-1.4.12 views/form_builder/admin-pages-edit-block/field_select_template.erb