Sha256: b0309af3857c726ef3b5ed6a0ad4d590775f3e921c82f6724121b272b36aac71

Contents?: true

Size: 1.64 KB

Versions: 13

Compression:

Stored size: 1.64 KB

Contents

<% @photo_album = @r_object %>
<%= form_for(@photo_album, :html => {:id=>"form_photo_album", :class=>"mb-0 form-horizontal", :role => "form", :method => (@photo_album.new_record? ? :post : :put), :remote=>true}) do |f| %>

      <div id="photo_album_form_error">
        <%= @photo_album.errors[:base].to_sentence %>
      </div>

      <div class="form-inputs mb-30 mt-30">

        <%= theme_form_field(@photo_album, :name) %>

        <%= theme_form_field(@photo_album, :code) %>

        <%= theme_form_field(@photo_album, :one_liner, required: false) %>
        <%= theme_form_field(@photo_album, :description, required: false, html_options: {type: :textarea}) %>
        <%= theme_form_field(@photo_album, :priority, required: false, html_options: {type: :number, style: "width:70px;"}) %>

        <%
          @photo_album.parent_id = params[:parent_id] if params[:parent_id]
          relation = Dhatu::PhotoAlbum.select("id, name").order("name ASC")
          relation = relation.where("id != '#{@photo_album.id}'") if @photo_album.id
          photo_albums = relation.all
        %>

        <% options = {assoc_collection: photo_albums, required: false, editable: true, assoc_display_method: :name, label: "Parent Category", include_blank: true} %>
        <%= theme_form_assoc_group(@photo_album, :parent_id, **options) %>
      </div>
    
      <div>
        <%= submit_tag("Save", :class=>"btn btn-primary pull-right ml-10") %>
        
        <%= link_to raw("<i class='fa fa-close mr-5'></i><span>Cancel</span>"), "#", onclick: "closeGenericModal();", class: "pull-right ml-10 btn btn-white" %>
      </div>
      <%= clear_tag(10) %>
  </div>

<% end %>

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
dhatu-0.3.9.pre.materialize app/views/dhatu/photo_albums/_form.html.erb
dhatu-0.3.8.pre.materialize app/views/dhatu/photo_albums/_form.html.erb
dhatu-0.3.7.pre.materialize app/views/dhatu/photo_albums/_form.html.erb
dhatu-0.3.6.pre.materialize app/views/dhatu/photo_albums/_form.html.erb
dhatu-0.3.5.pre.materialize app/views/dhatu/photo_albums/_form.html.erb
dhatu-0.3.4.pre.materialize app/views/dhatu/photo_albums/_form.html.erb
dhatu-0.3.3.pre.materialize app/views/dhatu/photo_albums/_form.html.erb
dhatu-0.3.2.pre.materialize app/views/dhatu/photo_albums/_form.html.erb
dhatu-0.3.1.pre.materialize app/views/dhatu/photo_albums/_form.html.erb
dhatu-0.3.0.pre.materialize app/views/dhatu/photo_albums/_form.html.erb
dhatu-0.2.3 app/views/dhatu/photo_albums/_form.html.erb
dhatu-0.2.2 app/views/dhatu/photo_albums/_form.html.erb
dhatu-0.2.1 app/views/dhatu/photo_albums/_form.html.erb