Sha256: c734a3e22f3c582775f1cdaae61f9a973a8107ff0833e82b431686521607b055
Contents?: true
Size: 1.49 KB
Versions: 6
Compression:
Stored size: 1.49 KB
Contents
module Widgets module DynamicForms class Base < ErpApp::Widgets::Base def index render end def new @website = Website.find_by_host(request.host_with_port) @myDynamicObject = DynamicFormModel.get_instance(params[:model_name]) params[:created_by] = current_user unless current_user.nil? params[:created_with_form_id] = params[:dynamic_form_id] if params[:dynamic_form_id] and params[:is_html_form].blank? params[:website_id] = @website.id @myDynamicObject = DynamicFormModel.save_all_attributes(@myDynamicObject, params, ErpApp::Widgets::Base::IGNORED_PARAMS) if @myDynamicObject render :json => { :success => true, :response => render_to_string(:template => "success", :layout => false) } else render :json => { :success => false, :response => render_to_string(:template => "error", :layout => false) } end end #should not be modified #modify at your own risk def locate File.dirname(__FILE__) end class << self def title "Dynamic Forms" end def widget_name File.basename(File.dirname(__FILE__)) end def base_layout begin file = File.join(File.dirname(__FILE__),"/views/layouts/base.html.erb") IO.read(file) rescue return nil end end end end end end
Version data entries
6 entries across 6 versions & 1 rubygems