From c89067165b0d31f42565daa2c76fee60c3f526b7 Mon Sep 17 00:00:00 2001 From: Francisco Marcelo de Araújo Lima Júnior Date: Fri, 22 Aug 2014 18:12:51 -0300 Subject: [PATCH] add infra --- app/controllers/public/account_controller.rb | 11 +++++++++++ app/views/account/_signup_form.html.erb | 25 ++++++++++++++++++++++++- 2 files changed, 35 insertions(+), 1 deletion(-) diff --git a/app/controllers/public/account_controller.rb b/app/controllers/public/account_controller.rb index a02b28b..ea9a9cf 100644 --- a/app/controllers/public/account_controller.rb +++ b/app/controllers/public/account_controller.rb @@ -65,6 +65,17 @@ class AccountController < ApplicationController render :text => { :ok=>true, :key=>key }.to_json end + def custom_fields_for_template + custom_fields ||= environment.people.templates.find(params[:template_id]).custom_fields.keys + #raise custom_fields.inspect + + custom_fields = [{ :name => "custom_field_4", :label => "bli"}, + { :name => "custom_field_5", :label => "ajsdfh"}, + { :name => "custom_field_6", :label => "ytytyty"}] + + render :text => {:ok => true, :custom_fields => custom_fields}.to_json + end + # action to register an user to the application def signup if @plugins.dispatch(:allow_user_registration).include?(false) diff --git a/app/views/account/_signup_form.html.erb b/app/views/account/_signup_form.html.erb index 056c834..ff2f46f 100644 --- a/app/views/account/_signup_form.html.erb +++ b/app/views/account/_signup_form.html.erb @@ -31,7 +31,30 @@ -- libgit2 0.21.2