From 33772d3f314265a455e1994bd9788b264cdd087c Mon Sep 17 00:00:00 2001 From: Steve Sutton Date: Mon, 18 Dec 2017 15:08:15 -0500 Subject: [PATCH] WIP for add attendee custom field form Trying to get the custom form field into view file. --- js/frontRegApp.js | 2 +- js/views/front/registrantForm.js | 2 +- models/front/registrations/registration.php | 1 + views/front/registrations/registration.html | 9 ++++++++- 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/js/frontRegApp.js b/js/frontRegApp.js index 02e6429..3d97859 100644 --- a/js/frontRegApp.js +++ b/js/frontRegApp.js @@ -1100,7 +1100,7 @@ app.Views.Front.RegistrantForm = Backbone.View.extend({ render: function(){ this.$el.html( this.template( this.model.toJSON() ) ); // console.log( this.model.get('reg_event') ); - app.setCustomFieldsForm(this.model.get('reg_event'), '', '.attendee-cf-new'); + // app.setCustomFieldsForm(this.model.get('reg_event'), '', '.attendee-cf-new'); return this; }, diff --git a/js/views/front/registrantForm.js b/js/views/front/registrantForm.js index 5e0e702..361af19 100644 --- a/js/views/front/registrantForm.js +++ b/js/views/front/registrantForm.js @@ -25,7 +25,7 @@ app.Views.Front.RegistrantForm = Backbone.View.extend({ render: function(){ this.$el.html( this.template( this.model.toJSON() ) ); // console.log( this.model.get('reg_event') ); - app.setCustomFieldsForm(this.model.get('reg_event'), '', '.attendee-cf-new'); + // app.setCustomFieldsForm(this.model.get('reg_event'), '', '.attendee-cf-new'); return this; }, diff --git a/models/front/registrations/registration.php b/models/front/registrations/registration.php index 6df0f3d..1a57e23 100644 --- a/models/front/registrations/registration.php +++ b/models/front/registrations/registration.php @@ -346,6 +346,7 @@ // Compile template data $templateData = array( + 'regEventId' => $regEventId, 'page' => 'registration', 'haveCart' => $haveCart, 'isNewCart' => $isNewCart, diff --git a/views/front/registrations/registration.html b/views/front/registrations/registration.html index 262e224..05a72cb 100644 --- a/views/front/registrations/registration.html +++ b/views/front/registrations/registration.html @@ -177,7 +177,14 @@
Email Address
-
+
+
+ {/literal} + {$fid = "glm_reg_customfields_reg_event_attendee_$regEventId"} + {apply_filters( 'glm-members-customfields-form-display', '', $fid )} + {literal} +
+
Address (show/hide)
-- 2.17.1