Sha256: 8b5a4d3a11210106c72af502e8c0fb7cdeb301e71b9646ca33ae12e4b43f603d

Contents?: true

Size: 1.21 KB

Versions: 13

Compression:

Stored size: 1.21 KB

Contents

<%#
The following params are the variables that can be used in this partial.

@param form [Wallaby::FormBuilder] custom form object that adds a few helper methods and delegate missing methods to the view
@param object [Wallaby::ResourceDecorator] decorator instance which wraps the resource (e.g. ActiveRecord) instance
@param field_name [String] name of the field
@param value [Object] value of the field
@param metadata [Hash] metadata of the field
%>
<div class="form-group <%= form.error_class field_name %>">
  <%= form.label field_name, metadata[:label] %>
  <div class="row">
    <div class="col-6 col-sm-4">
      <div class="input-group">
        <span class="input-group-prepend"><span class="input-group-text">X</span></span>
        <%= form.number_field field_name, value: value.try(:[], 0), multiple: true, class: 'form-control' %>
      </div>
    </div>
    <div class="col-6 col-sm-4">
      <div class="input-group">
        <span class="input-group-prepend"><span class="input-group-text">Y</span></span>
        <%= form.number_field field_name, value: value.try(:[], 1), multiple: true, class: 'form-control' %>
      </div>
    </div>
  </div>
  <%= form.error_messages field_name %>
  <%= hint_of metadata %>
</div>

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
wallaby-8.0.0 app/views/wallaby/resources/form/_point.html.erb
wallaby-7.0.0 app/views/wallaby/resources/form/_point.html.erb
wallaby-7.0.0.beta2 app/views/wallaby/resources/form/_point.html.erb
wallaby-7.0.0.beta1 app/views/wallaby/resources/form/_point.html.erb
wallaby-6.1.6 app/views/wallaby/resources/form/_point.html.erb
wallaby-6.1.5 app/views/wallaby/resources/form/_point.html.erb
wallaby-6.1.4 app/views/wallaby/resources/form/_point.html.erb
wallaby-6.1.3 app/views/wallaby/resources/form/_point.html.erb
wallaby-6.1.2 app/views/wallaby/resources/form/_point.html.erb
wallaby-6.1.1 app/views/wallaby/resources/form/_point.html.erb
wallaby-6.1.0 app/views/wallaby/resources/form/_point.html.erb
wallaby-6.0.2 app/views/wallaby/resources/form/_point.html.erb
wallaby-6.0.1 app/views/wallaby/resources/form/_point.html.erb