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