Sha256: 172bc633d8cb39676e7eeae3b8736bcd5e38a6c22f360396996e4090aefc92f8

Contents?: true

Size: 1.14 KB

Versions: 84

Compression:

Stored size: 1.14 KB

Contents

<% url_options = params_for(:action => :add_existing) -%>
<% xhr = request.xhr? -%>
<%=
options = {:id => element_form_id(:action => :add_existing),
           :class => "as_form create",
           :method => :post,
           'data-loading' => true}
  options[:remote] = true if xhr
  form_tag url_options, options -%>

  <h4><%= active_scaffold_config.nested.label -%></h4>

  <% if xhr -%>
    <div id="<%= element_messages_id(:action => :add_existing) %>" class="messages-container"></div>
  <% else -%>
    <%= render :partial => 'form_messages' %>
  <% end -%>

  <label for="<%= "record_#{active_scaffold_config.model}" %>"><%= active_scaffold_add_existing_label %></label>
  <%= active_scaffold_add_existing_input(:name => 'associated_id', :url_options => url_options) %>

  <p class="form-footer">
    <%= submit_tag as_(:add), :class => "submit" %>
    <%= link_to as_(:cancel), main_path_to_return, :class => 'as_cancel', :remote => true %>
    <%= loading_indicator_tag(:action => :add_existing, :id => params[:id]) %>
  </p>

</form>
<%= javascript_tag("ActiveScaffold.focus_first_element_of_form('#{element_form_id(:action => :add_existing)}');") %>

Version data entries

84 entries across 84 versions & 5 rubygems

Version Path
active_scaffold-sequel-0.8.0 frontends/default/views/_add_existing_form.html.erb
active_scaffold-sequel-0.7.1 frontends/default/views/_add_existing_form.html.erb
active_scaffold-sequel-0.7.0 frontends/default/views/_add_existing_form.html.erb
active_scaffold-sequel-0.6.2 frontends/default/views/_add_existing_form.html.erb
active_scaffold-sequel-0.6.1 frontends/default/views/_add_existing_form.html.erb
active_scaffold-3.3.3 app/views/active_scaffold_overrides/_add_existing_form.html.erb
active_scaffold-sequel-0.6.0 frontends/default/views/_add_existing_form.html.erb
active_scaffold-3.3.2 app/views/active_scaffold_overrides/_add_existing_form.html.erb
active_scaffold-3.3.1 app/views/active_scaffold_overrides/_add_existing_form.html.erb
active_scaffold-3.3.0 app/views/active_scaffold_overrides/_add_existing_form.html.erb
active_scaffold-3.2.20 frontends/default/views/_add_existing_form.html.erb
active_scaffold-3.3.0.rc3 app/views/active_scaffold_overrides/_add_existing_form.html.erb
active_scaffold-3.3.0.rc2 app/views/active_scaffold_overrides/_add_existing_form.html.erb
active_scaffold-3.2.19 frontends/default/views/_add_existing_form.html.erb
active_scaffold-3.3.0.rc app/views/active_scaffold_overrides/_add_existing_form.html.erb
active_scaffold-3.2.17 frontends/default/views/_add_existing_form.html.erb
active_scaffold-3.2.16 frontends/default/views/_add_existing_form.html.erb
active_scaffold-3.2.15 frontends/default/views/_add_existing_form.html.erb
active_scaffold-3.2.14 frontends/default/views/_add_existing_form.html.erb
active_scaffold-3.2.13 frontends/default/views/_add_existing_form.html.erb