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