def submit(value, options={}, &block)
      after_text = @template.capture(&block) if block_given?
      
      # Add specific bootstrap class
      options[:class] ||= ''
      options[:class] += ' btn'
      unless options[:class] =~ /btn-/
        options[:class] += ' btn-primary' 
      end

      # Set the script to change the text
      if change_to_text = options.delete(:change_to_text)
        options[:class] += ' change_to_text'
        options[:onclick] ||= ''
        options[:onclick] = "$(this).closest('.submit').hide();$(this).closest('.submit').after($('<div class=submit>#{change_to_text}</div>'))"
      end

      @template.render(:partial => "#{BootstrapBuilder.config.template_folder}/submit", :locals  => {
        :builder => self,
        :field => super(value, options),
        :after_text => after_text,
        :change_to_text => change_to_text
      })
    end
def submit(value, options={}, &block)
      after_text = @template.capture(&block) if block_given?
      
      # Add specific bootstrap class
      options[:class] ||= ''
      options[:class] += ' btn'
      unless options[:class] =~ /btn-/
        options[:class] += ' btn-primary' 
      end

      # Set the script to change the text
      if change_to_text = options.delete(:change_to_text)
        options[:class] += ' change_to_text'
        options[:onclick] ||= ''
        options[:onclick] = "$(this).closest('.submit').hide();$(this).closest('.submit').after($('<div class=submit>#{change_to_text}</div>'))"
      end

      @template.render(:partial => "#{BootstrapBuilder.config.template_folder}/submit", :locals  => {
        :builder => self,
        :field => super(value, options),
        :after_text => after_text,
        :change_to_text => change_to_text
      })
    end
f.submit 'Log In', :change_to_text => 'Logging you in ...'