Sha256: 226066c34c8ccd725a0eba5c3060f4abf22c278cca630ea369577e73bc70b8a4

Contents?: true

Size: 1.1 KB

Versions: 21

Compression:

Stored size: 1.1 KB

Contents

<%= turbo_frame_tag 'attach_modal' do %>
  <%= form_with scope: 'fields',
    url: "#{avo.root_path}resources/#{params[:resource_name]}/#{params[:id]}/#{params[:related_name]}/",
    data: {
      'turbo-frame': '_top'
    } do |form| %>
    <%= render Avo::ModalComponent.new do |c| %>
      <% c.heading do %>
        <%= t 'avo.choose_item', item: params[:related_name].downcase %>
      <% end %>

      <div class="flex-1 flex items-center justify-center px-8 text-lg mt-8 mb-12">
        <div class="flex-1 flex flex-col items-center justify-center px-24 text-base">
          <%= form.select :related_id, options_for_select(@options.map { |o| [o[:label], o[:value]] }, nil),
            {
              include_blank: t('avo.choose_an_option'),
            },
            {
              class: input_classes('w-full'),
            }
          %>
        </div>
      </div>

      <% c.controls do %>
        <%= a_button t('avo.cancel'), 'data-action': 'click->modal#close', size: :sm %>
        <%= a_button t('avo.attach'), type: :submit, color: :green, size: :sm %>
      <% end %>
    <% end %>
  <% end %>
<% end %>

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
avo-1.22.1.pre.1 app/views/avo/relations/new.html.erb
avo-1.22.0 app/views/avo/relations/new.html.erb
avo-1.22.0.pre.1 app/views/avo/relations/new.html.erb
avo-1.21.1.pre.1 app/views/avo/relations/new.html.erb
avo-1.21.0 app/views/avo/relations/new.html.erb
avo-1.20.2.pre.2 app/views/avo/relations/new.html.erb
avo-1.20.2.pre.1 app/views/avo/relations/new.html.erb
avo-1.21.0.pre.1 app/views/avo/relations/new.html.erb
avo-1.20.1 app/views/avo/relations/new.html.erb
avo-1.19.1.pre.11 app/views/avo/relations/new.html.erb
avo-1.19.1.pre.10 app/views/avo/relations/new.html.erb
avo-1.19.1.pre.9 app/views/avo/relations/new.html.erb
avo-1.19.1.pre.8 app/views/avo/relations/new.html.erb
avo-1.19.1.pre.7 app/views/avo/relations/new.html.erb
avo-1.19.1.pre.6 app/views/avo/relations/new.html.erb
avo-1.19.1.pre.5 app/views/avo/relations/new.html.erb
avo-1.19.1.pre.4 app/views/avo/relations/new.html.erb
avo-1.19.1.pre.3 app/views/avo/relations/new.html.erb
avo-1.19.1.pre.2 app/views/avo/relations/new.html.erb
avo-1.19.1.pre.1 app/views/avo/relations/new.html.erb