Sha256: 8a4783362c0f6d241fdda08a6bd91d662afd8076e7bc3092bf57764357aea8ff

Contents?: true

Size: 946 Bytes

Versions: 16

Compression:

Stored size: 946 Bytes

Contents

#------------------------------------------------------------------------------
module Liquid
  class ContactForm < DmCore::LiquidTag
    
    #------------------------------------------------------------------------------
    def render(context)
      partial_name = @attributes['name'].present? ? "#{@attributes['name']}_contact_form" : 'contact_form'
      context.registers[:view].render(:partial => "liquid_tags/#{partial_name}")
    end

    #------------------------------------------------------------------------------
    def self.details
      { name: self.tag_name,
        summary: 'Contact form tag',
        category: 'form',
        description: <<-END_OF_DESCRIPTION
Includes a system standard contact form.

~~~
{% contact_form %}
~~~

If you have a custom form, provide it's name

~~~
{% contact_form name: tech_support %}
~~~

END_OF_DESCRIPTION
      }
    end
  end
  Template.register_tag('contact_form', ContactForm)
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
dm_cms-4.2.3.10 lib/dm_cms/liquid/tags/contact_form.rb
dm_cms-4.2.3.9 lib/dm_cms/liquid/tags/contact_form.rb
dm_cms-4.2.3.8 lib/dm_cms/liquid/tags/contact_form.rb
dm_cms-4.2.3.7 lib/dm_cms/liquid/tags/contact_form.rb
dm_cms-4.2.3.6 lib/dm_cms/liquid/tags/contact_form.rb
dm_cms-4.2.3.5 lib/dm_cms/liquid/tags/contact_form.rb
dm_cms-4.2.3.4 lib/dm_cms/liquid/tags/contact_form.rb
dm_cms-4.2.3.3 lib/dm_cms/liquid/tags/contact_form.rb
dm_cms-4.2.3.2 lib/dm_cms/liquid/tags/contact_form.rb
dm_cms-4.2.3.1 lib/dm_cms/liquid/tags/contact_form.rb
dm_cms-4.2.3 lib/dm_cms/liquid/tags/contact_form.rb
dm_cms-4.2.2.3 lib/dm_cms/liquid/tags/contact_form.rb
dm_cms-4.2.2.2 lib/dm_cms/liquid/tags/contact_form.rb
dm_cms-4.2.2.1 lib/dm_cms/liquid/tags/contact_form.rb
dm_cms-4.2.2 lib/dm_cms/liquid/tags/contact_form.rb
dm_cms-4.2.1.5 lib/dm_cms/liquid/tags/contact_form.rb