diff --git a/portal/admin/core/api/js/appfactory/afsextras.js b/portal/admin/core/api/js/appfactory/afsextras.js index 7c0f5d8e..eb8b7fa9 100644 --- a/portal/admin/core/api/js/appfactory/afsextras.js +++ b/portal/admin/core/api/js/appfactory/afsextras.js @@ -1542,7 +1542,19 @@ }); } // rrrrr - function SaveMailHandlers(category,item_ref,handlers,app,cb){ + function SaveMailHandlers(category,item_ref,handlers,app,cb,subscribers){ + for(let prop in handlers){ + let exist = false; + for (let n = 0; n < subscribers.length; n++) { + const element = subscribers[n]; + if(element.reference_num==handlers[prop].reference_num){ + exist = true; + break; + } + } + if(exist) continue; + subscribers.push(handlers[prop]); + } $.post(app.extra.url,{ save_mail_handlers: true, handlers: JSON.stringify(handlers), @@ -1550,7 +1562,7 @@ item_reference_num: item_ref },function(resp){ resp = JSON.parse(resp); - if(cb!=undefined) cb(resp); + if(cb!=undefined) cb(resp,subscribers); }); @@ -1651,6 +1663,7 @@ function GetThisDomainMemberSettings(tmpConfig,app){ let _domain = null; if(app.extra.root==undefined) app.extra.root = {}; + console.log(tmpConfig.root.member.json_data) for (let i = 0; i < tmpConfig.root.member.json_data.domains.length; i++) { const element = tmpConfig.root.member.json_data.domains[i]; if(element.domain_name==app.extra.config.managed_domain.Domain){ @@ -2421,31 +2434,60 @@ } + /** + * Transforms the mail_handler from a database object to a standered object + * @param {object} mail_handlers + * @returns + */ function StructureEmailHandlers(mail_handlers){ + + // check to see if mail_handlers is already formated + if(mail_handlers.length > 0){ + if(mail_handlers[0].json==undefined){ + return mail_handlers; + } + } var tmp_mail_handlers = {}; + let container = []; for (let n = 0; n < mail_handlers.length; n++) { const element = mail_handlers[n]; tmp_mail_handlers[element.json.reference_num] = element.json; tmp_mail_handlers[element.json.reference_num]["item_reference_num"] = element.item_reference_num; + container.push(tmp_mail_handlers[element.json.reference_num]); } - return tmp_mail_handlers; + return container; } - function SortEmailHandlersIntoItem(item_handlers,item){ - var mail_handler = {}; - for(element in item_handlers){ - if(item_handlers[element]["item_reference_num"] == item.json.reference_num){ - let refnum = item_handlers[element].reference_num; - mail_handler[refnum] = item_handlers[element]; + function SortEmailHandlersIntoItem(item_handlers,reference_num){ + var mail_handler = {}; + for (let i = 0; i < item_handlers.length; i++) { + // console.log(item_handlers[i]) + if(item_handlers[i]["item_reference_num"]=="") continue; + if(item_handlers[i]["item_reference_num"] == reference_num){ + let refnum = item_handlers[i]["reference_num"]; + mail_handler[refnum] = item_handlers[i]; } } return mail_handler; } - function InitializeEmailCreatorDashboard2(handlers,cbMain,cbSave,cbExit,app,append_container){ + function InitializeEmailCreatorDashboard2(handlers,cbMain,cbSave,cbExit,app,append_container,item_reference_num=null){ let handlersInstance = new EmailHandlerManager(handlers,app); let emailContainer = null; // console.log(handlersInstance.handlers); + + function MySave(cbSave,emailContainer,handlersInstance,item_reference_num,app,cb){ + if(emailContainer==null){ + cbSave(null, handlersInstance.handlers); + }else{ + + handlersInstance.handlers[handlersInstance.current.ref_group][emailContainer.email.reference_num] = emailContainer.email; + handlersInstance.handlers[handlersInstance.current.ref_group][emailContainer.email.reference_num].item_reference_num = item_reference_num; + cbSave(emailContainer.email, handlersInstance.handlers); + } + } + + function _init_category(app){ AFSSpinner.showFullScreen(false); function setupListHandlers(app){ @@ -2586,16 +2628,17 @@ let reference_num = "v"+app.utils.randomGenerator(12).toLowerCase(); handler.reference_num = reference_num; handler.name = value; - // 77777 - let ref_num = handlersInstance.current.ref_group; + handlersInstance.handlers[handlersInstance.current.ref_group].item_reference_num = item_reference_num; + // 77777 rrrrr handlersInstance.addHandler(reference_num, handler); setupListHandlers(app); $("#new_template_name_input").val(""); - cbSave(handler, handlersInstance.handlers); + // TODO_1: EmailBuilder - Because emailContainer do not save + MySave(cbSave,null,handlersInstance,item_reference_num,app,function(){}); RemoveModal(modal); AFSSpinner.showFullScreen(false); - console.log(handler); + // console.log(handler); // console.log(handlersInstance.current); @@ -2689,8 +2732,10 @@ var optionSelected = $("option:selected", this); var valueSelected = this.value; emailContainer.email.from = valueSelected; - handlersInstance.handlers[emailContainer.email.reference_num] = emailContainer.email; - cbSave(emailContainer.email, handlersInstance.handlers); + // TODO_3: EmailBuilder - reference by first objectb because it should only be one object + // handlersInstance.handlers[emailContainer.email.reference_num] = emailContainer.email; + // cbSave(emailContainer.email, handlersInstance.handlers); + MySave(cbSave,emailContainer,handlersInstance,item_reference_num,app,function(){}); }); $("#delivery_from_email_select").val(emailContainer.email.from); @@ -2726,7 +2771,8 @@ $("#emailbuilder_active_checkbox_id").prop('checked', emailContainer.email.active); $("#emailbuilder_active_checkbox_id").on("change",function(e){ saveCheckboxActive(app); - cbSave(emailContainer.email,handlersInstance.handlers); + // cbSave(emailContainer.email,handlersInstance.handlers); + MySave(cbSave,emailContainer,handlersInstance,item_reference_num,app,function(){}); }); // $("#delivery_from_email_select").on("change",function(e){ @@ -2815,23 +2861,21 @@ emailContainer.email.variables.schema[n].value = $(editor.getContent()).text().trim(); } - console.log(emailContainer.email.variables.schema); + // console.log(emailContainer.email.variables.schema); break; } } let ref_num = handlersInstance.current.ref_group; - console.log(ref_num); + // console.log(ref_num); emailContainer.email.name = $("#emailbuilder_name_input_id").val().trim(); handlersInstance.addHandler(emailContainer.email.reference_num, emailContainer.email); - - console.log(emailContainer.email); - console.log(handlersInstance.handlers); saveCheckboxAlert(app); saveCheckboxActive(app); $("#save_badge_indicator_id").css("display","none"); - cbSave(emailContainer.email, handlersInstance.handlers); + // cbSave(emailContainer.email, handlersInstance.handlers); + MySave(cbSave,emailContainer,handlersInstance,item_reference_num,app,function(){}); }); $("#options_delete_emailbuilder_id").on("click",function(e){ e.preventDefault(); @@ -2843,12 +2887,10 @@ e.preventDefault(); MySpinnerOn(function(MySpinnerOff){ - console.log(handlersInstance); - console.log(handlersInstance.current.ref_group); - console.log(emailContainer.email.reference_num); delete handlersInstance.handlers[handlersInstance.current.ref_group]["handlers"][emailContainer.email.reference_num]; - cbSave(emailContainer.email, handlersInstance.handlers); + // cbSave(emailContainer.email, handlersInstance.handlers); + MySave(cbSave,emailContainer, handlersInstance,item_reference_num,app,function(){}); setTimeout(() => { setTimeout(() => { MySpinnerOff(); },1000); RemoveModal(modal); @@ -2905,8 +2947,9 @@ emailContainer.email.variables.schema[index]["value"] = $(editor.getContent()).text().trim(); } - handlersInstance.handlers[emailContainer.email.reference_num] = emailContainer.email; - cbSave(emailContainer.email, handlersInstance.handlers); + // handlersInstance.handlers[emailContainer.email.reference_num] = emailContainer.email; + // cbSave(emailContainer.email, handlersInstance.handlers); + MySave(cbSave,emailContainer, handlersInstance,item_reference_num,app,function(){}); $("#save_badge_indicator_id").css("display","none"); } } @@ -3293,11 +3336,14 @@ emailContainer.email.body_mjml_html = decodedString; //editor.getHtml(); // 77777 - // console.log(emailContainer.email); - // console.log({html: decodedString}); - handlersInstance.addHandler(emailContainer.email.reference_num, emailContainer.email); - handlersInstance.handlers[emailContainer.email.reference_num] = emailContainer.email; - cbSave(emailContainer.email, handlersInstance.handlers); + + + // handlersInstance.addHandler(emailContainer.email.reference_num, emailContainer.email); + // handlersInstance.handlers[emailContainer.email.reference_num] = emailContainer.email; + // cbSave(emailContainer.email, handlersInstance.handlers); + console.log(emailContainer); + console.log(handlersInstance); + MySave(cbSave,emailContainer,handlersInstance,item_reference_num,app,function(){}); }); },500); diff --git a/portal/admin/core/api/js/appfactory/afsform.js b/portal/admin/core/api/js/appfactory/afsform.js index 445599fc..fe8c2ba5 100644 --- a/portal/admin/core/api/js/appfactory/afsform.js +++ b/portal/admin/core/api/js/appfactory/afsform.js @@ -87,15 +87,15 @@ class AFSSurveyJSForm { // TODO_1: go through all the handlers, this only selects the firs one let mail_handler_prop = ""; - for(let prop1 in mail_handlers){ - for(let prop in mail_handlers[prop1].handlers){ - mail_handler_prop = prop; - break; // this does not need to break - } - mail_handlers = mail_handlers[prop1].handlers[mail_handler_prop]; - break; // only one should have been sent, so breaking is not required - } - console.log(mail_handlers); + // for(let prop1 in mail_handlers){ + // for(let prop in mail_handlers[prop1].handlers){ + // mail_handler_prop = prop; + // break; // this does not need to break + // } + // mail_handlers = mail_handlers[prop1].handlers[mail_handler_prop]; + // break; // only one should have been sent, so breaking is not required + // } + // console.log(mail_handlers); self.survey.onComplete.add(function(survey,options){ @@ -111,11 +111,43 @@ class AFSSurveyJSForm { onStartCompleteCB(formSubmittion,form,survey); if(postData){ - if(mail_handlers!=undefined && mail_handlers!=null){ - let email = self.__getVariable("email", mail_handlers.variables.client); - mail_handlers.emails = [email]; - }else{ - mail_handlers = {"__empty":true}; + // if(mail_handlers!=undefined && mail_handlers!=null){ + // let email = self.__getVariable("email", mail_handlers.variables.client); + // mail_handlers.emails = [email]; + // }else{ + // mail_handlers = {"__empty":true}; + // } + + let client_variables = []; + client_variables.push({ + "name": "form_name", + "value": form.name, + }) + let response_email = null; + for (let v = 0; v < formSubmittion.length; v++) { + const element = formSubmittion[v]; + // console.log(element); + if(element.form.name==undefined){continue;} + if(typeof element.answer !== 'string'){continue;} + if(element.form.name=="email"){ + response_email = element.answer; + } + client_variables.push({ + "name": element.form.name, + "value": element.answer, + }) + } + + + + if(response_email!=null){ + for(let prop1 in mail_handlers){ + for(let prop2 in mail_handlers[prop1].handlers){ + if(mail_handlers[prop1].handlers[prop2]['alert']==true) + continue; + mail_handlers[prop1].handlers[prop2]['emails'] = [response_email]; + } + } } let senddata = { @@ -124,8 +156,13 @@ class AFSSurveyJSForm { form_reference_num: form.json.reference_num, submission_json: JSON.stringify(formSubmittion), form_json: JSON.stringify(form), - mail_handlers: JSON.stringify(mail_handlers) + mail_handlers: JSON.stringify(mail_handlers), + client_variables: JSON.stringify([client_variables]) } + + console.log(form); + console.log(client_variables); + console.log(formSubmittion); $.post(url, senddata, function(resp){ // console.log(JSON.parse(resp)); onPostCompleteCB(formSubmittion,form,survey); diff --git a/portal/admin/core/api/js/appfactory/appfactory3.js b/portal/admin/core/api/js/appfactory/appfactory3.js index cc7858ac..34477bae 100644 --- a/portal/admin/core/api/js/appfactory/appfactory3.js +++ b/portal/admin/core/api/js/appfactory/appfactory3.js @@ -5,7 +5,7 @@ var Flags = Object.freeze({ Component: "comp", Method: "meth" -}); +}); (function(factory) { // Establish the root object, `window` (`self`) in the browser, or `global` on the server. @@ -269,6 +269,8 @@ function RUN(root,$,b,_,bootstrap){ this._props_._root_element_component = element; }, + + // ddddd /** * Register a method to be called later with in the app */ @@ -606,7 +608,8 @@ ComponentManager.prototype = {}; - }// 33333 + } + // ddddd ComponentFactory.prototype = { @@ -2291,6 +2294,7 @@ function ViewComponent2(opts,elements){ +// 33333 // xxxxxh function ViewComponent(opts){ gl_HandleAll(this,opts,'ViewComponent'); @@ -12002,7 +12006,7 @@ function _addAppElementToList(self){ var CONNECTED_COMPONENTS = []; -// 7676 50505 77777 xxxxx +// 7676 50505 77777 xxxxx // ddddd function ApplicationManager_start_runInterval(self){ let interval = setInterval(function(){ //var GL_COMPONENTS = self.getComponents(); diff --git a/portal/admin/core/api/js/default_schema.js b/portal/admin/core/api/js/default_schema.js index 711d03ff..50c7ef4a 100644 --- a/portal/admin/core/api/js/default_schema.js +++ b/portal/admin/core/api/js/default_schema.js @@ -2395,21 +2395,6 @@ GLOBAL_SETTINGS.SUBSCRIBER = [ "reference_abbr": "sub", "display_name": "News5", "description": "", - "catalogs_config": { - "subscriber_confirmation_email":{ - "on":false, - "email_response":{ - "title":"", - "body":"", - "subject":"", - "email":"", - "template":"_email_alert", - "from":"no-reply", - "image": "", - "footer":"" - }, - } - }, "short_description": "", "reference_num": "sub_239874234", "articles": [ @@ -2417,27 +2402,7 @@ GLOBAL_SETTINGS.SUBSCRIBER = [ "title":"My 1 Post", "reference_num":"sub_897345jgd", "type":"email", - "delivered":false, - "email_response":{ - "title":"", - "body":"", - "subject":"", - "email":"", - "template":"_email_alert", - "from":"no-reply", - "image": "", - "footer":"" - }, - "email_alert":{ - "title":"", - "body":"", - "subject":"", - "emails":[], - "template":"_email_alert", - "from":"no-reply", - "image": "", - "footer":"" - }, + "delivered":false } ], "subscribers":[] @@ -2450,15 +2415,12 @@ GLOBAL_SETTINGS.SUBSCRIBER_CATALOG = [ json: { "mysql_id":-1, "category":"subscriber_catalog", + "title": "", + "reference_num": "", "nameid":"default", "release_type": false, "description": "", - "short_description": "", - "mail_handlers": { - "email_response":{}, - "email_alert":{} - }, - "subscribers":[] + "short_description": "" } } ]; @@ -2468,11 +2430,7 @@ GLOBAL_SETTINGS.SUBSCRIBER_ARTICLES = [ json: { "category":"catalog_article", "delivery_type": "email", - "deliveries": [], - "mail_handlers": { - "email_delivery": {}, - "link_delivery": {} - } + "deliveries": [] } } ]; diff --git a/portal/admin/core/api/js/main.js b/portal/admin/core/api/js/main.js index 9a4bf173..7751c997 100644 --- a/portal/admin/core/api/js/main.js +++ b/portal/admin/core/api/js/main.js @@ -43,13 +43,13 @@ }, function(obj){ obj = JSON.parse(obj); - console.log(obj); + // console.log(obj); tmpConfig.root.member = obj.member; // tmpConfig.root.access = obj.results.access; tmpConfig.root.config = obj.config; tmpConfig.root.tenant = obj.tenant; - console.log(obj); + // console.log(obj); resolve(obj); }) }), @@ -207,7 +207,7 @@ app.extra.manager = new internalsdk.MemberManagementSystem(__PLAY_MODE__, tmpConfig.root.member, tmpConfig.root.config); - console.log(app.extra); + // console.log(app.extra); app.extra.config.html = app.extra.extras.ConvertHtmlTextToLanguage(app.extra.config.html); app.extra.config.email_builder = tmpConfig.config.email_builder; diff --git a/portal/admin/core/api/js/pages/index.js b/portal/admin/core/api/js/pages/index.js index 091e6906..f770c442 100644 --- a/portal/admin/core/api/js/pages/index.js +++ b/portal/admin/core/api/js/pages/index.js @@ -858,11 +858,11 @@ define([ // settings app.extra.views.subscriber.newSubView({ - id: "settings", + id: "catalog_settings", init: false, body: app.extra.config.html.subscriber_settings, listener: function(){ - imp_subscriber.init_settings(app); + imp_subscriber.init_catalog_settings(app); } }); // manage_email @@ -871,7 +871,7 @@ define([ init: false, body: app.extra.config.html.subscriber_email_container, listener: function(){ - imp_subscriber.init_email(app); + imp_subscriber.init_settings_email(app); } }); // article_editor diff --git a/portal/admin/core/api/js/pages/modules/imp_forms.js b/portal/admin/core/api/js/pages/modules/imp_forms.js index 9240b065..b944de89 100644 --- a/portal/admin/core/api/js/pages/modules/imp_forms.js +++ b/portal/admin/core/api/js/pages/modules/imp_forms.js @@ -89,7 +89,7 @@ function init_settings(app){ function init_settings_email(app){ _init_settings_email(app); } - + function init_submissions(app){ _init_submissions(app,this); @@ -253,6 +253,7 @@ function _init_form_submissions(app){ } } + function _init_init_submission(app,self){ $("#back_to_forms_init").on("click",function(e){ e.preventDefault(); @@ -306,7 +307,7 @@ function _init_init_submission(app,self){ } }else{ - // console.log(sub); + console.log(sub); if(typeof sub.answer === "string"){ if(sub.answer.includes("data:image")){ answer = ``; @@ -318,7 +319,8 @@ function _init_init_submission(app,self){ // console.log(sub.answer) for (let n = 0; n < sub.answer.length; n++) { const ans = sub.answer[n]; - + + console.log(ans); if(typeof ans === "object"){ // file if(ans.name!=undefined && ans.type!=undefined && ans.content!=undefined){ @@ -329,7 +331,7 @@ function _init_init_submission(app,self){ } }else{ - answer += `${ans.name}
`; + answer += `${ans}
`; } } }else if(typeof sub.answer === "object"){ @@ -341,10 +343,6 @@ function _init_init_submission(app,self){ } } - - - - let question_html = __make_label(sub.question,answer); html += question_html; @@ -2048,7 +2046,7 @@ function _init_settings(app,self){ } let form = app.extra.config.forms[app.extra.current.forms.form_index]; - let mail_handler = app.extra.extras.SortEmailHandlersIntoItem(app.extra.mail_handlers.forms, form); + let mail_handler = app.extra.extras.SortEmailHandlersIntoItem(app.extra.mail_handlers.forms, form.json.reference_num); // rrrrr $("#manage_email_construction_id").on("click",function(e){ @@ -2071,14 +2069,11 @@ function _init_settings_email(app){ AFSSpinner.showFullScreen(true); if(handlers!=undefined && handlers!=null){ let category = app.extra.config.configurations.forms[0].json.category; - app.extra.extras.SaveMailHandlers(category, form.json.reference_num, handlers, app, function(resp){ + app.extra.extras.SaveMailHandlers(category, form.json.reference_num, handlers, app, function(resp,subs){ AFSSpinner.showFullScreen(false); console.log(resp); - // console.log(app.extra.config.configurations.access[index]) - // app.extra.extras.SaveConfiguration(app.extra.config.configurations.access[index].json, app, function(resp){ - // console.log(resp); - // }); - }); + app.extra.mail_handlers.forms = subs; + },app.extra.mail_handlers.forms); } },function(emailobj){ // console.log(emailobj); diff --git a/portal/admin/core/api/js/pages/modules/imp_subscriber.js b/portal/admin/core/api/js/pages/modules/imp_subscriber.js index 5c9a5ced..f7030920 100644 --- a/portal/admin/core/api/js/pages/modules/imp_subscriber.js +++ b/portal/admin/core/api/js/pages/modules/imp_subscriber.js @@ -4,19 +4,36 @@ define([ function(bootstrap){ function init(app){ + if(app.extra.mail_handlers.subscribers==undefined){ + app.extra.mail_handlers.subscribers = []; + } + if(app.extra.subscribers==undefined){ + app.extra.subscribers = []; + } + + AFSSpinner.showFullScreen(true); setTimeout(() => { AFSSpinner.showFullScreen(false); },35000); app.extra.extras.RequestCatalogs(100,function(catalogs){ app.extra.extras.RequestDocuments(100,function(documents){ - if(app.extra.documents==undefined){ app.extra.documents = documents; } - if(app.extra.catalogs==undefined){ app.extra.catalogs = catalogs; } - app.extra.catalogs = app.extra.extras.UpdateConfigurationsObject( - app.extra.catalogs, - app.extra.config.configurations.subscriber_catalog[0].json, - app); + app.extra.extras.RequestMailHandlers(100,function(mail_handlers){ + if(app.extra.documents==undefined){ app.extra.documents = documents; } + if(app.extra.catalogs==undefined){ app.extra.catalogs = catalogs; } + app.extra.catalogs = app.extra.extras.UpdateConfigurationsObject( + app.extra.catalogs, + app.extra.config.configurations.subscriber_catalog[0].json, + app); - AFSSpinner.showFullScreen(false); - _init(app); + console.log(mail_handlers); + + app.extra.mail_handlers.subscribers = app.extra.extras.StructureEmailHandlers(mail_handlers); + console.log(app.extra.mail_handlers.subscribers) + + AFSSpinner.showFullScreen(false); + _init(app); + + + },app.extra.mail_handlers.subscribers, true, app, "subscriber_catalog"); },app.extra.documents,true,app); },app.extra.catalogs,true,app); } @@ -28,9 +45,7 @@ define([ let reference_num = app.extra.current.subscriber.catalog.reference_num; AFSSpinner.showFullScreen(true); setTimeout(() => { AFSSpinner.showFullScreen(false); },35000); - if(app.extra.subscribers==undefined){ - app.extra.subscribers = []; - } + if(app.extra.catalog_articles==undefined){ app.extra.catalog_articles = {}; } @@ -113,7 +128,7 @@ define([ e.preventDefault(); AFSSpinner.showFullScreen(true); setTimeout(() => {AFSSpinner.showFullScreen(false);},35000); - let display_name = $("#create_new_catalog_name").val(); + let display_name = $("#create_new_catalog_name").val().trim(); if(display_name==""){ alert("Please provide catalog name"); return; @@ -122,23 +137,24 @@ define([ [app.extra.config.configurations.subscriber_catalog[0]], app.extra.config.configurations.subscriber_catalog[0].json, app); - // ppppp + - console.log(newCatalogJson); + const ref_num = "v"+app.utils.numberId(4) + "-" + app.utils.numberId(4) + "-" + app.utils.numberId(4) + "-" + app.utils.numberId(4); + + newCatalogJson[0].title = display_name; + newCatalogJson[0].json.title = display_name; + newCatalogJson[0].json.reference_num = ref_num; let data = { "admin_subscriber_create_catalog": true, "title": display_name, - "reference_num": "c"+app.utils.numberId(12), + "reference_num": ref_num, "json": JSON.stringify(newCatalogJson[0].json), }; - // __append_catalogs_list(app); $("#create_new_catalog_name").val(""); $.post(app.extra.url, data, function(resp){ resp = JSON.parse(resp); - console.log(resp); app.extra.catalogs.push(resp); - // console.log(app.extra.catalogs); __append_catalogs_list(app); AFSSpinner.showFullScreen(false); modal.toggle(); @@ -161,16 +177,23 @@ define([ e.preventDefault(); modal.toggle(); }); - $("#catalogs_configure_btn").on("click",function(e){ - e.preventDefault(); - app.extra.views.subscriber.render("settings"); - }); + } + function init_settings_email(app){ + _init_settings_email(app); + } function init_mangage(app){ - _init_mangage(app); + app.extra.extras.RequestSubscribers(500,function(subscribers){ + console.log(subscribers); + app.extra.subscribers = app.extra.subscribers.concat(subscribers);; + _init_mangage(app); + },app.extra.subscribers , false, app); + + + } function init_article_editor2(app){ _init_article_editor2(app) @@ -178,14 +201,10 @@ define([ function init_configure_catalogs(app){ _init_configure_catalogs(app); } - function init_settings(app){ - _init_settings(app); - } - function init_email(app){ - _init_email(app); + function init_catalog_settings(app){ + _init_catalog_settings(app); } function init_manage_subscriber(app){ - StopEditorInterval(app); _init_manage_subscriber(app); } function init_article_editor(app){ @@ -196,7 +215,7 @@ define([ function _init_catalog_overview(app){ function isSubscriberActiveForCurrentCatalog(subscriber,app){ let isActive = false; - console.log(subscriber); + // console.log(subscriber); for (let v = 0; v < subscriber.json.catalogs.length; v++) { if(subscriber.json.catalogs[v].reference_num == app.extra.current.subscriber.catalog.reference_num){ isActive = subscriber.json.catalogs[v].active; @@ -243,7 +262,7 @@ define([ app.extra.current.subscriber.ids = ids; for (let m = 0; m < ids.length; m++) { const element = ids[m]; - console.log(app.extra.subscribers[ids[m].index]) + // console.log(app.extra.subscribers[ids[m].index]) $(`#${element.id}`).on("change",function(e){ let is_checked = document.getElementById(element.id).checked; for (let v = 0; v < app.extra.subscribers[ids[m].index].json.catalogs.length; v++) { @@ -263,7 +282,7 @@ define([ // console.log(app.extra.catalog_articles); $("#catalog_title").append(app.extra.current.subscriber.catalog.json.display_name); function __append_articles_list(app){ - // ppppp + let articles = app.extra.catalog_articles[app.extra.current.subscriber.catalog.reference_num]; //app.extra.current.subscriber.catalog.json.articles; let listHtml = ""; let ids = []; @@ -312,7 +331,7 @@ define([ e.preventDefault(); console.log(ids[i]); // modal_form_article_title_name_input - let newtitle = $("#modal_form_article_title_name_input").val(); + let newtitle = $("#modal_form_article_title_name_input").val().trim(); if(newtitle=="" || newtitle.length < 2) { alert("Cannot be empty or less to 2 characters"); return;} UpdateCatagoryArticle(app,ids[i].article_config.reference_num,{title: newtitle}); @@ -380,7 +399,7 @@ define([ $("#submit_new_article_name").on("click",function(e){ AFSSpinner.showFullScreen(true); e.preventDefault(); - let article_name = $("#article_name").val(); + let article_name = $("#article_name").val().trim(); if(article_name==""){ alert("Please enter an article name."); return; @@ -400,7 +419,7 @@ define([ __append_articles_list(app); setTimeout(() => { AFSSpinner.showFullScreen(false); },3000); - // ppppp + CreateArticle(newArticleConfig,app,function(article){ app.extra.catalog_articles[app.extra.current.subscriber.catalog.reference_num].push(article); __append_articles_list(app); @@ -475,14 +494,18 @@ define([ e.preventDefault(); app.extra.views.subscriber.render("manage_catalogs"); }); + $("#catalog_settings_btn").on("click",function(e){ + e.preventDefault(); + app.extra.views.subscriber.render("catalog_settings"); + }); $("#modal_update_category_btn").off("click"); $("#modal_update_category_btn").on("click",function(e){ e.preventDefault(); AFSSpinner.showFullScreen(true); - let _display_name = $("#update_new_catalog_name").val(); - let _short_desc = $("#update_new_catalog_short_description").val(); - let _description = $("#update_new_catalog_description").val(); + let _display_name = $("#update_new_catalog_name").val().trim(); + let _short_desc = $("#update_new_catalog_short_description").val().trim(); + let _description = $("#update_new_catalog_description").val().trim(); if(_display_name==""){ alert("Display name cannot be empty"); @@ -503,7 +526,73 @@ define([ }); SetupCatalogOverview(app); + // console.log(app.extra.current.subscriber); + } + function _init_catalog_settings(app){ + $("#back_to_init").on("click",function(e){ + e.preventDefault(); + app.extra.views.subscriber.render("catalog_overview"); + }); + + function CreateSubmissionVariables(app){ + let index = app.extra.current.forms.form_index; + let submission_variables = []; + for (let i = 0; i < app.extra.config.forms[index].json.form_data.pages.length; i++) { + const page = app.extra.config.forms[index].json.form_data.pages[i]; + for (let n = 0; n < page.elements.length; n++) { + const element = page.elements[n]; + submission_variables.push({ + name: element.name, + value: "" + }); + } + } + return submission_variables; + } + + let catalog = app.extra.catalogs[app.extra.current.subscriber.catalog_index]; + let mail_handler = app.extra.extras.SortEmailHandlersIntoItem(app.extra.mail_handlers.subscribers, catalog.json.reference_num); + + + // rrrrr + $("#email_manager").on("click",function(e){ + e.preventDefault(); + app.extra.current._emailbuilder.handler = mail_handler; + app.extra.views.subscriber.render("manage_email"); + }); + + + } + + function _init_settings_email(app){ + let catalog = app.extra.catalogs[app.extra.current.subscriber.catalog_index]; + // console.log(catalog); + app.extra.extras.InitializeEmailCreatorDashboard2(app.extra.current._emailbuilder.handler, + function(view){ + }, + function(handler,handlers){ + AFSSpinner.showFullScreen(true); + if(handlers!=undefined && handlers!=null){ + + // console.log(catalog); + app.extra.extras.SaveMailHandlers( + catalog.json.category, + catalog.json.reference_num, + handlers, app, function(resp,subs){ + AFSSpinner.showFullScreen(false); + app.extra.mail_handlers.subscribers = subs; + + },app.extra.mail_handlers.subscribers); + } + }, + function(emailobj){ + // console.log(emailobj); + app.extra.views.subscriber.render("catalog_settings"); + },app,"#email_manager_contaner",catalog.json.reference_num); + + } + @@ -511,13 +600,14 @@ define([ function _init_mangage(app){ goBack(app); + function _TableRowHtml(title,ref,id){ - return ` - - ${title} - Edit - - `; + return ` + + ${title} + Edit + + `; } function _TableHtml(content){ return ` @@ -543,12 +633,8 @@ define([ let ids = []; let table = ""; - // app.extra.config.configurations.subscriber[1].json.subscribers.push(app.extra.config.configurations.subscriber[0]); - // app.extra.config.configurations.subscriber[1].json.subscribers.push(app.extra.config.configurations.subscriber[0]); - // app.extra.config.configurations.subscriber[1].json.subscribers.push(app.extra.config.configurations.subscriber[0]); - // app.extra.config.configurations.subscriber[1].json.subscribers.push(app.extra.config.configurations.subscriber[0]); - // loop through each catalog's subscriber list + // console.log(app.extra.subscribers); for (let i = 0; i < app.extra.subscribers.length; i++) { const subscriber = app.extra.subscribers[i]; // CleanAndValidateSubscriberList(i,app); @@ -557,7 +643,7 @@ define([ table += _TableRowHtml(subscriber.email,"",id); } - console.log(table); + // console.log(table); $("#subscriber_list_container").empty(); $("#subscriber_list_container").append(_TableHtml(table)); @@ -571,86 +657,100 @@ define([ }); } + // ppppp $("#add_subscriber_btn").on("click",function(e){ e.preventDefault(); - let new_subscriber_email = $("#add_email_subscriber_input").val(); + let new_subscriber_email = $("#add_email_subscriber_input").val().trim(); if(new_subscriber_email==""){ - - return; + return; } - let sub = {name:"",email:new_subscriber_email,active:false}; - for (let n = 0; n < app.extra.config.configurations.subscriber.length; n++) { - app.extra.config.configurations.subscriber[n].json.subscribers.unshift(sub); - } - app.extra.current.subscriber.selected_subscriber = {obj:sub}; - app.extra.views.subscriber.render("manage_subscriber"); + let found = false; + for (let n = 0; n < app.extra.subscribers.length; n++) { + if(app.extra.subscribers[n].email==new_subscriber_email){ + + app.extra.current.subscriber.selected_subscriber = { + obj: app.extra.subscribers[n], + index: n + }; + const index = app.extra.current.subscriber.selected_subscriber.obj.index; + app.extra.subscribers[index] = app.extra.current.subscriber.selected_subscriber.obj; + app.extra.views.subscriber.render("manage_subscriber");requestAnimationFrame; + found = true; + break; + } + } + if(found) return; + + let s = new AFSSdk.AFSSubscriber(); + let newsub = s.initializeSubscriber(new_subscriber_email,"","").buildSubscriber(); + // console.log(newsub); + app.extra.subscribers.push(newsub); + app.extra.current.subscriber.selected_subscriber = { + obj:newsub, + index:(app.extra.subscribers.length-1) + }; + + $.post(app.extra.url,{ + "admin_subscriber_update_subscriber": true, + "subscriber": JSON.stringify(app.extra.current.subscriber.selected_subscriber.obj) + },function(resp){ + resp = JSON.parse(resp); + console.log(resp); + const index = app.extra.current.subscriber.selected_subscriber.obj.index; + app.extra.subscribers[index] = app.extra.current.subscriber.selected_subscriber.obj; + app.extra.views.subscriber.render("manage_subscriber"); + }); + }); } function _init_manage_subscriber(app){ - let selected_email = app.extra.current.subscriber.selected_subscriber.obj.email; - let obj = manage_build_sub(selected_email,app); - let ids = obj.ids; - let html = obj.html; - - $("#back_to_init").on("click",function(e){ - e.preventDefault(); - app.extra.views.subscriber.render("manage"); - }); - - $("#subscriber_container_data").empty(); - $("#subscriber_container_data").append(html); + let selected_email = app.extra.current.subscriber.selected_subscriber.obj.email; + let obj = manage_build_sub(selected_email,app); + let ids = obj.ids; + let html = obj.html; - $("#subscriber_main_header").text(selected_email); + console.log(app.extra.current.subscriber.selected_subscriber); - $("#update_subscriber_subscriptions").on("click",function(e){ - e.preventDefault(); - AFSSpinner.showFullScreen(true); - $("#update_subscriber_subscriptions").prop("disabled",true); - setTimeout(() => { - $("#update_subscriber_subscriptions").prop("disabled",false); - AFSSpinner.showFullScreen(false); - },25000); + $("#back_to_init").on("click",function(e){ + e.preventDefault(); + app.extra.views.subscriber.render("manage"); + }); - for (let n = 0; n < app.extra.config.configurations.subscriber.length; n++) { - const catalog = app.extra.config.configurations.subscriber[n].json; - for (let i = 0; i < ids.length; i++) { - const element = ids[i]; - if(element.obj.catalog_ref==catalog.reference_num){ - for (let v = 0; v < catalog.subscribers.length; v++) { - const sub = catalog.subscribers[v]; - if(sub.email==selected_email){ - let radioValue = $("input[id='"+element.id+"']:checked").val(); - if(radioValue!=undefined && radioValue=="on"){ - app.extra.config.configurations.subscriber[n].json.subscribers[v].active = true; - }else{ - app.extra.config.configurations.subscriber[n].json.subscribers[v].active = false; - } - console.log(app.extra.config.configurations.subscriber[n]); + $("#subscriber_container_data").empty(); + $("#subscriber_container_data").append(html); + $("#subscriber_main_header").text(selected_email); + + $("#update_subscriber_subscriptions").on("click",function(e){ + for (let i = 0; i < ids.length; i++) { + const element = ids[i]; + let radioValue = $("input[id='"+element.id+"']:checked").val(); + let ischecked = false; + if(radioValue!=undefined && radioValue=="on"){ + ischecked = true; } - } - } - } - } + console.log(app.extra.current.subscriber.selected_subscriber.obj); - for (let n = 0; n < app.extra.config.configurations.subscriber.length; n++) { - let senddata = { - configurations_update:true, - mysql_id: app.extra.config.configurations.subscriber[n].json.mysql_id, - data: JSON.stringify(app.extra.config.configurations.subscriber[n].json) - } - $.post(app.extra.url,senddata,function(resp){ - if(n==app.extra.config.configurations.subscriber.length-1){ - console.log(resp); - AFSSpinner.showFullScreen(false); - $("#update_subscriber_subscriptions").prop("disabled",true); - } - }); - } - }); + // console.log(element); + app.extra.current.subscriber.selected_subscriber.obj.json.catalogs[i] = { + reference_num: element.catalog.json.reference_num, + active: ischecked + }; + } + + $.post(app.extra.url,{ + "admin_subscriber_update_subscriber": true, + "subscriber": JSON.stringify(app.extra.current.subscriber.selected_subscriber.obj) + },function(resp){ + resp = JSON.parse(resp); + console.log(resp); + const index = app.extra.current.subscriber.selected_subscriber.obj.index; + app.extra.subscribers[index] = app.extra.current.subscriber.selected_subscriber.obj; + }); + }); } function _init_configure_catalogs(app){ @@ -675,7 +775,7 @@ define([ $("#from_email_select").val(app.extra.current.subscriber.article.data.email.from); $("#from_email_select").on("change",function(e){ // let typeValue = Number($("input[name='delivery_from_email_select']:checked").val()); - let email_from = $("#from_email_select").val(); + let email_from = $("#from_email_select").val().trim(); let cata = app.extra.current.subscriber.catalog.json; cata = app.extra.instances.subscriber.setGlobalConfig("from_email",email_from,cata); app.extra.current.subscriber.catalog.json = cata; @@ -755,72 +855,8 @@ define([ - } - function _init_settings(app){ - function CreateSubmissionVariables(app){ - let submission_variables = []; - // TODO_3: Events Submission variables - // for (let i = 0; i < app.extra.config.forms[index].json.form_data.pages.length; i++) { - // const page = app.extra.config.forms[index].json.form_data.pages[i]; - // for (let n = 0; n < page.elements.length; n++) { - // const element = page.elements[n]; - // submission_variables.push({ - // name: element.name, - // value: "" - // }); - // } - // } - return submission_variables; - } - $("#back_to_init").on("click",function(e){ - e.preventDefault(); - app.extra.views.subscriber.render("manage_catalogs"); - }); - - if(app.extra.config.configurations.subscriber[1].json.mail_handlers==undefined){ - app.extra.config.configurations.subscriber[1].json.mail_handlers = { - email_response: app.extra.config.configurations.mail_handler[0].json.handler, - email_alert: app.extra.config.configurations.mail_handler[0].json.handler - }; - } - - // app.extra.config.configurations.subscriber[1].json.mail_handlers.email_response.variables.schema[0] = - // app.extra.config.configurations.subscriber[1].json.mail_handlers.email_response.variables.schema[0][0]; - - - $("#edit_repsonse_content_id").on("click",function(e){ - e.preventDefault(); - let response = app.extra.config.configurations.subscriber[1].json.mail_handlers.email_response; - app.extra.current._emailbuilder.submission_variables = CreateSubmissionVariables(app); - app.extra.current._emailbuilder.type = "email_response"; - app.extra.current._emailbuilder.email = response; - app.extra.views.subscriber.render("manage_email"); - }); - $("#edit_alert_content_id").on("click",function(e){ - e.preventDefault(); - let alert = app.extra.config.configurations.subscriber[1].json.mail_handlers.email_alert; - app.extra.current._emailbuilder.submission_variables = CreateSubmissionVariables(app); - app.extra.current._emailbuilder.type = "email_alert"; - app.extra.current._emailbuilder.email = alert; - app.extra.views.subscriber.render("manage_email"); - }); - } - function _init_email(app){ - let email = app.extra.current._emailbuilder.email; - app.extra.extras.InitializeEmailCreatorDashboard(email,[],function(view){ - },function(emailobj){ - const key = app.extra.current._emailbuilder.type; - app.extra.config.configurations.subscriber[1].json.mail_handlers[key] = emailobj; - app.extra.extras.SaveConfiguration(app.extra.config.configurations.subscriber[1].json,app,function(){ - }); - },function(emailobj){ - app.extra.current._emailbuilder.type = null; - app.extra.current._emailbuilder.email = null; - app.extra.views.subscriber.render("settings"); - },app,"#email_manager_contaner"); - } function _init_article_editor2(app){ @@ -870,7 +906,7 @@ define([ $("#delivery_from_email_select").append(options_html); $("#delivery_from_email_select").on("change",function(e){ // let typeValue = Number($("input[name='delivery_from_email_select']:checked").val()); - let email_from = $("#delivery_from_email_select").val(); + let email_from = $("#delivery_from_email_select").val().trim(); app.extra.current.subscriber.article.data.email.from = email_from; }); } @@ -883,7 +919,7 @@ define([ $("#article_name").on("focusout",function(e){ // let typeValue = Number($("input[name='delivery_from_email_select']:checked").val()); - let email_subject = $("#article_name").val(); + let email_subject = $("#article_name").val().trim(); console.log(email_subject); app.extra.current.subscriber.article.data.email.subject = email_subject; }); @@ -1284,7 +1320,6 @@ define([ "value": subscriber.name }, { - // ppppp "name": "unsubscribe", "value": app.extra.config.managed_domain.Address + `/mod/sub/subprefs.php?reference_num=${subscriber.email}&email=${subscriber.email}` @@ -1630,7 +1665,6 @@ define([ }); } function CreateArticle(newArticleConfig,app,cb){ - // ppppp AFSSpinner.showFullScreen(true); setTimeout(() => {AFSSpinner.showFullScreen(false);},35000); let send = { @@ -1647,7 +1681,7 @@ define([ }); } function SaveArticle(article,app,cb){ - // ppppp + AFSSpinner.showFullScreen(true); setTimeout(() => {AFSSpinner.showFullScreen(false);},35000); let send = { @@ -1844,18 +1878,18 @@ define([ return catalog; } - } - function ListCreateLI(id,content){ - return ` -
  • - ${content} -
  • - `; - } - function ListCreateUL(id,content){ - return ``; - } - function TableRowHtml(title,ref,id){ + } + function ListCreateLI(id,content){ + return ` +
  • + ${content} +
  • + `; + } + function ListCreateUL(id,content){ + return ``; + } + function TableRowHtml(title,ref,id){ return ` ${title} @@ -1863,8 +1897,8 @@ define([ Edit `; - } - function TableHtml(content){ + } + function TableHtml(content){ return `
    @@ -1909,57 +1943,44 @@ define([
    `; } + // ppppp let ids = []; let subscribers_list = []; let items = ""; - for (let i = 0; i < app.extra.config.configurations.subscriber.length; i++) { - const catalog = app.extra.config.configurations.subscriber[i].json; - let found = false; - let inputid = "m"+app.utils.randomGenerator(12); - let checked = ""; - let _sub = null; - let duplicates = []; - for (let n = 0; n < catalog.subscribers.length; n++) { - const sub = catalog.subscribers[n]; - if(sub.email==selected_email){ - if(found){ - duplicates.push(n); - continue; - } - found = true; - sub.catalog_ref = catalog.reference_num; - sub.catalog_display_name = catalog.display_name; - let title = catalog.display_name; - subscribers_list.push(sub); - if(sub.active==true){ - checked = "checked"; - } - items += item_html(title,inputid,checked); - ids.push({id:inputid,obj:sub,index:n}); + let subscribers_catalogs = []; + const sub_catalogs = app.extra.current.subscriber.selected_subscriber.obj.json.catalogs; + for (let i = 0; i < app.extra.catalogs.length; i++) { + const catalog = app.extra.catalogs[i]; + let found = false; + let inputid = "m"+app.utils.randomGenerator(12); + let isChecked = false; + let checked = ""; + let current_sub = {}; + let title = catalog.title; + for (let n = 0; n < sub_catalogs.length; n++) { + const sub_catalog = sub_catalogs[n]; + if(catalog.json.reference_num==sub_catalog.reference_num){ + found = true; + current_sub = catalog; + } + if(catalog.json.reference_num==sub_catalog.reference_num && sub_catalog.active==true){ + isChecked = true; + checked = "checked"; + break; + } } - } - if(found==false){ - let sub = { - name:'', - email:selected_email, - active:false, - catalog_ref: catalog.reference_num, - catalog_display_name: catalog.display_name - }; - app.extra.config.configurations.subscriber[i].json.subscribers.push(sub); - items += item_html(catalog.display_name,inputid,checked); - ids.push({id:inputid,obj:sub,index:i}); - } - - // delete duplicate subscribers in 1 catalog - duplicates = duplicates.reverse(); - for (let x = 0; x < duplicates.length; x++) { - let index = duplicates[x]; - if(x!=0){ index = (duplicates[x]-1); } - app.extra.config.configurations.subscriber[i].json.subscribers.splice(index,1); - } + + items += item_html(title,inputid,checked); + ids.push({ + id:inputid, + catalog: catalog, + index:i + }); + + + } - + let html = items_html(items); return {ids,html}; } @@ -2105,9 +2126,9 @@ define([ init_manage:init_mangage, init_manage_subscriber:init_manage_subscriber, init_configure_catalogs:init_configure_catalogs, - init_settings:init_settings, - init_email:init_email, - init_article_editor2:init_article_editor2 + init_catalog_settings:init_catalog_settings, + init_article_editor2:init_article_editor2, + init_settings_email:init_settings_email } });// !!!END!!! diff --git a/portal/admin/core/api/js/schema_output.js b/portal/admin/core/api/js/schema_output.js index 1d998cfa..d884288d 100644 --- a/portal/admin/core/api/js/schema_output.js +++ b/portal/admin/core/api/js/schema_output.js @@ -27793,3 +27793,2632 @@ let stripe_webhook = { +let hello333 = "{"id":27916340,"user_id":55092412,"subdomain":"em9966","domain":"mail.cradle2careertx.org","username":"unified_acct_US917f30407a3cee5b8268a3e0f65f1dfe","ips":[],"custom_spf":false,"default":false,"legacy":false,"automatic_security":true,"valid":false,"dns":{"mail_cname":{"valid":false,"type":"cname","host":"em9966.mail.cradle2careertx.org","data":"u55092412.wl163.sendgrid.net"},"dkim1":{"valid":false,"type":"cname","host":"s1._domainkey.mail.cradle2careertx.org","data":"s1.domainkey.u55092412.wl163.sendgrid.net"},"dkim2":{"valid":false,"type":"cname","host":"s2._domainkey.mail.cradle2careertx.org","data":"s2.domainkey.u55092412.wl163.sendgrid.net"}}}" + + + + + + + + + + +let hgnpm = { + "reference_num": "form808965595437", + "name": "Become a Board Member", + "form_data": { + "completeText": "Submit", + "completedHtml": "Thank you for your submission. Someone from our staff will be in touch with you soon!", + "showPreviewBeforeComplete": "showAnsweredQuestions", + "pages": [ + { + "elements": [ + { + "type": "html", + "html": "\n\n
    \n

    \"A

    🌟 Join the Cradle2Career Board of Directors! 🌟

    At Cradle2Career, we're on a mission to close the socio-economic gap for teen parents by providing equitable services, resources, and support so they and their children can thrive. Through our Accelerated Parenting™ program, scholarships, counseling, and mentorship, we help young parents build bright futures and healthy families. We're inviting passionate, purpose-driven leaders to join our Board of Directors to help shape the future of Cradle2Career. Together, we can expand our impact across Houston and beyond.

    " + }, + { + "name": "fullname", + "title": "What is your first and last name?", + "type": "text", + "isRequired": true + }, + { + "name": "email", + "title": "What is your email address?", + "type": "text", + "isRequired": true + }, + + { + "type": "checkbox", + "name": "board_positions", + "title": "Select all board positions you are interested in:", + "description": "💼 Open Board Roles We’re seeking individuals with experience, influence, or passion in the following areas:", + "choices": [ + "Vice Chair / Vice President", + "Treasurer", + "Secretary", + "Fundraising& Development", + "Program & Education Strategy", + "Community Engagement & Partnerships", + "Marketing & Communications", + "Finance & Audit", + "Advocacy & Policy", + "Director-at-Large (Special Initiatives)" + ], + "isRequired": true, + "colCount": 1, + "showSelectAllItem": true, + "separateSpecialChoices": true + }, + + + { + "name": "phonenumber", + "title": "What is your phone number?", + "type": "text", + "isRequired": true + }, + { + "name": "brief_description", + "title": "Briefly describe why you would like to join our Board of Directors:", + "type": "text" + }, + { + "type": "multipletext", + "name": "current_aff", + "title": "Your current organizational affiliations (names of the organization and your role(s), please include any current boards you serve on):", + "items": [ + { + "name": "1", + "inputType": "string" + }, + { + "name": "2", + "inputType": "string" + }, + { + "name": "3", + "inputType": "string" + }, + { + "name": "4", + "inputType": "string" + }, + { + "name": "5", + "inputType": "string" + } + ] + }, + { + "type": "checkbox", + "name": "skills", + "title": "Which of your skills would you like to utilize on the Board? Check those that apply:", + "description": "", + "choices": [ + "Board development", + "Strategic planning", + "Staffing / HR", + "Program development", + "Financial management", + "Fundraising", + "Evaluation", + "Community networking", + "Training", + "Marketing", + "Volunteer management", + "Facilities management" + ], + "isRequired": true, + "colCount": 2, + "showNoneItem": true, + "showOtherItem": true, + "showSelectAllItem": true, + "separateSpecialChoices": true + }, + { + "name": "other_skills", + "title": "Other skill(s) of yours that you would like to utilize", + "type": "text" + }, + { + "name": "other_types", + "title": "What would you like to get for yourself out of your participation on the Board, e.g., what types of experiences, skills to develop, interests to cultivate for you, etc.?", + "type": "text" + }, + { + "type": "boolean", + "name": "if_join", + "label": "If you join the Board, you agree that you can provide at least 2-4 hours a month in attendance to Board and Committee meetings, and that you do not have any conflict-of-interest in participating on the Board.", + "valueTrue": "Yes", + "valueFalse": "No", + "renderAs": "radio" + }, + { + "type": "boolean", + "name": "if_not_selected", + "label": "If you are not selected as a member of the Board, or if you decide not to join, would you like to be a volunteer to assist our organization in various ways that match your skills and interests?", + "valueTrue": "Yes", + "valueFalse": "No", + "renderAs": "radio" + }, + { + "type": "file", + "title": "Please upload your files", + "name": "files", + "storeDataAsText": false, + "waitForUpload": true, + "allowMultiple": true, + "maxSize": 102400, + "hideNumber": true + }, + { + "type": "signaturepad", + "name": "signature", + "title": "Please sign here", + "isRequired": true, + "signatureWidth": 600 + }, + { + "type": "boolean", + "name": "agreement", + "title": "I consent to be sent communications regarding my Board application", + "defaultValue": "false", + "renderAs": "checkbox", + "validators": [ + { + "type": "expression", + "text": "Please confirm consent", + "expression": "{agreement} = true" + } + ], + "titleLocation": "left", + "label": "", + "showTitle": true + } + ] + } + ] + }, + "form_style": { + "backgroundImage": "", + "backgroundImageFit": "cover", + "backgroundImageAttachment": "scroll", + "backgroundOpacity": 1, + "themeName": "default", + "isPanelless": true, + "colorPalette": "light", + "cssVariables": { + "--sjs-general-backcolor": "rgba(255, 255, 255, 1)", + "--sjs-general-backcolor-dark": "rgba(248, 248, 248, 1)", + "--sjs-general-backcolor-dim": "rgba(255, 255, 255, 1)", + "--sjs-general-backcolor-dim-light": "rgba(249, 249, 249, 1)", + "--sjs-general-backcolor-dim-dark": "rgba(243, 243, 243, 1)", + "--sjs-general-forecolor": "rgba(0, 0, 0, 0.91)", + "--sjs-general-forecolor-light": "rgba(0, 0, 0, 0.45)", + "--sjs-general-dim-forecolor": "rgba(0, 0, 0, 0.91)", + "--sjs-general-dim-forecolor-light": "rgba(0, 0, 0, 0.45)", + "--sjs-primary-backcolor": "rgba(0, 176, 82, 1)", + "--sjs-primary-backcolor-light": "rgba(0, 176, 82, 0.1)", + "--sjs-primary-backcolor-dark": "rgba(0, 161, 75, 1)", + "--sjs-primary-forecolor": "rgba(255, 255, 255, 1)", + "--sjs-primary-forecolor-light": "rgba(255, 255, 255, 0.25)", + "--sjs-base-unit": "8px", + "--sjs-corner-radius": "4px", + "--sjs-secondary-backcolor": "rgba(255, 152, 20, 1)", + "--sjs-secondary-backcolor-light": "rgba(255, 152, 20, 0.1)", + "--sjs-secondary-backcolor-semi-light": "rgba(255, 152, 20, 0.25)", + "--sjs-secondary-forecolor": "rgba(255, 255, 255, 1)", + "--sjs-secondary-forecolor-light": "rgba(255, 255, 255, 0.25)", + "--sjs-shadow-small": "0px 1px 2px 0px rgba(0, 0, 0, 0.15)", + "--sjs-shadow-small-reset": "0px 0px 0px 0px rgba(0, 0, 0, 0.15)", + "--sjs-shadow-medium": "0px 2px 6px 0px rgba(0, 0, 0, 0.1)", + "--sjs-shadow-large": "0px 8px 16px 0px rgba(0, 0, 0, 0.1)", + "--sjs-shadow-inner": "inset 0px 1px 2px 0px rgba(0, 0, 0, 0.15)", + "--sjs-shadow-inner-reset": "inset 0px 0px 0px 0px rgba(0, 0, 0, 0.15)", + "--sjs-border-light": "rgba(0, 0, 0, 0.09)", + "--sjs-border-default": "rgba(0, 0, 0, 0.16)", + "--sjs-border-inside": "rgba(0, 0, 0, 0.16)", + "--sjs-special-red": "rgba(229, 10, 62, 1)", + "--sjs-special-red-light": "rgba(229, 10, 62, 0.1)", + "--sjs-special-red-forecolor": "rgba(255, 255, 255, 1)", + "--sjs-special-green": "rgba(25, 179, 148, 1)", + "--sjs-special-green-light": "rgba(25, 179, 148, 0.1)", + "--sjs-special-green-forecolor": "rgba(255, 255, 255, 1)", + "--sjs-special-blue": "rgba(67, 127, 217, 1)", + "--sjs-special-blue-light": "rgba(67, 127, 217, 0.1)", + "--sjs-special-blue-forecolor": "rgba(255, 255, 255, 1)", + "--sjs-special-yellow": "rgba(255, 152, 20, 1)", + "--sjs-special-yellow-light": "rgba(255, 152, 20, 0.1)", + "--sjs-special-yellow-forecolor": "rgba(255, 255, 255, 1)", + "--sjs-article-font-xx-large-textDecoration": "none", + "--sjs-article-font-xx-large-fontWeight": "700", + "--sjs-article-font-xx-large-fontStyle": "normal", + "--sjs-article-font-xx-large-fontStretch": "normal", + "--sjs-article-font-xx-large-letterSpacing": "0", + "--sjs-article-font-xx-large-lineHeight": "64px", + "--sjs-article-font-xx-large-paragraphIndent": "0px", + "--sjs-article-font-xx-large-textCase": "none", + "--sjs-article-font-x-large-textDecoration": "none", + "--sjs-article-font-x-large-fontWeight": "700", + "--sjs-article-font-x-large-fontStyle": "normal", + "--sjs-article-font-x-large-fontStretch": "normal", + "--sjs-article-font-x-large-letterSpacing": "0", + "--sjs-article-font-x-large-lineHeight": "56px", + "--sjs-article-font-x-large-paragraphIndent": "0px", + "--sjs-article-font-x-large-textCase": "none", + "--sjs-article-font-large-textDecoration": "none", + "--sjs-article-font-large-fontWeight": "700", + "--sjs-article-font-large-fontStyle": "normal", + "--sjs-article-font-large-fontStretch": "normal", + "--sjs-article-font-large-letterSpacing": "0", + "--sjs-article-font-large-lineHeight": "40px", + "--sjs-article-font-large-paragraphIndent": "0px", + "--sjs-article-font-large-textCase": "none", + "--sjs-article-font-medium-textDecoration": "none", + "--sjs-article-font-medium-fontWeight": "700", + "--sjs-article-font-medium-fontStyle": "normal", + "--sjs-article-font-medium-fontStretch": "normal", + "--sjs-article-font-medium-letterSpacing": "0", + "--sjs-article-font-medium-lineHeight": "32px", + "--sjs-article-font-medium-paragraphIndent": "0px", + "--sjs-article-font-medium-textCase": "none", + "--sjs-article-font-default-textDecoration": "none", + "--sjs-article-font-default-fontWeight": "400", + "--sjs-article-font-default-fontStyle": "normal", + "--sjs-article-font-default-fontStretch": "normal", + "--sjs-article-font-default-letterSpacing": "0", + "--sjs-article-font-default-lineHeight": "28px", + "--sjs-article-font-default-paragraphIndent": "0px", + "--sjs-article-font-default-textCase": "none" + } + } +} + + + + +let handler101 = { + "forms": { + "v2858-5623-0515-9785": { + "reference_num": "v2858-5623-0515-9785", + "name": "main", + "handlers": { + "vaidrvkwnfuei": { + "active": true, + "integration": [], + "alert": false, + "emails": [], + "from": "no-reply", + "title": "", + "subject": "", + "body": "", + "body_mjml_projectData": "", + "body_mjml_html": "", + "template": "", + "variables": { + "schema": [ + { + "name": "content", + "value": "" + } + ], + "client": [ + { + "name": "", + "value": "" + } + ], + "system": [ + { + "name": "", + "value": "" + } + ] + }, + "reference_num": "vaidrvkwnfuei", + "name": "response" + } + }, + "item_reference_num": "form909178091471" + }, + "v5415-8530-6502-8229": { + "reference_num": "v5415-8530-6502-8229", + "name": "main", + "handlers": { + "vwu8cbekbcnnj": { + "active": true, + "integration": [], + "alert": false, + "emails": [], + "from": "no-reply", + "title": "", + "subject": "", + "body": "", + "body_mjml_projectData": "", + "body_mjml_html": "", + "template": "", + "variables": { + "schema": [ + { + "name": "content", + "value": "" + } + ], + "client": [ + { + "name": "", + "value": "" + } + ], + "system": [ + { + "name": "", + "value": "" + } + ] + }, + "reference_num": "vwu8cbekbcnnj", + "name": "response" + } + }, + "item_reference_num": "form528150024783" + }, + "v9685-5735-1682-1043": { + "reference_num": "v9685-5735-1682-1043", + "name": "main", + "handlers": { + "v6torgxnyj0hs": { + "active": true, + "integration": [], + "alert": false, + "emails": [], + "from": "no-reply", + "title": "", + "subject": "Cradle2Career Response Received", + "body": "", + "body_mjml_projectData": { + "dataSources": [], + "assets": [ + { + "type": "image", + "src": "https://api.cradle2careertx.org/v1/data/downloads?getdoc=true&ref=doc558908667843&name=dXTbvmzT9X8St.png&content_type=image/png", + "unitDim": "px", + "height": 0, + "width": 0, + "name": "c2c_bug_pos_RGB.png", + "document": { + "id": 1, + "category": "documents", + "reference_num": "doc558908667843", + "original_name": "c2c_bug_pos_RGB.png", + "generated_name": "dXTbvmzT9X8St.png", + "file_size": "16797", + "file_type": "image/png", + "upload_date": "10/8/2025, 6:12:46 AM", + "directory": "/mnt/node1/cradle2careertxorg/modules/documents", + "url": "https://api.cradle2careertx.org/v1/data/downloads?getdoc=true&ref=doc558908667843&name=dXTbvmzT9X8St.png&content_type=image/png", + "jsontext": null, + "date": "2025-10-08 11:12:46", + "url2": "https://xrn93ngyz2tefjrx96grfksw.sites.appfactory.studio/portal/admin/core/api/php/request.php?getdoc=true&ref=doc558908667843&name=dXTbvmzT9X8St.png&content_type=image/png" + } + }, + { + "type": "image", + "src": "https://api.cradle2careertx.org/v1/data/downloads?getdoc=true&ref=doc746624651312&name=d3BihfXZ5aVGZ.png&content_type=image/png", + "unitDim": "px", + "height": 0, + "width": 0, + "name": "c2c_hrz-bg_pos_RGB.png", + "document": { + "original_name": "c2c_hrz-bg_pos_RGB.png", + "generated_name": "d3BihfXZ5aVGZ.png", + "file_size": 45872, + "file_type": "image/png", + "upload_date": "10/8/2025, 8:20:20 AM", + "directory": "/mnt/node1/cradle2careertxorg/modules/documents", + "url": "https://api.cradle2careertx.org/v1/data/downloads?getdoc=true&ref=doc746624651312&name=d3BihfXZ5aVGZ.png&content_type=image/png", + "url2": "https://xrn93ngyz2tefjrx96grfksw.sites.appfactory.studio/portal/admin/core/api/php/request.php?getdoc=true&ref=doc746624651312&name=d3BihfXZ5aVGZ.png&content_type=image/png", + "reference_num": "doc746624651312", + "catagory": "documents", + "json": { + "data": null + } + } + } + ], + "styles": [ + { + "selectors": [], + "selectorsAdd": "#outlook a", + "style": { + "padding-top": "0px", + "padding-right": "0px", + "padding-bottom": "0px", + "padding-left": "0px" + } + }, + { + "selectors": [], + "selectorsAdd": "body", + "style": { + "margin-top": "0px", + "margin-right": "0px", + "margin-bottom": "0px", + "margin-left": "0px", + "padding-top": "0px", + "padding-right": "0px", + "padding-bottom": "0px", + "padding-left": "0px", + "text-size-adjust": "100%" + } + }, + { + "selectors": [], + "selectorsAdd": "table, td", + "style": { + "border-collapse": "collapse" + } + }, + { + "selectors": [], + "selectorsAdd": "img", + "style": { + "border-top-width": "0px", + "border-right-width": "0px", + "border-bottom-width": "0px", + "border-left-width": "0px", + "border-top-style": "initial", + "border-right-style": "initial", + "border-bottom-style": "initial", + "border-left-style": "initial", + "border-top-color": "initial", + "border-right-color": "initial", + "border-bottom-color": "initial", + "border-left-color": "initial", + "border-image-source": "initial", + "border-image-slice": "initial", + "border-image-width": "initial", + "border-image-outset": "initial", + "border-image-repeat": "initial", + "height": "auto", + "line-height": "100%", + "outline-color": "initial", + "outline-style": "none", + "outline-width": "initial", + "text-decoration-line": "none", + "text-decoration-thickness": "initial", + "text-decoration-style": "initial", + "text-decoration-color": "initial" + } + }, + { + "selectors": [], + "selectorsAdd": "p", + "style": { + "display": "block", + "margin-top": "13px", + "margin-right": "0px", + "margin-bottom": "13px", + "margin-left": "0px" + } + }, + { + "selectors": [ + "mj-column-per-100" + ], + "style": { + "width": "100% !important", + "max-width": "100%" + }, + "mediaText": "only screen and (min-width: 480px)", + "atRuleType": "media" + }, + { + "selectors": [], + "selectorsAdd": ".moz-text-html .mj-column-per-100", + "style": { + "width": "100% !important", + "max-width": "100%" + } + } + ], + "pages": [ + { + "frames": [ + { + "component": { + "type": "wrapper", + "stylable": [ + "background", + "background-color", + "background-image", + "background-repeat", + "background-attachment", + "background-position", + "background-size" + ], + "components": [ + { + "tagName": "mjml", + "type": "mjml", + "style": { + "owa": "desktop", + "version": "4.3.0", + "style": "owa:desktop;version:4.3.0;" + }, + "attributes": { + "owa": "desktop", + "version": "4.3.0", + "style": "owa:desktop;version:4.3.0;style:owa:desktop;version:4.3.0;;" + }, + "components": [ + { + "tagName": "mj-head", + "type": "mj-head", + "components": [ + { + "tagName": "mj-font", + "type": "mj-font", + "style": { + "href": "https://fonts.googleapis.com/css?family=Montserrat", + "name": "Montserrat", + "style": "href:https://fonts.googleapis.com/css?family=Montserrat;name:Montserrat;" + }, + "attributes": { + "href": "https://fonts.googleapis.com/css?family=Montserrat", + "name": "Montserrat", + "style": "href:https://fonts.googleapis.com/css?family=Montserrat;name:Montserrat;style:href:https://fonts.googleapis.com/css?family=Montserrat;name:Montserrat;;" + } + }, + { + "tagName": "mj-font", + "type": "mj-font", + "style": { + "href": "https://fonts.googleapis.com/css?family=Raleway", + "name": "Raleway", + "style": "href:https://fonts.googleapis.com/css?family=Raleway;name:Raleway;" + }, + "attributes": { + "href": "https://fonts.googleapis.com/css?family=Raleway", + "name": "Raleway", + "style": "href:https://fonts.googleapis.com/css?family=Raleway;name:Raleway;style:href:https://fonts.googleapis.com/css?family=Raleway;name:Raleway;;" + } + }, + { + "tagName": "mj-font", + "type": "mj-font", + "style": { + "href": "https://fonts.googleapis.com/css?family=Open Sans", + "name": "Open Sans", + "style": "href:https://fonts.googleapis.com/css?family=Open Sans;name:Open Sans;" + }, + "attributes": { + "href": "https://fonts.googleapis.com/css?family=Open Sans", + "name": "Open Sans", + "style": "href:https://fonts.googleapis.com/css?family=Open Sans;name:Open Sans;style:href:https://fonts.googleapis.com/css?family=Open Sans;name:Open Sans;;" + } + }, + { + "tagName": "mj-preview" + } + ] + }, + { + "tagName": "mj-body", + "type": "mj-body", + "style": { + "background-color": "#f8f8f8", + "color": "#797e82", + "font-family": "Open Sans, Helvetica, Arial, sans-serif", + "width": "600px", + "style": "background-color:#f8f8f8;color:#797e82;font-family:Open Sans, Helvetica, Arial, sans-serif;width:600px;" + }, + "attributes": { + "background-color": "#f8f8f8", + "color": "#797e82", + "font-family": "Open Sans, Helvetica, Arial, sans-serif", + "width": "600px", + "style": "background-color:#f8f8f8;color:#797e82;font-family:Open Sans, Helvetica, Arial, sans-serif;width:600px;style:background-color:#f8f8f8;color:#797e82;font-family:Open Sans, Helvetica, Arial, sans-serif;width:600px;;" + }, + "components": [ + { + "tagName": "mj-section", + "type": "mj-section", + "style": { + "background-repeat": "repeat", + "background-size": "auto", + "padding-bottom": "0px", + "padding-top": "0px", + "padding": "20px 0px 20px 0px", + "vertical-align": "top", + "padding-left": "0px", + "padding-right": "0px", + "text-align": "center", + "style": "background-repeat:repeat;background-size:auto;padding-bottom:0px;padding-top:0px;padding:20px 0px 20px 0px;vertical-align:top;padding-left:0px;padding-right:0px;text-align:center;" + }, + "attributes": { + "background-repeat": "repeat", + "background-size": "auto", + "padding-bottom": "0px", + "padding-top": "0px", + "padding": "20px 0px 20px 0px", + "vertical-align": "top", + "padding-left": "0px", + "padding-right": "0px", + "text-align": "center", + "style": "background-repeat:repeat;background-size:auto;padding-bottom:0px;padding-top:0px;padding:20px 0px 20px 0px;vertical-align:top;padding-left:0px;padding-right:0px;text-align:center;style:background-repeat:repeat;background-size:auto;padding-bottom:0px;padding-top:0px;padding:20px 0px 20px 0px;vertical-align:top;padding-left:0px;padding-right:0px;text-align:center;;" + }, + "components": [ + { + "tagName": "mj-column", + "type": "mj-column", + "style": { + "vertical-align": "top", + "style": "vertical-align:top;" + }, + "attributes": { + "vertical-align": "top", + "style": "vertical-align:top;style:vertical-align:top;;" + } + } + ] + }, + { + "tagName": "mj-section", + "type": "mj-section", + "style": { + "background-color": "#ffffff", + "background-repeat": "repeat", + "padding-bottom": "0px", + "padding-top": "0px", + "padding": "20px 0", + "vertical-align": "top", + "padding-left": "0px", + "padding-right": "0px", + "text-align": "center", + "style": "background-color:#ffffff;background-repeat:repeat;padding-bottom:0px;padding-top:0px;padding:20px 0;vertical-align:top;padding-left:0px;padding-right:0px;text-align:center;" + }, + "attributes": { + "background-color": "#ffffff", + "background-repeat": "repeat", + "padding-bottom": "0px", + "padding-top": "0px", + "padding": "20px 0", + "vertical-align": "top", + "padding-left": "0px", + "padding-right": "0px", + "text-align": "center", + "style": "background-color:#ffffff;background-repeat:repeat;padding-bottom:0px;padding-top:0px;padding:20px 0;vertical-align:top;padding-left:0px;padding-right:0px;text-align:center;style:background-color:#ffffff;background-repeat:repeat;padding-bottom:0px;padding-top:0px;padding:20px 0;vertical-align:top;padding-left:0px;padding-right:0px;text-align:center;;" + }, + "components": [ + { + "tagName": "mj-column", + "type": "mj-column", + "style": { + "vertical-align": "top", + "style": "vertical-align:top;" + }, + "attributes": { + "vertical-align": "top", + "style": "vertical-align:top;style:vertical-align:top;;" + }, + "components": [ + { + "tagName": "mj-divider", + "type": "mj-divider", + "style": { + "border-color": "#00b052", + "border-width": "7px", + "padding-bottom": "40px", + "padding-left": "0px", + "padding-right": "0px", + "padding-top": "0px", + "padding": "10px 25px", + "width": "100%", + "border-style": "solid", + "style": "border-color:#00b052;border-width:7px;padding-bottom:40px;padding-left:0px;padding-right:0px;padding-top:0px;padding:10px 25px;width:100%;border-style:solid;" + }, + "attributes": { + "border-color": "#00b052", + "border-width": "7px", + "padding-bottom": "40px", + "padding-left": "0px", + "padding-right": "0px", + "padding-top": "0px", + "padding": "10px 25px", + "width": "100%", + "border-style": "solid", + "style": "border-color:#00b052;border-width:7px;padding-bottom:40px;padding-left:0px;padding-right:0px;padding-top:0px;padding:10px 25px;width:100%;border-style:solid;style:border-color:#00b052;border-width:7px;padding-bottom:40px;padding-left:0px;padding-right:0px;padding-top:0px;padding:10px 25px;width:100%;border-style:solid;;" + } + } + ] + } + ] + }, + { + "tagName": "mj-section", + "type": "mj-section", + "style": { + "background-color": "#ffffff", + "background-repeat": "repeat", + "background-size": "auto", + "padding-bottom": "0px", + "padding-top": "0px", + "padding": "20px 0", + "vertical-align": "top", + "padding-left": "0px", + "padding-right": "0px", + "text-align": "center", + "style": "background-color:#ffffff;background-repeat:repeat;background-size:auto;padding-bottom:0px;padding-top:0px;padding:20px 0;vertical-align:top;padding-left:0px;padding-right:0px;text-align:center;" + }, + "attributes": { + "background-color": "#ffffff", + "background-repeat": "repeat", + "background-size": "auto", + "padding-bottom": "0px", + "padding-top": "0px", + "padding": "20px 0", + "vertical-align": "top", + "padding-left": "0px", + "padding-right": "0px", + "text-align": "center", + "style": "background-color:#ffffff;background-repeat:repeat;background-size:auto;padding-bottom:0px;padding-top:0px;padding:20px 0;vertical-align:top;padding-left:0px;padding-right:0px;text-align:center;style:background-color:#ffffff;background-repeat:repeat;background-size:auto;padding-bottom:0px;padding-top:0px;padding:20px 0;vertical-align:top;padding-left:0px;padding-right:0px;text-align:center;;" + }, + "components": [ + { + "tagName": "mj-column", + "type": "mj-column", + "style": { + "vertical-align": "top", + "style": "vertical-align:top;" + }, + "attributes": { + "vertical-align": "top", + "style": "vertical-align:top;style:vertical-align:top;;" + }, + "components": [ + { + "tagName": "mj-image", + "type": "mj-image", + "style": { + "src": "https://api.cradle2careertx.org/v1/data/downloads?getdoc=true&ref=doc746624651312&name=d3BihfXZ5aVGZ.png&content_type=image/png", + "padding-top": "10px", + "padding-bottom": "10px", + "padding-right": "25px", + "padding-left": "25px", + "align": "center", + "style": "src:https://via.placeholder.com/350x250/78c5d6/fff;padding-top:10px;padding-bottom:10px;padding-right:25px;padding-left:25px;align:center;" + }, + "attributes": { + "src": "https://api.cradle2careertx.org/v1/data/downloads?getdoc=true&ref=doc746624651312&name=d3BihfXZ5aVGZ.png&content_type=image/png", + "padding-top": "10px", + "padding-bottom": "10px", + "padding-right": "25px", + "padding-left": "25px", + "align": "center", + "style": "src:https://api.cradle2careertx.org/v1/data/downloads?getdoc=true&ref=doc746624651312&name=d3BihfXZ5aVGZ.png&content_type=image/png;padding-top:10px;padding-bottom:10px;padding-right:25px;padding-left:25px;align:center;style:src:https://via.placeholder.com/350x250/78c5d6/fff;padding-top:10px;padding-bottom:10px;padding-right:25px;padding-left:25px;align:center;;" + } + } + ] + } + ] + }, + { + "tagName": "mj-section", + "type": "mj-section", + "style": { + "background-color": "#ffffff", + "background-repeat": "repeat", + "background-size": "auto", + "padding-bottom": "70px", + "padding-top": "30px", + "padding": "20px 0px 20px 0px", + "vertical-align": "top", + "padding-left": "0px", + "padding-right": "0px", + "text-align": "center", + "style": "background-color:#ffffff;background-repeat:repeat;background-size:auto;padding-bottom:70px;padding-top:30px;padding:20px 0px 20px 0px;vertical-align:top;padding-left:0px;padding-right:0px;text-align:center;" + }, + "attributes": { + "background-color": "#ffffff", + "background-repeat": "repeat", + "background-size": "auto", + "padding-bottom": "70px", + "padding-top": "30px", + "padding": "20px 0px 20px 0px", + "vertical-align": "top", + "padding-left": "0px", + "padding-right": "0px", + "text-align": "center", + "style": "background-color:#ffffff;background-repeat:repeat;background-size:auto;padding-bottom:70px;padding-top:30px;padding:20px 0px 20px 0px;vertical-align:top;padding-left:0px;padding-right:0px;text-align:center;style:background-color:#ffffff;background-repeat:repeat;background-size:auto;padding-bottom:70px;padding-top:30px;padding:20px 0px 20px 0px;vertical-align:top;padding-left:0px;padding-right:0px;text-align:center;;" + }, + "components": [ + { + "tagName": "mj-column", + "type": "mj-column", + "style": { + "vertical-align": "top", + "style": "vertical-align:top;" + }, + "attributes": { + "vertical-align": "top", + "style": "vertical-align:top;style:vertical-align:top;;" + }, + "components": [ + { + "tagName": "mj-text", + "type": "mj-text", + "style": { + "color": "#797e82", + "font-family": "Open Sans, Helvetica, Arial, sans-serif", + "line-height": "22px", + "padding-bottom": "0px", + "padding-left": "50px", + "padding-right": "50px", + "padding-top": "0px", + "padding": "0px 25px 0px 25px", + "font-size": "13px", + "align": "left", + "style": "color:#797e82;font-family:Open Sans, Helvetica, Arial, sans-serif;line-height:22px;padding-bottom:0px;padding-left:50px;padding-right:50px;padding-top:0px;padding:0px 25px 0px 25px;font-size:13px;align:left;" + }, + "attributes": { + "color": "#797e82", + "font-family": "Open Sans, Helvetica, Arial, sans-serif", + "line-height": "22px", + "padding-bottom": "0px", + "padding-left": "50px", + "padding-right": "50px", + "padding-top": "0px", + "padding": "0px 25px 0px 25px", + "font-size": "13px", + "align": "left", + "style": "color:#797e82;font-family:Open Sans, Helvetica, Arial, sans-serif;line-height:22px;padding-bottom:0px;padding-left:50px;padding-right:50px;padding-top:0px;padding:0px 25px 0px 25px;font-size:13px;align:left;style:color:#797e82;font-family:Open Sans, Helvetica, Arial, sans-serif;line-height:22px;padding-bottom:0px;padding-left:50px;padding-right:50px;padding-top:0px;padding:0px 25px 0px 25px;font-size:13px;align:left;;" + }, + "components": [ + { + "tagName": "h1", + "type": "text", + "style": { + "text-align": "center", + "color": "#000000", + "line-height": "32px" + }, + "attributes": { + "style": "text-align:center;color:#000000;line-height:32px;" + }, + "components": [ + { + "type": "textnode", + "content": "Board Member Application" + } + ] + } + ] + }, + { + "tagName": "mj-text", + "type": "mj-text", + "style": { + "color": "#797e82", + "font-family": "Open Sans, Helvetica, Arial, sans-serif", + "line-height": "22px", + "padding-bottom": "0px", + "padding-left": "50px", + "padding-right": "50px", + "padding-top": "0px", + "padding": "0px 25px 0px 25px", + "font-size": "13px", + "align": "left", + "style": "color:#797e82;font-family:Open Sans, Helvetica, Arial, sans-serif;line-height:22px;padding-bottom:0px;padding-left:50px;padding-right:50px;padding-top:0px;padding:0px 25px 0px 25px;font-size:13px;align:left;" + }, + "attributes": { + "color": "#797e82", + "font-family": "Open Sans, Helvetica, Arial, sans-serif", + "line-height": "22px", + "padding-bottom": "0px", + "padding-left": "50px", + "padding-right": "50px", + "padding-top": "0px", + "padding": "0px 25px 0px 25px", + "font-size": "13px", + "align": "left", + "style": "color:#797e82;font-family:Open Sans, Helvetica, Arial, sans-serif;line-height:22px;padding-bottom:0px;padding-left:50px;padding-right:50px;padding-top:0px;padding:0px 25px 0px 25px;font-size:13px;align:left;style:color:#797e82;font-family:Open Sans, Helvetica, Arial, sans-serif;line-height:22px;padding-bottom:0px;padding-left:50px;padding-right:50px;padding-top:0px;padding:0px 25px 0px 25px;font-size:13px;align:left;;" + }, + "components": [ + { + "tagName": "p", + "type": "text", + "style": { + "margin": "10px 0", + "text-align": "center" + }, + "attributes": { + "style": "margin:10px 0;text-align:center;" + }, + "components": [ + { + "type": "textnode", + "content": "${content}" + } + ] + } + ] + }, + { + "tagName": "mj-text", + "type": "mj-text", + "style": { + "color": "#797e82", + "font-family": "Open Sans, Helvetica, Arial, sans-serif", + "line-height": "22px", + "padding-bottom": "0px", + "padding-left": "50px", + "padding-right": "50px", + "padding-top": "0px", + "padding": "0px 25px 0px 25px", + "font-size": "13px", + "align": "left", + "style": "color:#797e82;font-family:Open Sans, Helvetica, Arial, sans-serif;line-height:22px;padding-bottom:0px;padding-left:50px;padding-right:50px;padding-top:0px;padding:0px 25px 0px 25px;font-size:13px;align:left;" + }, + "attributes": { + "color": "#797e82", + "font-family": "Open Sans, Helvetica, Arial, sans-serif", + "line-height": "22px", + "padding-bottom": "0px", + "padding-left": "50px", + "padding-right": "50px", + "padding-top": "0px", + "padding": "0px 25px 0px 25px", + "font-size": "13px", + "align": "left", + "style": "color:#797e82;font-family:Open Sans, Helvetica, Arial, sans-serif;line-height:22px;padding-bottom:0px;padding-left:50px;padding-right:50px;padding-top:0px;padding:0px 25px 0px 25px;font-size:13px;align:left;style:color:#797e82;font-family:Open Sans, Helvetica, Arial, sans-serif;line-height:22px;padding-bottom:0px;padding-left:50px;padding-right:50px;padding-top:0px;padding:0px 25px 0px 25px;font-size:13px;align:left;;" + }, + "components": [ + { + "tagName": "p", + "style": { + "margin": "10px 0", + "text-align": "center" + }, + "attributes": { + "style": "margin:10px 0;text-align:center;" + }, + "components": [ + { + "tagName": "i", + "style": { + "font-style": "normal" + }, + "attributes": { + "style": "font-style:normal;" + } + } + ] + } + ] + } + ] + } + ] + }, + { + "tagName": "mj-section", + "type": "mj-section", + "style": { + "background-repeat": "repeat", + "background-size": "auto", + "padding-bottom": "0px", + "padding": "20px 0px 20px 0px", + "vertical-align": "top", + "padding-left": "0px", + "padding-right": "0px", + "padding-top": "20px", + "text-align": "center", + "style": "background-repeat:repeat;background-size:auto;padding-bottom:0px;padding:20px 0px 20px 0px;vertical-align:top;padding-left:0px;padding-right:0px;padding-top:20px;text-align:center;" + }, + "attributes": { + "background-repeat": "repeat", + "background-size": "auto", + "padding-bottom": "0px", + "padding": "20px 0px 20px 0px", + "vertical-align": "top", + "padding-left": "0px", + "padding-right": "0px", + "padding-top": "20px", + "text-align": "center", + "style": "background-repeat:repeat;background-size:auto;padding-bottom:0px;padding:20px 0px 20px 0px;vertical-align:top;padding-left:0px;padding-right:0px;padding-top:20px;text-align:center;style:background-repeat:repeat;background-size:auto;padding-bottom:0px;padding:20px 0px 20px 0px;vertical-align:top;padding-left:0px;padding-right:0px;padding-top:20px;text-align:center;;" + }, + "components": [ + { + "tagName": "mj-column", + "type": "mj-column", + "style": { + "vertical-align": "top", + "style": "vertical-align:top;" + }, + "attributes": { + "vertical-align": "top", + "style": "vertical-align:top;style:vertical-align:top;;" + }, + "components": [ + { + "tagName": "mj-social", + "type": "mj-social", + "style": { + "border-radius": "6px", + "font-family": "Ubuntu, Helvetica, Arial, sans-serif", + "icon-size": "30", + "mode": "horizontal", + "padding-bottom": "0px", + "padding": "10px 25px", + "text-decoration": "none", + "text-mode": "true", + "align": "center", + "font-size": "13px", + "line-height": "22px", + "style": "border-radius:6px;font-family:Ubuntu, Helvetica, Arial, sans-serif;icon-size:30;mode:horizontal;padding-bottom:0px;padding:10px 25px;text-decoration:none;text-mode:true;align:center;font-size:13px;line-height:22px;" + }, + "attributes": { + "border-radius": "6px", + "font-family": "Ubuntu, Helvetica, Arial, sans-serif", + "icon-size": "30", + "mode": "horizontal", + "padding-bottom": "0px", + "padding": "10px 25px", + "text-decoration": "none", + "text-mode": "true", + "align": "center", + "font-size": "13px", + "line-height": "22px", + "style": "border-radius:6px;font-family:Ubuntu, Helvetica, Arial, sans-serif;icon-size:30;mode:horizontal;padding-bottom:0px;padding:10px 25px;text-decoration:none;text-mode:true;align:center;font-size:13px;line-height:22px;style:border-radius:6px;font-family:Ubuntu, Helvetica, Arial, sans-serif;icon-size:30;mode:horizontal;padding-bottom:0px;padding:10px 25px;text-decoration:none;text-mode:true;align:center;font-size:13px;line-height:22px;;" + }, + "components": [ + { + "tagName": "mj-social-element", + "type": "mj-social-element", + "style": { + "background-color": "#00b052", + "name": "facebook-noshare", + "src": "http://saas-templates-creator.mailjet.com/saas-templates-creator/static/img/facebook_white.png", + "align": "center", + "font-size": "13px", + "line-height": "22px", + "vertical-align": "middle", + "style": "background-color:#00b052;name:facebook-noshare;src:http://saas-templates-creator.mailjet.com/saas-templates-creator/static/img/facebook_white.png;align:center;font-size:13px;line-height:22px;vertical-align:middle;" + }, + "attributes": { + "background-color": "#00b052", + "name": "facebook-noshare", + "src": "http://saas-templates-creator.mailjet.com/saas-templates-creator/static/img/facebook_white.png", + "align": "center", + "font-size": "13px", + "line-height": "22px", + "vertical-align": "middle", + "style": "background-color:#00b052;name:facebook-noshare;src:http://saas-templates-creator.mailjet.com/saas-templates-creator/static/img/facebook_white.png;align:center;font-size:13px;line-height:22px;vertical-align:middle;style:background-color:#00b052;name:facebook-noshare;src:http://saas-templates-creator.mailjet.com/saas-templates-creator/static/img/facebook_white.png;align:center;font-size:13px;line-height:22px;vertical-align:middle;;" + } + }, + { + "tagName": "mj-social-element", + "type": "mj-social-element", + "style": { + "background-color": "#00b052", + "name": "twitter-noshare", + "src": "http://saas-templates-creator.mailjet.com/saas-templates-creator/static/img/twitter_white.png", + "align": "center", + "font-size": "13px", + "line-height": "22px", + "vertical-align": "middle", + "style": "background-color:#00b052;name:twitter-noshare;src:http://saas-templates-creator.mailjet.com/saas-templates-creator/static/img/twitter_white.png;align:center;font-size:13px;line-height:22px;vertical-align:middle;" + }, + "attributes": { + "background-color": "#00b052", + "name": "twitter-noshare", + "src": "http://saas-templates-creator.mailjet.com/saas-templates-creator/static/img/twitter_white.png", + "align": "center", + "font-size": "13px", + "line-height": "22px", + "vertical-align": "middle", + "style": "background-color:#00b052;name:twitter-noshare;src:http://saas-templates-creator.mailjet.com/saas-templates-creator/static/img/twitter_white.png;align:center;font-size:13px;line-height:22px;vertical-align:middle;style:background-color:#00b052;name:twitter-noshare;src:http://saas-templates-creator.mailjet.com/saas-templates-creator/static/img/twitter_white.png;align:center;font-size:13px;line-height:22px;vertical-align:middle;;" + } + }, + { + "tagName": "mj-social-element", + "type": "mj-social-element", + "style": { + "background-color": "#00b052", + "name": "linkedin-noshare", + "src": "http://saas-templates-creator.mailjet.com/saas-templates-creator/static/img/linkedin_white.png", + "align": "center", + "font-size": "13px", + "line-height": "22px", + "vertical-align": "middle", + "style": "background-color:#00b052;name:linkedin-noshare;src:http://saas-templates-creator.mailjet.com/saas-templates-creator/static/img/linkedin_white.png;align:center;font-size:13px;line-height:22px;vertical-align:middle;" + }, + "attributes": { + "background-color": "#00b052", + "name": "linkedin-noshare", + "src": "http://saas-templates-creator.mailjet.com/saas-templates-creator/static/img/linkedin_white.png", + "align": "center", + "font-size": "13px", + "line-height": "22px", + "vertical-align": "middle", + "style": "background-color:#00b052;name:linkedin-noshare;src:http://saas-templates-creator.mailjet.com/saas-templates-creator/static/img/linkedin_white.png;align:center;font-size:13px;line-height:22px;vertical-align:middle;style:background-color:#00b052;name:linkedin-noshare;src:http://saas-templates-creator.mailjet.com/saas-templates-creator/static/img/linkedin_white.png;align:center;font-size:13px;line-height:22px;vertical-align:middle;;" + } + } + ] + }, + { + "tagName": "mj-text", + "type": "mj-text", + "style": { + "align": "center", + "color": "#797e82", + "font-family": "Open Sans, Helvetica, Arial, sans-serif", + "font-size": "11px", + "line-height": "22px", + "padding-bottom": "0px", + "padding-top": "0px", + "padding": "0px 20px 0px 20px", + "padding-right": "25px", + "padding-left": "25px", + "style": "align:center;color:#797e82;font-family:Open Sans, Helvetica, Arial, sans-serif;font-size:11px;line-height:22px;padding-bottom:0px;padding-top:0px;padding:0px 20px 0px 20px;padding-right:25px;padding-left:25px;" + }, + "attributes": { + "align": "center", + "color": "#797e82", + "font-family": "Open Sans, Helvetica, Arial, sans-serif", + "font-size": "11px", + "line-height": "22px", + "padding-bottom": "0px", + "padding-top": "0px", + "padding": "0px 20px 0px 20px", + "padding-right": "25px", + "padding-left": "25px", + "style": "align:center;color:#797e82;font-family:Open Sans, Helvetica, Arial, sans-serif;font-size:11px;line-height:22px;padding-bottom:0px;padding-top:0px;padding:0px 20px 0px 20px;padding-right:25px;padding-left:25px;style:align:center;color:#797e82;font-family:Open Sans, Helvetica, Arial, sans-serif;font-size:11px;line-height:22px;padding-bottom:0px;padding-top:0px;padding:0px 20px 0px 20px;padding-right:25px;padding-left:25px;;" + }, + "components": [ + { + "tagName": "p", + "style": { + "margin": "10px 0" + }, + "attributes": { + "style": "margin:10px 0;" + }, + "components": [ + { + "type": "link", + "editable": false, + "style": { + "color": "#00b052" + }, + "attributes": { + "target": "_blank", + "rel": "noopener noreferrer", + "href": "#", + "style": "color:#00b052;" + }, + "components": [ + { + "tagName": "span", + "type": "text", + "style": { + "color": "#00b052" + }, + "attributes": { + "style": "color:#00b052;" + }, + "components": [ + { + "type": "textnode", + "content": "Page 1" + } + ] + } + ] + }, + { + "tagName": "span", + "type": "text", + "style": { + "color": "#797e82" + }, + "attributes": { + "style": "color:#797e82;" + }, + "components": [ + { + "type": "textnode", + "content": " | " + } + ] + }, + { + "type": "link", + "editable": false, + "style": { + "color": "#00b052" + }, + "attributes": { + "target": "_blank", + "rel": "noopener noreferrer", + "href": "#", + "style": "color:#00b052;" + }, + "components": [ + { + "tagName": "span", + "type": "text", + "style": { + "color": "#00b052" + }, + "attributes": { + "style": "color:#00b052;" + }, + "components": [ + { + "type": "textnode", + "content": "Page 2" + } + ] + } + ] + }, + { + "tagName": "span", + "type": "text", + "style": { + "color": "#797e82" + }, + "attributes": { + "style": "color:#797e82;" + }, + "components": [ + { + "type": "textnode", + "content": " | " + } + ] + }, + { + "type": "link", + "editable": false, + "style": { + "color": "#00b052" + }, + "attributes": { + "target": "_blank", + "rel": "noopener noreferrer", + "href": "#", + "style": "color:#00b052;" + }, + "components": [ + { + "tagName": "span", + "type": "text", + "style": { + "color": "#00b052" + }, + "attributes": { + "style": "color:#00b052;" + }, + "components": [ + { + "type": "textnode", + "content": "Page 3" + } + ] + } + ] + } + ] + }, + { + "tagName": "p", + "type": "text", + "style": { + "margin": "10px 0" + }, + "attributes": { + "style": "margin:10px 0;" + }, + "components": [ + { + "type": "textnode", + "content": "C\n\t\t\t\t\t\t" + }, + { + "type": "link", + "style": { + "color": "inherit", + "text-decoration": "none" + }, + "attributes": { + "target": "_blank", + "rel": "noopener noreferrer", + "href": "[[UNSUB_LINK_EN]]", + "style": "color:inherit;text-decoration:none;" + }, + "components": [ + { + "type": "textnode", + "content": "lick \n\t\t\t\t\t\t\t" + }, + { + "tagName": "span", + "style": { + "color": "#00b052" + }, + "attributes": { + "style": "color:#00b052;" + }, + "components": [ + { + "tagName": "u", + "type": "text", + "components": [ + { + "type": "textnode", + "content": "here" + } + ] + } + ] + }, + { + "type": "textnode", + "content": " to unsubscribe\n\t\t\t\t\t\t" + } + ] + }, + { + "type": "textnode", + "content": ".\n\t\t\t\t\t\t" + }, + { + "tagName": "br", + "void": true + }, + { + "tagName": "span", + "type": "text", + "style": { + "font-size": "10px" + }, + "attributes": { + "style": "font-size:10px;" + }, + "components": [ + { + "type": "textnode", + "content": "Created by" + } + ] + }, + { + "type": "link", + "editable": false, + "style": { + "font-size": "10px", + "color": "inherit", + "text-decoration": "none" + }, + "attributes": { + "target": "_blank", + "rel": "noopener noreferrer", + "href": "https://www.mailjet.com/?utm_source=saas_email_templates&utm_medium=logo_footer_email&utm_campaign=account_activation", + "style": "font-size:10px;color:inherit;text-decoration:none;" + }, + "components": [ + { + "tagName": "span", + "style": { + "color": "#00b052" + }, + "attributes": { + "style": "color:#00b052;" + }, + "components": [ + { + "tagName": "u", + "type": "text", + "components": [ + { + "type": "textnode", + "content": "Mailjet" + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ], + "head": { + "type": "head" + }, + "docEl": { + "tagName": "html" + } + }, + "id": "H7x9RyRByEwlQFxg" + } + ], + "id": "7NqjKdcEBR1LIX1z" + } + ], + "symbols": [] + }, + "body_mjml_html": "

    Board Member Application

    ${content}

    Page 1 | Page 2 | Page 3

    C\n\t\t\t\t\t\tlick \n\t\t\t\t\t\t\there to unsubscribe\n\t\t\t\t\t\t.\n\t\t\t\t\t\t
    Created byMailjet

    ", + "template": "", + "variables": { + "schema": [ + { + "name": "content", + "value": "

    Thank you for taking the time to fill out our online form. Your submission has been successfully received.

    \n

    Rest assured all the information you shared with us will be treated with the utmost confidentiality and used solely for the intended purpose.

    \n

    If you have any questions or require any assistance, please don't hesitate to contact us at info@cradle2careerx.org

    \n

    Sincerely,

    \n

    The Cradle Team

    " + } + ], + "client": [ + { + "name": "", + "value": "" + } + ], + "system": [ + { + "name": "", + "value": "" + } + ] + }, + "reference_num": "v6torgxnyj0hs", + "name": "response" + } + }, + "item_reference_num": "form808965595437" + }, + "v6torgxnyj0hs": { + "active": true, + "integration": [], + "alert": false, + "emails": [], + "from": "no-reply", + "title": "", + "subject": "Cradle2Career Response Received", + "body": "", + "body_mjml_projectData": { + "dataSources": [], + "assets": [ + { + "type": "image", + "src": "https://api.cradle2careertx.org/v1/data/downloads?getdoc=true&ref=doc558908667843&name=dXTbvmzT9X8St.png&content_type=image/png", + "unitDim": "px", + "height": 0, + "width": 0, + "name": "c2c_bug_pos_RGB.png", + "document": { + "id": 1, + "category": "documents", + "reference_num": "doc558908667843", + "original_name": "c2c_bug_pos_RGB.png", + "generated_name": "dXTbvmzT9X8St.png", + "file_size": "16797", + "file_type": "image/png", + "upload_date": "10/8/2025, 6:12:46 AM", + "directory": "/mnt/node1/cradle2careertxorg/modules/documents", + "url": "https://api.cradle2careertx.org/v1/data/downloads?getdoc=true&ref=doc558908667843&name=dXTbvmzT9X8St.png&content_type=image/png", + "jsontext": null, + "date": "2025-10-08 11:12:46", + "url2": "https://xrn93ngyz2tefjrx96grfksw.sites.appfactory.studio/portal/admin/core/api/php/request.php?getdoc=true&ref=doc558908667843&name=dXTbvmzT9X8St.png&content_type=image/png" + } + }, + { + "type": "image", + "src": "https://api.cradle2careertx.org/v1/data/downloads?getdoc=true&ref=doc746624651312&name=d3BihfXZ5aVGZ.png&content_type=image/png", + "unitDim": "px", + "height": 0, + "width": 0, + "name": "c2c_hrz-bg_pos_RGB.png", + "document": { + "original_name": "c2c_hrz-bg_pos_RGB.png", + "generated_name": "d3BihfXZ5aVGZ.png", + "file_size": 45872, + "file_type": "image/png", + "upload_date": "10/8/2025, 8:20:20 AM", + "directory": "/mnt/node1/cradle2careertxorg/modules/documents", + "url": "https://api.cradle2careertx.org/v1/data/downloads?getdoc=true&ref=doc746624651312&name=d3BihfXZ5aVGZ.png&content_type=image/png", + "url2": "https://xrn93ngyz2tefjrx96grfksw.sites.appfactory.studio/portal/admin/core/api/php/request.php?getdoc=true&ref=doc746624651312&name=d3BihfXZ5aVGZ.png&content_type=image/png", + "reference_num": "doc746624651312", + "catagory": "documents", + "json": { + "data": null + } + } + } + ], + "styles": [ + { + "selectors": [], + "selectorsAdd": "#outlook a", + "style": { + "padding-top": "0px", + "padding-right": "0px", + "padding-bottom": "0px", + "padding-left": "0px" + } + }, + { + "selectors": [], + "selectorsAdd": "body", + "style": { + "margin-top": "0px", + "margin-right": "0px", + "margin-bottom": "0px", + "margin-left": "0px", + "padding-top": "0px", + "padding-right": "0px", + "padding-bottom": "0px", + "padding-left": "0px", + "text-size-adjust": "100%" + } + }, + { + "selectors": [], + "selectorsAdd": "table, td", + "style": { + "border-collapse": "collapse" + } + }, + { + "selectors": [], + "selectorsAdd": "img", + "style": { + "border-top-width": "0px", + "border-right-width": "0px", + "border-bottom-width": "0px", + "border-left-width": "0px", + "border-top-style": "initial", + "border-right-style": "initial", + "border-bottom-style": "initial", + "border-left-style": "initial", + "border-top-color": "initial", + "border-right-color": "initial", + "border-bottom-color": "initial", + "border-left-color": "initial", + "border-image-source": "initial", + "border-image-slice": "initial", + "border-image-width": "initial", + "border-image-outset": "initial", + "border-image-repeat": "initial", + "height": "auto", + "line-height": "100%", + "outline-color": "initial", + "outline-style": "none", + "outline-width": "initial", + "text-decoration-line": "none", + "text-decoration-thickness": "initial", + "text-decoration-style": "initial", + "text-decoration-color": "initial" + } + }, + { + "selectors": [], + "selectorsAdd": "p", + "style": { + "display": "block", + "margin-top": "13px", + "margin-right": "0px", + "margin-bottom": "13px", + "margin-left": "0px" + } + }, + { + "selectors": [ + "mj-column-per-100" + ], + "style": { + "width": "100% !important", + "max-width": "100%" + }, + "mediaText": "only screen and (min-width: 480px)", + "atRuleType": "media" + }, + { + "selectors": [], + "selectorsAdd": ".moz-text-html .mj-column-per-100", + "style": { + "width": "100% !important", + "max-width": "100%" + } + } + ], + "pages": [ + { + "frames": [ + { + "component": { + "type": "wrapper", + "stylable": [ + "background", + "background-color", + "background-image", + "background-repeat", + "background-attachment", + "background-position", + "background-size" + ], + "components": [ + { + "tagName": "mjml", + "type": "mjml", + "style": { + "owa": "desktop", + "version": "4.3.0", + "style": "owa:desktop;version:4.3.0;" + }, + "attributes": { + "owa": "desktop", + "version": "4.3.0", + "style": "owa:desktop;version:4.3.0;style:owa:desktop;version:4.3.0;;" + }, + "components": [ + { + "tagName": "mj-head", + "type": "mj-head", + "components": [ + { + "tagName": "mj-font", + "type": "mj-font", + "style": { + "href": "https://fonts.googleapis.com/css?family=Montserrat", + "name": "Montserrat", + "style": "href:https://fonts.googleapis.com/css?family=Montserrat;name:Montserrat;" + }, + "attributes": { + "href": "https://fonts.googleapis.com/css?family=Montserrat", + "name": "Montserrat", + "style": "href:https://fonts.googleapis.com/css?family=Montserrat;name:Montserrat;style:href:https://fonts.googleapis.com/css?family=Montserrat;name:Montserrat;;" + } + }, + { + "tagName": "mj-font", + "type": "mj-font", + "style": { + "href": "https://fonts.googleapis.com/css?family=Raleway", + "name": "Raleway", + "style": "href:https://fonts.googleapis.com/css?family=Raleway;name:Raleway;" + }, + "attributes": { + "href": "https://fonts.googleapis.com/css?family=Raleway", + "name": "Raleway", + "style": "href:https://fonts.googleapis.com/css?family=Raleway;name:Raleway;style:href:https://fonts.googleapis.com/css?family=Raleway;name:Raleway;;" + } + }, + { + "tagName": "mj-font", + "type": "mj-font", + "style": { + "href": "https://fonts.googleapis.com/css?family=Open Sans", + "name": "Open Sans", + "style": "href:https://fonts.googleapis.com/css?family=Open Sans;name:Open Sans;" + }, + "attributes": { + "href": "https://fonts.googleapis.com/css?family=Open Sans", + "name": "Open Sans", + "style": "href:https://fonts.googleapis.com/css?family=Open Sans;name:Open Sans;style:href:https://fonts.googleapis.com/css?family=Open Sans;name:Open Sans;;" + } + }, + { + "tagName": "mj-preview" + } + ] + }, + { + "tagName": "mj-body", + "type": "mj-body", + "style": { + "background-color": "#f8f8f8", + "color": "#797e82", + "font-family": "Open Sans, Helvetica, Arial, sans-serif", + "width": "600px", + "style": "background-color:#f8f8f8;color:#797e82;font-family:Open Sans, Helvetica, Arial, sans-serif;width:600px;" + }, + "attributes": { + "background-color": "#f8f8f8", + "color": "#797e82", + "font-family": "Open Sans, Helvetica, Arial, sans-serif", + "width": "600px", + "style": "background-color:#f8f8f8;color:#797e82;font-family:Open Sans, Helvetica, Arial, sans-serif;width:600px;style:background-color:#f8f8f8;color:#797e82;font-family:Open Sans, Helvetica, Arial, sans-serif;width:600px;;" + }, + "components": [ + { + "tagName": "mj-section", + "type": "mj-section", + "style": { + "background-repeat": "repeat", + "background-size": "auto", + "padding-bottom": "0px", + "padding-top": "0px", + "padding": "20px 0px 20px 0px", + "vertical-align": "top", + "padding-left": "0px", + "padding-right": "0px", + "text-align": "center", + "style": "background-repeat:repeat;background-size:auto;padding-bottom:0px;padding-top:0px;padding:20px 0px 20px 0px;vertical-align:top;padding-left:0px;padding-right:0px;text-align:center;" + }, + "attributes": { + "background-repeat": "repeat", + "background-size": "auto", + "padding-bottom": "0px", + "padding-top": "0px", + "padding": "20px 0px 20px 0px", + "vertical-align": "top", + "padding-left": "0px", + "padding-right": "0px", + "text-align": "center", + "style": "background-repeat:repeat;background-size:auto;padding-bottom:0px;padding-top:0px;padding:20px 0px 20px 0px;vertical-align:top;padding-left:0px;padding-right:0px;text-align:center;style:background-repeat:repeat;background-size:auto;padding-bottom:0px;padding-top:0px;padding:20px 0px 20px 0px;vertical-align:top;padding-left:0px;padding-right:0px;text-align:center;;" + }, + "components": [ + { + "tagName": "mj-column", + "type": "mj-column", + "style": { + "vertical-align": "top", + "style": "vertical-align:top;" + }, + "attributes": { + "vertical-align": "top", + "style": "vertical-align:top;style:vertical-align:top;;" + } + } + ] + }, + { + "tagName": "mj-section", + "type": "mj-section", + "style": { + "background-color": "#ffffff", + "background-repeat": "repeat", + "padding-bottom": "0px", + "padding-top": "0px", + "padding": "20px 0", + "vertical-align": "top", + "padding-left": "0px", + "padding-right": "0px", + "text-align": "center", + "style": "background-color:#ffffff;background-repeat:repeat;padding-bottom:0px;padding-top:0px;padding:20px 0;vertical-align:top;padding-left:0px;padding-right:0px;text-align:center;" + }, + "attributes": { + "background-color": "#ffffff", + "background-repeat": "repeat", + "padding-bottom": "0px", + "padding-top": "0px", + "padding": "20px 0", + "vertical-align": "top", + "padding-left": "0px", + "padding-right": "0px", + "text-align": "center", + "style": "background-color:#ffffff;background-repeat:repeat;padding-bottom:0px;padding-top:0px;padding:20px 0;vertical-align:top;padding-left:0px;padding-right:0px;text-align:center;style:background-color:#ffffff;background-repeat:repeat;padding-bottom:0px;padding-top:0px;padding:20px 0;vertical-align:top;padding-left:0px;padding-right:0px;text-align:center;;" + }, + "components": [ + { + "tagName": "mj-column", + "type": "mj-column", + "style": { + "vertical-align": "top", + "style": "vertical-align:top;" + }, + "attributes": { + "vertical-align": "top", + "style": "vertical-align:top;style:vertical-align:top;;" + }, + "components": [ + { + "tagName": "mj-divider", + "type": "mj-divider", + "style": { + "border-color": "#00b052", + "border-width": "7px", + "padding-bottom": "40px", + "padding-left": "0px", + "padding-right": "0px", + "padding-top": "0px", + "padding": "10px 25px", + "width": "100%", + "border-style": "solid", + "style": "border-color:#00b052;border-width:7px;padding-bottom:40px;padding-left:0px;padding-right:0px;padding-top:0px;padding:10px 25px;width:100%;border-style:solid;" + }, + "attributes": { + "border-color": "#00b052", + "border-width": "7px", + "padding-bottom": "40px", + "padding-left": "0px", + "padding-right": "0px", + "padding-top": "0px", + "padding": "10px 25px", + "width": "100%", + "border-style": "solid", + "style": "border-color:#00b052;border-width:7px;padding-bottom:40px;padding-left:0px;padding-right:0px;padding-top:0px;padding:10px 25px;width:100%;border-style:solid;style:border-color:#00b052;border-width:7px;padding-bottom:40px;padding-left:0px;padding-right:0px;padding-top:0px;padding:10px 25px;width:100%;border-style:solid;;" + } + } + ] + } + ] + }, + { + "tagName": "mj-section", + "type": "mj-section", + "style": { + "background-color": "#ffffff", + "background-repeat": "repeat", + "background-size": "auto", + "padding-bottom": "0px", + "padding-top": "0px", + "padding": "20px 0", + "vertical-align": "top", + "padding-left": "0px", + "padding-right": "0px", + "text-align": "center", + "style": "background-color:#ffffff;background-repeat:repeat;background-size:auto;padding-bottom:0px;padding-top:0px;padding:20px 0;vertical-align:top;padding-left:0px;padding-right:0px;text-align:center;" + }, + "attributes": { + "background-color": "#ffffff", + "background-repeat": "repeat", + "background-size": "auto", + "padding-bottom": "0px", + "padding-top": "0px", + "padding": "20px 0", + "vertical-align": "top", + "padding-left": "0px", + "padding-right": "0px", + "text-align": "center", + "style": "background-color:#ffffff;background-repeat:repeat;background-size:auto;padding-bottom:0px;padding-top:0px;padding:20px 0;vertical-align:top;padding-left:0px;padding-right:0px;text-align:center;style:background-color:#ffffff;background-repeat:repeat;background-size:auto;padding-bottom:0px;padding-top:0px;padding:20px 0;vertical-align:top;padding-left:0px;padding-right:0px;text-align:center;;" + }, + "components": [ + { + "tagName": "mj-column", + "type": "mj-column", + "style": { + "vertical-align": "top", + "style": "vertical-align:top;" + }, + "attributes": { + "vertical-align": "top", + "style": "vertical-align:top;style:vertical-align:top;;" + }, + "components": [ + { + "tagName": "mj-image", + "type": "mj-image", + "style": { + "src": "https://api.cradle2careertx.org/v1/data/downloads?getdoc=true&ref=doc746624651312&name=d3BihfXZ5aVGZ.png&content_type=image/png", + "padding-top": "10px", + "padding-bottom": "10px", + "padding-right": "25px", + "padding-left": "25px", + "align": "center", + "style": "src:https://via.placeholder.com/350x250/78c5d6/fff;padding-top:10px;padding-bottom:10px;padding-right:25px;padding-left:25px;align:center;" + }, + "attributes": { + "src": "https://api.cradle2careertx.org/v1/data/downloads?getdoc=true&ref=doc746624651312&name=d3BihfXZ5aVGZ.png&content_type=image/png", + "padding-top": "10px", + "padding-bottom": "10px", + "padding-right": "25px", + "padding-left": "25px", + "align": "center", + "style": "src:https://api.cradle2careertx.org/v1/data/downloads?getdoc=true&ref=doc746624651312&name=d3BihfXZ5aVGZ.png&content_type=image/png;padding-top:10px;padding-bottom:10px;padding-right:25px;padding-left:25px;align:center;style:src:https://via.placeholder.com/350x250/78c5d6/fff;padding-top:10px;padding-bottom:10px;padding-right:25px;padding-left:25px;align:center;;" + } + } + ] + } + ] + }, + { + "tagName": "mj-section", + "type": "mj-section", + "style": { + "background-color": "#ffffff", + "background-repeat": "repeat", + "background-size": "auto", + "padding-bottom": "70px", + "padding-top": "30px", + "padding": "20px 0px 20px 0px", + "vertical-align": "top", + "padding-left": "0px", + "padding-right": "0px", + "text-align": "center", + "style": "background-color:#ffffff;background-repeat:repeat;background-size:auto;padding-bottom:70px;padding-top:30px;padding:20px 0px 20px 0px;vertical-align:top;padding-left:0px;padding-right:0px;text-align:center;" + }, + "attributes": { + "background-color": "#ffffff", + "background-repeat": "repeat", + "background-size": "auto", + "padding-bottom": "70px", + "padding-top": "30px", + "padding": "20px 0px 20px 0px", + "vertical-align": "top", + "padding-left": "0px", + "padding-right": "0px", + "text-align": "center", + "style": "background-color:#ffffff;background-repeat:repeat;background-size:auto;padding-bottom:70px;padding-top:30px;padding:20px 0px 20px 0px;vertical-align:top;padding-left:0px;padding-right:0px;text-align:center;style:background-color:#ffffff;background-repeat:repeat;background-size:auto;padding-bottom:70px;padding-top:30px;padding:20px 0px 20px 0px;vertical-align:top;padding-left:0px;padding-right:0px;text-align:center;;" + }, + "components": [ + { + "tagName": "mj-column", + "type": "mj-column", + "style": { + "vertical-align": "top", + "style": "vertical-align:top;" + }, + "attributes": { + "vertical-align": "top", + "style": "vertical-align:top;style:vertical-align:top;;" + }, + "components": [ + { + "tagName": "mj-text", + "type": "mj-text", + "style": { + "color": "#797e82", + "font-family": "Open Sans, Helvetica, Arial, sans-serif", + "line-height": "22px", + "padding-bottom": "0px", + "padding-left": "50px", + "padding-right": "50px", + "padding-top": "0px", + "padding": "0px 25px 0px 25px", + "font-size": "13px", + "align": "left", + "style": "color:#797e82;font-family:Open Sans, Helvetica, Arial, sans-serif;line-height:22px;padding-bottom:0px;padding-left:50px;padding-right:50px;padding-top:0px;padding:0px 25px 0px 25px;font-size:13px;align:left;" + }, + "attributes": { + "color": "#797e82", + "font-family": "Open Sans, Helvetica, Arial, sans-serif", + "line-height": "22px", + "padding-bottom": "0px", + "padding-left": "50px", + "padding-right": "50px", + "padding-top": "0px", + "padding": "0px 25px 0px 25px", + "font-size": "13px", + "align": "left", + "style": "color:#797e82;font-family:Open Sans, Helvetica, Arial, sans-serif;line-height:22px;padding-bottom:0px;padding-left:50px;padding-right:50px;padding-top:0px;padding:0px 25px 0px 25px;font-size:13px;align:left;style:color:#797e82;font-family:Open Sans, Helvetica, Arial, sans-serif;line-height:22px;padding-bottom:0px;padding-left:50px;padding-right:50px;padding-top:0px;padding:0px 25px 0px 25px;font-size:13px;align:left;;" + }, + "components": [ + { + "tagName": "h1", + "type": "text", + "style": { + "text-align": "center", + "color": "#000000", + "line-height": "32px" + }, + "attributes": { + "style": "text-align:center;color:#000000;line-height:32px;" + }, + "components": [ + { + "type": "textnode", + "content": "Board Member Application" + } + ] + } + ] + }, + { + "tagName": "mj-text", + "type": "mj-text", + "style": { + "color": "#797e82", + "font-family": "Open Sans, Helvetica, Arial, sans-serif", + "line-height": "22px", + "padding-bottom": "0px", + "padding-left": "50px", + "padding-right": "50px", + "padding-top": "0px", + "padding": "0px 25px 0px 25px", + "font-size": "13px", + "align": "left", + "style": "color:#797e82;font-family:Open Sans, Helvetica, Arial, sans-serif;line-height:22px;padding-bottom:0px;padding-left:50px;padding-right:50px;padding-top:0px;padding:0px 25px 0px 25px;font-size:13px;align:left;" + }, + "attributes": { + "color": "#797e82", + "font-family": "Open Sans, Helvetica, Arial, sans-serif", + "line-height": "22px", + "padding-bottom": "0px", + "padding-left": "50px", + "padding-right": "50px", + "padding-top": "0px", + "padding": "0px 25px 0px 25px", + "font-size": "13px", + "align": "left", + "style": "color:#797e82;font-family:Open Sans, Helvetica, Arial, sans-serif;line-height:22px;padding-bottom:0px;padding-left:50px;padding-right:50px;padding-top:0px;padding:0px 25px 0px 25px;font-size:13px;align:left;style:color:#797e82;font-family:Open Sans, Helvetica, Arial, sans-serif;line-height:22px;padding-bottom:0px;padding-left:50px;padding-right:50px;padding-top:0px;padding:0px 25px 0px 25px;font-size:13px;align:left;;" + }, + "components": [ + { + "tagName": "p", + "type": "text", + "style": { + "margin": "10px 0", + "text-align": "center" + }, + "attributes": { + "style": "margin:10px 0;text-align:center;" + }, + "components": [ + { + "type": "textnode", + "content": "${content}" + } + ] + } + ] + }, + { + "tagName": "mj-text", + "type": "mj-text", + "style": { + "color": "#797e82", + "font-family": "Open Sans, Helvetica, Arial, sans-serif", + "line-height": "22px", + "padding-bottom": "0px", + "padding-left": "50px", + "padding-right": "50px", + "padding-top": "0px", + "padding": "0px 25px 0px 25px", + "font-size": "13px", + "align": "left", + "style": "color:#797e82;font-family:Open Sans, Helvetica, Arial, sans-serif;line-height:22px;padding-bottom:0px;padding-left:50px;padding-right:50px;padding-top:0px;padding:0px 25px 0px 25px;font-size:13px;align:left;" + }, + "attributes": { + "color": "#797e82", + "font-family": "Open Sans, Helvetica, Arial, sans-serif", + "line-height": "22px", + "padding-bottom": "0px", + "padding-left": "50px", + "padding-right": "50px", + "padding-top": "0px", + "padding": "0px 25px 0px 25px", + "font-size": "13px", + "align": "left", + "style": "color:#797e82;font-family:Open Sans, Helvetica, Arial, sans-serif;line-height:22px;padding-bottom:0px;padding-left:50px;padding-right:50px;padding-top:0px;padding:0px 25px 0px 25px;font-size:13px;align:left;style:color:#797e82;font-family:Open Sans, Helvetica, Arial, sans-serif;line-height:22px;padding-bottom:0px;padding-left:50px;padding-right:50px;padding-top:0px;padding:0px 25px 0px 25px;font-size:13px;align:left;;" + }, + "components": [ + { + "tagName": "p", + "style": { + "margin": "10px 0", + "text-align": "center" + }, + "attributes": { + "style": "margin:10px 0;text-align:center;" + }, + "components": [ + { + "tagName": "i", + "style": { + "font-style": "normal" + }, + "attributes": { + "style": "font-style:normal;" + } + } + ] + } + ] + } + ] + } + ] + }, + { + "tagName": "mj-section", + "type": "mj-section", + "style": { + "background-repeat": "repeat", + "background-size": "auto", + "padding-bottom": "0px", + "padding": "20px 0px 20px 0px", + "vertical-align": "top", + "padding-left": "0px", + "padding-right": "0px", + "padding-top": "20px", + "text-align": "center", + "style": "background-repeat:repeat;background-size:auto;padding-bottom:0px;padding:20px 0px 20px 0px;vertical-align:top;padding-left:0px;padding-right:0px;padding-top:20px;text-align:center;" + }, + "attributes": { + "background-repeat": "repeat", + "background-size": "auto", + "padding-bottom": "0px", + "padding": "20px 0px 20px 0px", + "vertical-align": "top", + "padding-left": "0px", + "padding-right": "0px", + "padding-top": "20px", + "text-align": "center", + "style": "background-repeat:repeat;background-size:auto;padding-bottom:0px;padding:20px 0px 20px 0px;vertical-align:top;padding-left:0px;padding-right:0px;padding-top:20px;text-align:center;style:background-repeat:repeat;background-size:auto;padding-bottom:0px;padding:20px 0px 20px 0px;vertical-align:top;padding-left:0px;padding-right:0px;padding-top:20px;text-align:center;;" + }, + "components": [ + { + "tagName": "mj-column", + "type": "mj-column", + "style": { + "vertical-align": "top", + "style": "vertical-align:top;" + }, + "attributes": { + "vertical-align": "top", + "style": "vertical-align:top;style:vertical-align:top;;" + }, + "components": [ + { + "tagName": "mj-social", + "type": "mj-social", + "style": { + "border-radius": "6px", + "font-family": "Ubuntu, Helvetica, Arial, sans-serif", + "icon-size": "30", + "mode": "horizontal", + "padding-bottom": "0px", + "padding": "10px 25px", + "text-decoration": "none", + "text-mode": "true", + "align": "center", + "font-size": "13px", + "line-height": "22px", + "style": "border-radius:6px;font-family:Ubuntu, Helvetica, Arial, sans-serif;icon-size:30;mode:horizontal;padding-bottom:0px;padding:10px 25px;text-decoration:none;text-mode:true;align:center;font-size:13px;line-height:22px;" + }, + "attributes": { + "border-radius": "6px", + "font-family": "Ubuntu, Helvetica, Arial, sans-serif", + "icon-size": "30", + "mode": "horizontal", + "padding-bottom": "0px", + "padding": "10px 25px", + "text-decoration": "none", + "text-mode": "true", + "align": "center", + "font-size": "13px", + "line-height": "22px", + "style": "border-radius:6px;font-family:Ubuntu, Helvetica, Arial, sans-serif;icon-size:30;mode:horizontal;padding-bottom:0px;padding:10px 25px;text-decoration:none;text-mode:true;align:center;font-size:13px;line-height:22px;style:border-radius:6px;font-family:Ubuntu, Helvetica, Arial, sans-serif;icon-size:30;mode:horizontal;padding-bottom:0px;padding:10px 25px;text-decoration:none;text-mode:true;align:center;font-size:13px;line-height:22px;;" + }, + "components": [ + { + "tagName": "mj-social-element", + "type": "mj-social-element", + "style": { + "background-color": "#00b052", + "name": "facebook-noshare", + "src": "http://saas-templates-creator.mailjet.com/saas-templates-creator/static/img/facebook_white.png", + "align": "center", + "font-size": "13px", + "line-height": "22px", + "vertical-align": "middle", + "style": "background-color:#00b052;name:facebook-noshare;src:http://saas-templates-creator.mailjet.com/saas-templates-creator/static/img/facebook_white.png;align:center;font-size:13px;line-height:22px;vertical-align:middle;" + }, + "attributes": { + "background-color": "#00b052", + "name": "facebook-noshare", + "src": "http://saas-templates-creator.mailjet.com/saas-templates-creator/static/img/facebook_white.png", + "align": "center", + "font-size": "13px", + "line-height": "22px", + "vertical-align": "middle", + "style": "background-color:#00b052;name:facebook-noshare;src:http://saas-templates-creator.mailjet.com/saas-templates-creator/static/img/facebook_white.png;align:center;font-size:13px;line-height:22px;vertical-align:middle;style:background-color:#00b052;name:facebook-noshare;src:http://saas-templates-creator.mailjet.com/saas-templates-creator/static/img/facebook_white.png;align:center;font-size:13px;line-height:22px;vertical-align:middle;;" + } + }, + { + "tagName": "mj-social-element", + "type": "mj-social-element", + "style": { + "background-color": "#00b052", + "name": "twitter-noshare", + "src": "http://saas-templates-creator.mailjet.com/saas-templates-creator/static/img/twitter_white.png", + "align": "center", + "font-size": "13px", + "line-height": "22px", + "vertical-align": "middle", + "style": "background-color:#00b052;name:twitter-noshare;src:http://saas-templates-creator.mailjet.com/saas-templates-creator/static/img/twitter_white.png;align:center;font-size:13px;line-height:22px;vertical-align:middle;" + }, + "attributes": { + "background-color": "#00b052", + "name": "twitter-noshare", + "src": "http://saas-templates-creator.mailjet.com/saas-templates-creator/static/img/twitter_white.png", + "align": "center", + "font-size": "13px", + "line-height": "22px", + "vertical-align": "middle", + "style": "background-color:#00b052;name:twitter-noshare;src:http://saas-templates-creator.mailjet.com/saas-templates-creator/static/img/twitter_white.png;align:center;font-size:13px;line-height:22px;vertical-align:middle;style:background-color:#00b052;name:twitter-noshare;src:http://saas-templates-creator.mailjet.com/saas-templates-creator/static/img/twitter_white.png;align:center;font-size:13px;line-height:22px;vertical-align:middle;;" + } + }, + { + "tagName": "mj-social-element", + "type": "mj-social-element", + "style": { + "background-color": "#00b052", + "name": "linkedin-noshare", + "src": "http://saas-templates-creator.mailjet.com/saas-templates-creator/static/img/linkedin_white.png", + "align": "center", + "font-size": "13px", + "line-height": "22px", + "vertical-align": "middle", + "style": "background-color:#00b052;name:linkedin-noshare;src:http://saas-templates-creator.mailjet.com/saas-templates-creator/static/img/linkedin_white.png;align:center;font-size:13px;line-height:22px;vertical-align:middle;" + }, + "attributes": { + "background-color": "#00b052", + "name": "linkedin-noshare", + "src": "http://saas-templates-creator.mailjet.com/saas-templates-creator/static/img/linkedin_white.png", + "align": "center", + "font-size": "13px", + "line-height": "22px", + "vertical-align": "middle", + "style": "background-color:#00b052;name:linkedin-noshare;src:http://saas-templates-creator.mailjet.com/saas-templates-creator/static/img/linkedin_white.png;align:center;font-size:13px;line-height:22px;vertical-align:middle;style:background-color:#00b052;name:linkedin-noshare;src:http://saas-templates-creator.mailjet.com/saas-templates-creator/static/img/linkedin_white.png;align:center;font-size:13px;line-height:22px;vertical-align:middle;;" + } + } + ] + }, + { + "tagName": "mj-text", + "type": "mj-text", + "style": { + "align": "center", + "color": "#797e82", + "font-family": "Open Sans, Helvetica, Arial, sans-serif", + "font-size": "11px", + "line-height": "22px", + "padding-bottom": "0px", + "padding-top": "0px", + "padding": "0px 20px 0px 20px", + "padding-right": "25px", + "padding-left": "25px", + "style": "align:center;color:#797e82;font-family:Open Sans, Helvetica, Arial, sans-serif;font-size:11px;line-height:22px;padding-bottom:0px;padding-top:0px;padding:0px 20px 0px 20px;padding-right:25px;padding-left:25px;" + }, + "attributes": { + "align": "center", + "color": "#797e82", + "font-family": "Open Sans, Helvetica, Arial, sans-serif", + "font-size": "11px", + "line-height": "22px", + "padding-bottom": "0px", + "padding-top": "0px", + "padding": "0px 20px 0px 20px", + "padding-right": "25px", + "padding-left": "25px", + "style": "align:center;color:#797e82;font-family:Open Sans, Helvetica, Arial, sans-serif;font-size:11px;line-height:22px;padding-bottom:0px;padding-top:0px;padding:0px 20px 0px 20px;padding-right:25px;padding-left:25px;style:align:center;color:#797e82;font-family:Open Sans, Helvetica, Arial, sans-serif;font-size:11px;line-height:22px;padding-bottom:0px;padding-top:0px;padding:0px 20px 0px 20px;padding-right:25px;padding-left:25px;;" + }, + "components": [ + { + "tagName": "p", + "style": { + "margin": "10px 0" + }, + "attributes": { + "style": "margin:10px 0;" + }, + "components": [ + { + "type": "link", + "editable": false, + "style": { + "color": "#00b052" + }, + "attributes": { + "target": "_blank", + "rel": "noopener noreferrer", + "href": "#", + "style": "color:#00b052;" + }, + "components": [ + { + "tagName": "span", + "type": "text", + "style": { + "color": "#00b052" + }, + "attributes": { + "style": "color:#00b052;" + }, + "components": [ + { + "type": "textnode", + "content": "Page 1" + } + ] + } + ] + }, + { + "tagName": "span", + "type": "text", + "style": { + "color": "#797e82" + }, + "attributes": { + "style": "color:#797e82;" + }, + "components": [ + { + "type": "textnode", + "content": " | " + } + ] + }, + { + "type": "link", + "editable": false, + "style": { + "color": "#00b052" + }, + "attributes": { + "target": "_blank", + "rel": "noopener noreferrer", + "href": "#", + "style": "color:#00b052;" + }, + "components": [ + { + "tagName": "span", + "type": "text", + "style": { + "color": "#00b052" + }, + "attributes": { + "style": "color:#00b052;" + }, + "components": [ + { + "type": "textnode", + "content": "Page 2" + } + ] + } + ] + }, + { + "tagName": "span", + "type": "text", + "style": { + "color": "#797e82" + }, + "attributes": { + "style": "color:#797e82;" + }, + "components": [ + { + "type": "textnode", + "content": " | " + } + ] + }, + { + "type": "link", + "editable": false, + "style": { + "color": "#00b052" + }, + "attributes": { + "target": "_blank", + "rel": "noopener noreferrer", + "href": "#", + "style": "color:#00b052;" + }, + "components": [ + { + "tagName": "span", + "type": "text", + "style": { + "color": "#00b052" + }, + "attributes": { + "style": "color:#00b052;" + }, + "components": [ + { + "type": "textnode", + "content": "Page 3" + } + ] + } + ] + } + ] + }, + { + "tagName": "p", + "type": "text", + "style": { + "margin": "10px 0" + }, + "attributes": { + "style": "margin:10px 0;" + }, + "components": [ + { + "type": "textnode", + "content": "C\n\t\t\t\t\t\t" + }, + { + "type": "link", + "style": { + "color": "inherit", + "text-decoration": "none" + }, + "attributes": { + "target": "_blank", + "rel": "noopener noreferrer", + "href": "[[UNSUB_LINK_EN]]", + "style": "color:inherit;text-decoration:none;" + }, + "components": [ + { + "type": "textnode", + "content": "lick \n\t\t\t\t\t\t\t" + }, + { + "tagName": "span", + "style": { + "color": "#00b052" + }, + "attributes": { + "style": "color:#00b052;" + }, + "components": [ + { + "tagName": "u", + "type": "text", + "components": [ + { + "type": "textnode", + "content": "here" + } + ] + } + ] + }, + { + "type": "textnode", + "content": " to unsubscribe\n\t\t\t\t\t\t" + } + ] + }, + { + "type": "textnode", + "content": ".\n\t\t\t\t\t\t" + }, + { + "tagName": "br", + "void": true + }, + { + "tagName": "span", + "type": "text", + "style": { + "font-size": "10px" + }, + "attributes": { + "style": "font-size:10px;" + }, + "components": [ + { + "type": "textnode", + "content": "Created by" + } + ] + }, + { + "type": "link", + "editable": false, + "style": { + "font-size": "10px", + "color": "inherit", + "text-decoration": "none" + }, + "attributes": { + "target": "_blank", + "rel": "noopener noreferrer", + "href": "https://www.mailjet.com/?utm_source=saas_email_templates&utm_medium=logo_footer_email&utm_campaign=account_activation", + "style": "font-size:10px;color:inherit;text-decoration:none;" + }, + "components": [ + { + "tagName": "span", + "style": { + "color": "#00b052" + }, + "attributes": { + "style": "color:#00b052;" + }, + "components": [ + { + "tagName": "u", + "type": "text", + "components": [ + { + "type": "textnode", + "content": "Mailjet" + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ], + "head": { + "type": "head" + }, + "docEl": { + "tagName": "html" + } + }, + "id": "H7x9RyRByEwlQFxg" + } + ], + "id": "7NqjKdcEBR1LIX1z" + } + ], + "symbols": [] + }, + "body_mjml_html": "

    Board Member Application

    ${content}

    Page 1 | Page 2 | Page 3

    C\n\t\t\t\t\t\tlick \n\t\t\t\t\t\t\there to unsubscribe\n\t\t\t\t\t\t.\n\t\t\t\t\t\t
    Created byMailjet

    ", + "template": "", + "variables": { + "schema": [ + { + "name": "content", + "value": "

    Thank you for taking the time to fill out our online form. Your submission has been successfully received.

    \n

    Rest assured all the information you shared with us will be treated with the utmost confidentiality and used solely for the intended purpose.

    \n

    If you have any questions or require any assistance, please don't hesitate to contact us at info@cradle2careerx.org

    \n

    Sincerely,

    \n

    The Cradle Team

    " + } + ], + "client": [ + { + "name": "", + "value": "" + } + ], + "system": [ + { + "name": "", + "value": "" + } + ] + }, + "reference_num": "v6torgxnyj0hs", + "name": "response", + "item_reference_num": "form808965595437" + } + } +} + + + + + + + diff --git a/portal/admin/core/api/js/schema_output_main.js b/portal/admin/core/api/js/schema_output_main.js index e3a1cd20..de9a0909 100644 --- a/portal/admin/core/api/js/schema_output_main.js +++ b/portal/admin/core/api/js/schema_output_main.js @@ -1,2924 +1,15 @@ let hello = { - "customer": { - "id": "cus_T6n586Fk9Q2NId", - "object": "customer", - "address": { - "city": "Houston", - "country": "US", - "line1": "8181 El Mundo St Apt 2404", - "line2": "", - "postal_code": "77054", - "state": "AL" - }, - "balance": 0, - "created": 1758646522, - "currency": null, - "default_source": null, - "delinquent": false, - "description": null, - "discount": null, - "email": null, - "invoice_prefix": "SSTR9MHZ", - "invoice_settings": { - "custom_fields": null, - "default_payment_method": null, - "footer": null, - "rendering_options": null - }, - "livemode": false, - "metadata": [], - "name": null, - "next_invoice_sequence": 1, - "phone": null, - "preferred_locales": [], - "shipping": null, - "tax_exempt": "none", - "test_clock": null + "mysql_id": -1, + "category": "access", + "nameid": "access_module", + "active": true, + "displayName": "", + "variables": [], + "transactions": { + "charges": [], + "stripe": null }, - "calculation": { - "id": "taxcalc_1SAZUtJTsOSWtcD76nRGV3AD", - "object": "tax.calculation", - "amount_total": 1599, - "currency": "usd", - "customer": null, - "customer_details": { - "address": { - "city": "Houston", - "country": "US", - "line1": "8181 El Mundo St Apt 2404", - "line2": "", - "postal_code": "77054", - "state": "AL" - }, - "address_source": "billing", - "ip_address": null, - "tax_ids": [], - "taxability_override": "none" - }, - "expires_at": 1766422523, - "livemode": false, - "ship_from_details": null, - "shipping_cost": null, - "tax_amount_exclusive": 99, - "tax_amount_inclusive": 0, - "tax_breakdown": [ - { - "amount": 99, - "inclusive": false, - "tax_rate_details": { - "country": "US", - "flat_amount": null, - "percentage_decimal": "8.25", - "rate_type": "percentage", - "state": "TX", - "tax_type": "sales_tax" - }, - "taxability_reason": "taxable_basis_reduced", - "taxable_amount": 1200 - } - ], - "tax_date": 1758646523 - }, - "data": { - "processor": { - "id": 4, - "category": "processors", - "reference_abbr": null, - "json": { - "display_name": "AFS Stripe Sandbox", - "active": true, - "mode": "sandbox", - "client_id": "pk_test_51S30kTJTsOSWtcD79lohqmoR82oCRRMoaLXt5Mp3w4IjY8aWe8DryZD9Jn0vjewY9LkrXpSl30WucTAv4Znknr1w00X4vLzqQT", - "client_secret": "sk_test_51S30kTJTsOSWtcD7ax91Gua2pmkx113y769Ce5cKaMzwx9cFUQqB1z8Wzn4o8Yvv9yd80F3YrGUX5czO2q0pW50w007qSsYLrQ", - "service_port": "9967", - "service_end_point": "stripe_checkout", - "processor": "stripe", - "mysql_id": 4, - "nameid": "vCLAgOX2", - "category": "processors" - }, - "date": "2025-08-28 19:51:29" - }, - "manage_domain": { - "access": true, - "Subdomain": "www", - "SystemUser": "appfactorystudio", - "Domain": "appfactory.studio", - "Address": "https://www.appfactory.studio", - "Domain2": "appfactory.studio", - "Address2": "https://www.appfactory.studio", - "CertPrivateKeyLocation": "/etc/letsencrypt/live/www.appfactory.studio/privkey.pem", - "CertPublicKeyLocation": "/etc/letsencrypt/live/www.appfactory.studio/cert.pem", - "CertPrivateKeyLocation2": "/etc/letsencrypt/live/www.appfactory.studio/privkey.pem", - "CertPublicKeyLocation2": "/etc/letsencrypt/live/www.appfactory.studio/cert.pem", - "Username": "appfactorystudio", - "CreatedBy": "www" - }, - "direct_payment": { - "id": 3, - "category": "direct_payments", - "name": "Membership", - "reference_num": "4093-4070-2198-3695", - "processor": "vCLAgOX2", - "type": 1, - "status": 0, - "json": { - "reference_num": "4093-4070-2198-3695", - "display_name": "Membership", - "configuration": { - "payables": { - "processor": "vCLAgOX2" - }, - "recurring": { - "processors": [ - { - "name": "default", - "processor_nameid": "vCLAgOX2", - "subscription_group": "default" - } - ], - "subscriptions": [ - { - "name": "default", - "tiers": [ - { - "name": "member", - "label": "Member", - "lookup_key": "_none_", - "price": "free", - "price_int": 0 - }, - { - "name": "pro", - "label": "Pro", - "lookup_key": "pro_v2", - "price": "15.00", - "price_int": 1500 - }, - { - "name": "business", - "label": "business", - "lookup_key": "business_v2", - "price": "25.00", - "price_int": 2500 - }, - { - "name": "org", - "label": "Organization", - "lookup_key": "organization_v2", - "price": "50.00", - "price_int": 5000 - }, - { - "name": "ent", - "label": "Enterprise", - "lookup_key": "enterprise_v2", - "price": "199.99", - "price_int": 19999 - } - ] - } - ], - "discount_codes": [] - } - }, - "mysql_id": 1 - }, - "date": "2024-12-08 02:46:16", - "_processor": { - "id": 4, - "category": "processors", - "reference_abbr": null, - "json": { - "display_name": "AFS Stripe Sandbox", - "active": true, - "mode": "sandbox", - "client_id": "pk_test_51S30kTJTsOSWtcD79lohqmoR82oCRRMoaLXt5Mp3w4IjY8aWe8DryZD9Jn0vjewY9LkrXpSl30WucTAv4Znknr1w00X4vLzqQT", - "service_port": "9967", - "service_end_point": "stripe_checkout", - "processor": "stripe", - "mysql_id": 4, - "nameid": "vCLAgOX2", - "category": "processors" - }, - "date": "2025-08-28 19:51:29" - } - }, - "config": { - "configuration": { - "processors": [ - { - "id": 4, - "category": "processors", - "reference_abbr": null, - "json": { - "display_name": "AFS Stripe Sandbox", - "active": true, - "mode": "sandbox", - "client_id": "pk_test_51S30kTJTsOSWtcD79lohqmoR82oCRRMoaLXt5Mp3w4IjY8aWe8DryZD9Jn0vjewY9LkrXpSl30WucTAv4Znknr1w00X4vLzqQT", - "client_secret": "sk_test_51S30kTJTsOSWtcD7ax91Gua2pmkx113y769Ce5cKaMzwx9cFUQqB1z8Wzn4o8Yvv9yd80F3YrGUX5czO2q0pW50w007qSsYLrQ", - "service_port": "9967", - "service_end_point": "stripe_checkout", - "processor": "stripe", - "mysql_id": 4, - "nameid": "vCLAgOX2", - "category": "processors" - }, - "date": "2025-08-28 19:51:29" - }, - { - "id": 16, - "category": "processors", - "reference_abbr": "proc", - "json": { - "mysql_id": -1, - "nameid": "v5foXWbX", - "reference_num": "", - "category": "processors", - "processor": "stripe", - "reference_abbr": "proc", - "client_id": "pk_live_51OIu21J7BKlr2pgsmzcGOL7KQxwjTxjsHPcdpnDx4YJ6eNsOgLLNXZentGFhuzUfzynWtyf1veyPvI4EJP5Un3lH00pIgzWkC1", - "client_secret": "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", - "active": false, - "is_my_processor": 0, - "display_name": "Stripe Live", - "service_port": 9930, - "mode": "live", - "service_end_point": "", - "webhooks": [] - }, - "date": "2025-09-20 22:58:14" - } - ] - } - }, - "data": { - "direct_payment": { - "id": 3, - "category": "direct_payments", - "name": "Membership", - "reference_num": "4093-4070-2198-3695", - "processor": "vCLAgOX2", - "type": 1, - "status": 0, - "json": { - "reference_num": "4093-4070-2198-3695", - "display_name": "Membership", - "configuration": { - "payables": { - "processor": "vCLAgOX2" - }, - "recurring": { - "processors": [ - { - "name": "default", - "processor_nameid": "vCLAgOX2", - "subscription_group": "default" - } - ], - "subscriptions": [ - { - "name": "default", - "tiers": [ - { - "name": "member", - "label": "Member", - "lookup_key": "_none_", - "price": "free", - "price_int": 0 - }, - { - "name": "pro", - "label": "Pro", - "lookup_key": "pro_v2", - "price": "15.00", - "price_int": 1500 - }, - { - "name": "business", - "label": "business", - "lookup_key": "business_v2", - "price": "25.00", - "price_int": 2500 - }, - { - "name": "org", - "label": "Organization", - "lookup_key": "organization_v2", - "price": "50.00", - "price_int": 5000 - }, - { - "name": "ent", - "label": "Enterprise", - "lookup_key": "enterprise_v2", - "price": "199.99", - "price_int": 19999 - } - ] - } - ], - "discount_codes": [] - } - }, - "mysql_id": 1 - }, - "date": "2024-12-08 02:46:16", - "_processor": { - "id": 4, - "category": "processors", - "reference_abbr": null, - "json": { - "display_name": "AFS Stripe Sandbox", - "active": true, - "mode": "sandbox", - "client_id": "pk_test_51S30kTJTsOSWtcD79lohqmoR82oCRRMoaLXt5Mp3w4IjY8aWe8DryZD9Jn0vjewY9LkrXpSl30WucTAv4Znknr1w00X4vLzqQT", - "service_port": "9967", - "service_end_point": "stripe_checkout", - "processor": "stripe", - "mysql_id": 4, - "nameid": "vCLAgOX2", - "category": "processors" - }, - "date": "2025-08-28 19:51:29" - } - }, - "customer_created": false, - "payment_intent_created": false, - "payment_method_created": false, - "customer_id": null, - "payment_intent_id": null, - "payment_method_id": null, - "amount": 1500, - "address": { - "line1": "8181 El Mundo St Apt 2404", - "line2": "", - "city": "Houston", - "state": "AL", - "postal_code": "77054", - "country": "US" - } - } - } -} - - -let hello1 = { - "webhook": { - "id": "we_1SAxBFJUS5PVgv235bPWw9cC", - "object": "webhook_endpoint", - "api_version": "2024-06-20", - "application": null, - "created": 1758737561, - "description": null, - "enabled_events": [ - "charge.succeeded", - "invoice_payment.paid", - "invoice.paid", - "invoice.payment_failed", - "invoice.finalized", - "customer.subscription.deleted", - "customer.subscription.paused", - "customer.subscription.resumed", - "customer.subscription.trial_will_end", - "customer.subscription.updated", - "invoice.overdue", - "invoice.upcoming", - "invoice.will_be_due", - "issuing_card.updated", - "issuing_dispute.submitted", - "issuing_dispute.created", - "issuing_dispute.closed", - "issuing_dispute.updated", - "payment_intent.payment_failed", - "payment_intent.succeeded", - "payment_intent.requires_action", - "payment_method.attached", - "payment_method.automatically_updated", - "payment_method.card_automatically_updated", - "payment_method.detached", - "payment_method.updated", - "refund.created", - "refund.failed", - "refund.updated", - "setup_intent.canceled", - "setup_intent.created", - "setup_intent.requires_action", - "setup_intent.succeeded", - "subscription_schedule.aborted", - "subscription_schedule.completed", - "subscription_schedule.expiring", - "charge.failed", - "charge.refunded", - "customer.created", - "payment_intent.created", - "customer.updated", - "customer.subscription.created", - "invoice.created", - "invoice.updated", - "invoice.payment_succeeded", - "customer.discount.created", - "customer.discount.deleted" - ], - "livemode": false, - "metadata": [], - "secret": "whsec_1MpT5gscqJCfXPzoHRW6Aq5fdYWSbZsT", - "status": "enabled", - "url": "https://api.appfactory.studio/v1/modules/stripe/webhook" - }, - "products": [ - { - "product": { - "id": "prod_T7BYOLh5fliMiN", - "object": "product", - "active": true, - "attributes": [], - "created": 1758737559, - "default_price": null, - "description": "Access to all Pro features.", - "images": [], - "livemode": false, - "marketing_features": [], - "metadata": [], - "name": "Pro", - "package_dimensions": null, - "shippable": null, - "statement_descriptor": null, - "tax_code": "txcd_10103101", - "type": "service", - "unit_label": null, - "updated": 1758737559, - "url": null - }, - "price": { - "id": "price_1SAxBDJUS5PVgv23hXUkimzt", - "object": "price", - "active": true, - "billing_scheme": "per_unit", - "created": 1758737559, - "currency": "usd", - "custom_unit_amount": null, - "livemode": false, - "lookup_key": "pro_v2", - "metadata": [], - "nickname": null, - "product": "prod_T7BYOLh5fliMiN", - "recurring": { - "interval": "month", - "interval_count": 1, - "meter": null, - "trial_period_days": null, - "usage_type": "licensed" - }, - "tax_behavior": "exclusive", - "tiers_mode": null, - "transform_quantity": null, - "type": "recurring", - "unit_amount": 1500, - "unit_amount_decimal": "1500" - } - }, - { - "product": { - "id": "prod_T7BY1xREDaXzhu", - "object": "product", - "active": true, - "attributes": [], - "created": 1758737560, - "default_price": null, - "description": "Access to all Pro features.", - "images": [], - "livemode": false, - "marketing_features": [], - "metadata": [], - "name": "Business", - "package_dimensions": null, - "shippable": null, - "statement_descriptor": null, - "tax_code": "txcd_10103101", - "type": "service", - "unit_label": null, - "updated": 1758737560, - "url": null - }, - "price": { - "id": "price_1SAxBEJUS5PVgv237rv2zXFi", - "object": "price", - "active": true, - "billing_scheme": "per_unit", - "created": 1758737560, - "currency": "usd", - "custom_unit_amount": null, - "livemode": false, - "lookup_key": "business_v2", - "metadata": [], - "nickname": null, - "product": "prod_T7BY1xREDaXzhu", - "recurring": { - "interval": "month", - "interval_count": 1, - "meter": null, - "trial_period_days": null, - "usage_type": "licensed" - }, - "tax_behavior": "exclusive", - "tiers_mode": null, - "transform_quantity": null, - "type": "recurring", - "unit_amount": 2500, - "unit_amount_decimal": "2500" - } - }, - { - "product": { - "id": "prod_T7BYxkIrQ9cfEd", - "object": "product", - "active": true, - "attributes": [], - "created": 1758737560, - "default_price": null, - "description": "Access to all Pro features.", - "images": [], - "livemode": false, - "marketing_features": [], - "metadata": [], - "name": "Orginazation", - "package_dimensions": null, - "shippable": null, - "statement_descriptor": null, - "tax_code": "txcd_10103101", - "type": "service", - "unit_label": null, - "updated": 1758737560, - "url": null - }, - "price": { - "id": "price_1SAxBEJUS5PVgv23h4gbPP5t", - "object": "price", - "active": true, - "billing_scheme": "per_unit", - "created": 1758737560, - "currency": "usd", - "custom_unit_amount": null, - "livemode": false, - "lookup_key": "orginazation_v2", - "metadata": [], - "nickname": null, - "product": "prod_T7BYxkIrQ9cfEd", - "recurring": { - "interval": "month", - "interval_count": 1, - "meter": null, - "trial_period_days": null, - "usage_type": "licensed" - }, - "tax_behavior": "exclusive", - "tiers_mode": null, - "transform_quantity": null, - "type": "recurring", - "unit_amount": 5000, - "unit_amount_decimal": "5000" - } - }, - { - "product": { - "id": "prod_T7BYcKqgUYZexx", - "object": "product", - "active": true, - "attributes": [], - "created": 1758737561, - "default_price": null, - "description": "Access to all Pro features.", - "images": [], - "livemode": false, - "marketing_features": [], - "metadata": [], - "name": "Enterprise", - "package_dimensions": null, - "shippable": null, - "statement_descriptor": null, - "tax_code": "txcd_10103101", - "type": "service", - "unit_label": null, - "updated": 1758737561, - "url": null - }, - "price": { - "id": "price_1SAxBFJUS5PVgv23atgSVKR6", - "object": "price", - "active": true, - "billing_scheme": "per_unit", - "created": 1758737561, - "currency": "usd", - "custom_unit_amount": null, - "livemode": false, - "lookup_key": "enterprise_v2", - "metadata": [], - "nickname": null, - "product": "prod_T7BYcKqgUYZexx", - "recurring": { - "interval": "month", - "interval_count": 1, - "meter": null, - "trial_period_days": null, - "usage_type": "licensed" - }, - "tax_behavior": "exclusive", - "tiers_mode": null, - "transform_quantity": null, - "type": "recurring", - "unit_amount": 20000, - "unit_amount_decimal": "20000" - } - } - ] -} - -let hello2 = { - "label_price": 15, - "transactions": { - "stripe": { - "price": { - "id": "price_1SAxBDJUS5PVgv23hXUkimzt", - "object": "price", - "active": true, - "billing_scheme": "per_unit", - "created": 1758737559, - "currency": "usd", - "custom_unit_amount": null, - "livemode": false, - "lookup_key": "pro_v2", - "metadata": [], - "nickname": null, - "product": "prod_T7BYOLh5fliMiN", - "recurring": { - "aggregate_usage": null, - "interval": "month", - "interval_count": 1, - "meter": null, - "trial_period_days": null, - "usage_type": "licensed" - }, - "tax_behavior": "exclusive", - "tiers_mode": null, - "transform_quantity": null, - "type": "recurring", - "unit_amount": 1500, - "unit_amount_decimal": "1500" - }, - "customer": { - "id": "cus_T7JDuu8PVHzl8B", - "object": "customer", - "address": { - "city": "Houston", - "country": "US", - "line1": "7112 Goforth Street", - "line2": "", - "postal_code": "77021", - "state": "TX" - }, - "balance": 0, - "created": 1758766099, - "currency": null, - "default_source": null, - "delinquent": false, - "description": "Updated customer", - "discount": null, - "email": "james1@appfactory.studio", - "invoice_prefix": "BWTP1ZLP", - "invoice_settings": { - "custom_fields": null, - "default_payment_method": null, - "footer": null, - "rendering_options": null - }, - "livemode": false, - "metadata": [], - "name": "James Mitchell", - "next_invoice_sequence": 1, - "phone": null, - "preferred_locales": [], - "shipping": null, - "tax_exempt": "none", - "test_clock": null - }, - "subscription": { - "id": "sub_1SB4cHJUS5PVgv23qtwYInHy", - "object": "subscription", - "application": null, - "application_fee_percent": null, - "automatic_tax": { - "disabled_reason": null, - "enabled": true, - "liability": { - "type": "self" - } - }, - "billing_cycle_anchor": 1758766145, - "billing_cycle_anchor_config": null, - "billing_mode": { - "flexible": null, - "type": "classic" - }, - "billing_thresholds": null, - "cancel_at": null, - "cancel_at_period_end": false, - "canceled_at": null, - "cancellation_details": { - "comment": null, - "feedback": null, - "reason": null - }, - "collection_method": "charge_automatically", - "created": 1758766145, - "currency": "usd", - "current_period_end": 1761358145, - "current_period_start": 1758766145, - "customer": "cus_T7JDuu8PVHzl8B", - "days_until_due": null, - "default_payment_method": null, - "default_source": null, - "default_tax_rates": [], - "description": null, - "discount": null, - "discounts": [], - "ended_at": null, - "invoice_settings": { - "account_tax_ids": null, - "issuer": { - "type": "self" - } - }, - "items": { - "object": "list", - "data": [ - { - "id": "si_T7JEqr83fikzyt", - "object": "subscription_item", - "billing_thresholds": null, - "created": 1758766146, - "current_period_end": 1761358145, - "current_period_start": 1758766145, - "discounts": [], - "metadata": [], - "plan": { - "id": "price_1SAxBDJUS5PVgv23hXUkimzt", - "object": "plan", - "active": true, - "aggregate_usage": null, - "amount": 1500, - "amount_decimal": "1500", - "billing_scheme": "per_unit", - "created": 1758737559, - "currency": "usd", - "interval": "month", - "interval_count": 1, - "livemode": false, - "metadata": [], - "meter": null, - "nickname": null, - "product": "prod_T7BYOLh5fliMiN", - "tiers_mode": null, - "transform_usage": null, - "trial_period_days": null, - "usage_type": "licensed" - }, - "price": { - "id": "price_1SAxBDJUS5PVgv23hXUkimzt", - "object": "price", - "active": true, - "billing_scheme": "per_unit", - "created": 1758737559, - "currency": "usd", - "custom_unit_amount": null, - "livemode": false, - "lookup_key": "pro_v2", - "metadata": [], - "nickname": null, - "product": "prod_T7BYOLh5fliMiN", - "recurring": { - "aggregate_usage": null, - "interval": "month", - "interval_count": 1, - "meter": null, - "trial_period_days": null, - "usage_type": "licensed" - }, - "tax_behavior": "exclusive", - "tiers_mode": null, - "transform_quantity": null, - "type": "recurring", - "unit_amount": 1500, - "unit_amount_decimal": "1500" - }, - "quantity": 1, - "subscription": "sub_1SB4cHJUS5PVgv23qtwYInHy", - "tax_rates": [] - } - ], - "has_more": false, - "total_count": 1, - "url": "/v1/subscription_items?subscription=sub_1SB4cHJUS5PVgv23qtwYInHy" - }, - "latest_invoice": { - "id": "in_1SB4cIJUS5PVgv23bhWwxf0M", - "object": "invoice", - "account_country": "US", - "account_name": "Test Live 001", - "account_tax_ids": null, - "amount_due": 1599, - "amount_overpaid": 0, - "amount_paid": 0, - "amount_remaining": 1599, - "amount_shipping": 0, - "application": null, - "application_fee_amount": null, - "attempt_count": 0, - "attempted": false, - "auto_advance": false, - "automatic_tax": { - "disabled_reason": null, - "enabled": true, - "liability": { - "type": "self" - }, - "provider": "stripe", - "status": "complete" - }, - "automatically_finalizes_at": null, - "billing_reason": "subscription_create", - "charge": null, - "collection_method": "charge_automatically", - "created": 1758766146, - "currency": "usd", - "custom_fields": null, - "customer": "cus_T7JDuu8PVHzl8B", - "customer_address": { - "city": "Houston", - "country": "US", - "line1": "7112 Goforth Street", - "line2": "", - "postal_code": "77021", - "state": "TX" - }, - "customer_email": "james1@appfactory.studio", - "customer_name": "James Mitchell", - "customer_phone": null, - "customer_shipping": null, - "customer_tax_exempt": "none", - "customer_tax_ids": [], - "default_payment_method": null, - "default_source": null, - "default_tax_rates": [], - "description": null, - "discount": null, - "discounts": [], - "due_date": null, - "effective_at": 1758766146, - "ending_balance": 0, - "footer": null, - "from_invoice": null, - "hosted_invoice_url": "https://invoice.stripe.com/i/acct_1SAx9EJUS5PVgv23/test_YWNjdF8xU0F4OUVKVVM1UFZndjIzLF9UN0pFMjJqYzFDZmpHTDd3SnJOaThxVFpiQUdhNXZ3LDE0OTMwNjk0Nw0200KSQCM5Hc?s=ap", - "invoice_pdf": "https://pay.stripe.com/invoice/acct_1SAx9EJUS5PVgv23/test_YWNjdF8xU0F4OUVKVVM1UFZndjIzLF9UN0pFMjJqYzFDZmpHTDd3SnJOaThxVFpiQUdhNXZ3LDE0OTMwNjk0Nw0200KSQCM5Hc/pdf?s=ap", - "issuer": { - "type": "self" - }, - "last_finalization_error": null, - "latest_revision": null, - "lines": { - "object": "list", - "data": [ - { - "id": "il_1SB4cIJUS5PVgv239f816ZAG", - "object": "line_item", - "amount": 1500, - "amount_excluding_tax": 1500, - "currency": "usd", - "description": "1 × Pro (at $15.00 / month)", - "discount_amounts": [], - "discountable": true, - "discounts": [], - "invoice": "in_1SB4cIJUS5PVgv23bhWwxf0M", - "livemode": false, - "metadata": [], - "parent": { - "invoice_item_details": null, - "subscription_item_details": { - "invoice_item": null, - "proration": false, - "proration_details": { - "credited_items": null - }, - "subscription": "sub_1SB4cHJUS5PVgv23qtwYInHy", - "subscription_item": "si_T7JEqr83fikzyt" - }, - "type": "subscription_item_details" - }, - "period": { - "end": 1761358145, - "start": 1758766145 - }, - "plan": { - "id": "price_1SAxBDJUS5PVgv23hXUkimzt", - "object": "plan", - "active": true, - "aggregate_usage": null, - "amount": 1500, - "amount_decimal": "1500", - "billing_scheme": "per_unit", - "created": 1758737559, - "currency": "usd", - "interval": "month", - "interval_count": 1, - "livemode": false, - "metadata": [], - "meter": null, - "nickname": null, - "product": "prod_T7BYOLh5fliMiN", - "tiers_mode": null, - "transform_usage": null, - "trial_period_days": null, - "usage_type": "licensed" - }, - "pretax_credit_amounts": [], - "price": { - "id": "price_1SAxBDJUS5PVgv23hXUkimzt", - "object": "price", - "active": true, - "billing_scheme": "per_unit", - "created": 1758737559, - "currency": "usd", - "custom_unit_amount": null, - "livemode": false, - "lookup_key": "pro_v2", - "metadata": [], - "nickname": null, - "product": "prod_T7BYOLh5fliMiN", - "recurring": { - "aggregate_usage": null, - "interval": "month", - "interval_count": 1, - "meter": null, - "trial_period_days": null, - "usage_type": "licensed" - }, - "tax_behavior": "exclusive", - "tiers_mode": null, - "transform_quantity": null, - "type": "recurring", - "unit_amount": 1500, - "unit_amount_decimal": "1500" - }, - "pricing": { - "price_details": { - "price": "price_1SAxBDJUS5PVgv23hXUkimzt", - "product": "prod_T7BYOLh5fliMiN" - }, - "type": "price_details", - "unit_amount_decimal": "1500" - }, - "proration": false, - "proration_details": { - "credited_items": null - }, - "quantity": 1, - "subscription": "sub_1SB4cHJUS5PVgv23qtwYInHy", - "subscription_item": "si_T7JEqr83fikzyt", - "tax_amounts": [ - { - "amount": 99, - "inclusive": false, - "tax_rate": "txr_1SAyh2JUS5PVgv23GgtdXi0r", - "taxability_reason": "taxable_basis_reduced", - "taxable_amount": 1200 - } - ], - "tax_rates": [], - "taxes": [ - { - "amount": 99, - "tax_behavior": "exclusive", - "tax_rate_details": { - "tax_rate": "txr_1SAyh2JUS5PVgv23GgtdXi0r" - }, - "taxability_reason": "taxable_basis_reduced", - "taxable_amount": 1200, - "type": "tax_rate_details" - } - ], - "type": "subscription", - "unit_amount_excluding_tax": "1500" - } - ], - "has_more": false, - "total_count": 1, - "url": "/v1/invoices/in_1SB4cIJUS5PVgv23bhWwxf0M/lines" - }, - "livemode": false, - "metadata": [], - "next_payment_attempt": null, - "number": "BWTP1ZLP-0001", - "on_behalf_of": null, - "paid": false, - "paid_out_of_band": false, - "parent": { - "quote_details": null, - "subscription_details": { - "metadata": [], - "subscription": "sub_1SB4cHJUS5PVgv23qtwYInHy" - }, - "type": "subscription_details" - }, - "payment_intent": { - "id": "pi_3SB4cIJUS5PVgv230LxlPB7x", - "object": "payment_intent", - "amount": 1599, - "amount_capturable": 0, - "amount_details": { - "tip": [] - }, - "amount_received": 0, - "application": null, - "application_fee_amount": null, - "automatic_payment_methods": null, - "canceled_at": null, - "cancellation_reason": null, - "capture_method": "automatic", - "charges": { - "object": "list", - "data": [], - "has_more": false, - "total_count": 0, - "url": "/v1/charges?payment_intent=pi_3SB4cIJUS5PVgv230LxlPB7x" - }, - "client_secret": "pi_3SB4cIJUS5PVgv230LxlPB7x_secret_pZSCnOpOSpSCu4t9nUa3FZTSG", - "confirmation_method": "automatic", - "created": 1758766146, - "currency": "usd", - "customer": "cus_T7JDuu8PVHzl8B", - "description": "Subscription creation", - "excluded_payment_method_types": null, - "invoice": "in_1SB4cIJUS5PVgv23bhWwxf0M", - "last_payment_error": null, - "latest_charge": null, - "livemode": false, - "metadata": [], - "next_action": null, - "on_behalf_of": null, - "payment_method": null, - "payment_method_configuration_details": null, - "payment_method_options": { - "card": { - "installments": null, - "mandate_options": null, - "network": null, - "request_three_d_secure": "automatic" - }, - "cashapp": [], - "klarna": { - "preferred_locale": null - }, - "link": { - "persistent_token": null - } - }, - "payment_method_types": [ - "card", - "cashapp", - "klarna", - "link" - ], - "processing": null, - "receipt_email": null, - "review": null, - "setup_future_usage": "off_session", - "shipping": null, - "source": null, - "statement_descriptor": null, - "statement_descriptor_suffix": null, - "status": "requires_payment_method", - "transfer_data": null, - "transfer_group": null - }, - "payment_settings": { - "default_mandate": null, - "payment_method_options": null, - "payment_method_types": null - }, - "period_end": 1758766145, - "period_start": 1758766145, - "post_payment_credit_notes_amount": 0, - "pre_payment_credit_notes_amount": 0, - "quote": null, - "receipt_number": null, - "rendering": null, - "rendering_options": null, - "shipping_cost": null, - "shipping_details": null, - "starting_balance": 0, - "statement_descriptor": null, - "status": "open", - "status_transitions": { - "finalized_at": 1758766146, - "marked_uncollectible_at": null, - "paid_at": null, - "voided_at": null - }, - "subscription": "sub_1SB4cHJUS5PVgv23qtwYInHy", - "subscription_details": { - "metadata": [] - }, - "subtotal": 1500, - "subtotal_excluding_tax": 1500, - "tax": 99, - "test_clock": null, - "total": 1599, - "total_discount_amounts": [], - "total_excluding_tax": 1500, - "total_pretax_credit_amounts": [], - "total_tax_amounts": [ - { - "amount": 99, - "inclusive": false, - "tax_rate": "txr_1SAyh2JUS5PVgv23GgtdXi0r", - "taxability_reason": "taxable_basis_reduced", - "taxable_amount": 1200 - } - ], - "total_taxes": [ - { - "amount": 99, - "tax_behavior": "exclusive", - "tax_rate_details": { - "tax_rate": "txr_1SAyh2JUS5PVgv23GgtdXi0r" - }, - "taxability_reason": "taxable_basis_reduced", - "taxable_amount": 1200, - "type": "tax_rate_details" - } - ], - "transfer_data": null, - "webhooks_delivered_at": null - }, - "livemode": false, - "metadata": [], - "next_pending_invoice_item_invoice": null, - "on_behalf_of": null, - "pause_collection": null, - "payment_settings": { - "payment_method_options": null, - "payment_method_types": null, - "save_default_payment_method": "off" - }, - "pending_invoice_item_interval": null, - "pending_setup_intent": null, - "pending_update": null, - "plan": { - "id": "price_1SAxBDJUS5PVgv23hXUkimzt", - "object": "plan", - "active": true, - "aggregate_usage": null, - "amount": 1500, - "amount_decimal": "1500", - "billing_scheme": "per_unit", - "created": 1758737559, - "currency": "usd", - "interval": "month", - "interval_count": 1, - "livemode": false, - "metadata": [], - "meter": null, - "nickname": null, - "product": "prod_T7BYOLh5fliMiN", - "tiers_mode": null, - "transform_usage": null, - "trial_period_days": null, - "usage_type": "licensed" - }, - "quantity": 1, - "schedule": null, - "start_date": 1758766145, - "status": "incomplete", - "test_clock": null, - "transfer_data": null, - "trial_end": null, - "trial_settings": { - "end_behavior": { - "missing_payment_method": "create_invoice" - } - }, - "trial_start": null - }, - "payment_intent": { - "id": "pi_3SB4cIJUS5PVgv230LxlPB7x", - "object": "payment_intent", - "amount": 1599, - "amount_capturable": 0, - "amount_details": { - "tip": [] - }, - "amount_received": 0, - "application": null, - "application_fee_amount": null, - "automatic_payment_methods": null, - "canceled_at": null, - "cancellation_reason": null, - "capture_method": "automatic", - "charges": { - "object": "list", - "data": [], - "has_more": false, - "total_count": 0, - "url": "/v1/charges?payment_intent=pi_3SB4cIJUS5PVgv230LxlPB7x" - }, - "client_secret": "pi_3SB4cIJUS5PVgv230LxlPB7x_secret_pZSCnOpOSpSCu4t9nUa3FZTSG", - "confirmation_method": "automatic", - "created": 1758766146, - "currency": "usd", - "customer": "cus_T7JDuu8PVHzl8B", - "description": "Subscription creation", - "excluded_payment_method_types": null, - "invoice": "in_1SB4cIJUS5PVgv23bhWwxf0M", - "last_payment_error": null, - "latest_charge": null, - "livemode": false, - "metadata": [], - "next_action": null, - "on_behalf_of": null, - "payment_method": null, - "payment_method_configuration_details": null, - "payment_method_options": { - "card": { - "installments": null, - "mandate_options": null, - "network": null, - "request_three_d_secure": "automatic" - }, - "cashapp": [], - "klarna": { - "preferred_locale": null - }, - "link": { - "persistent_token": null - } - }, - "payment_method_types": [ - "card", - "cashapp", - "klarna", - "link" - ], - "processing": null, - "receipt_email": null, - "review": null, - "setup_future_usage": "off_session", - "shipping": null, - "source": null, - "statement_descriptor": null, - "statement_descriptor_suffix": null, - "status": "requires_payment_method", - "transfer_data": null, - "transfer_group": null - } - } - }, - "archive": { - "processor": { - "name": "stripe", - "_meta": { - "template_version": 0 - }, - "fixtures": [ - { - "name": "pro_v2", - "path": "/v1/products", - "method": "post", - "params": { - "name": "Personal" - } - }, - { - "name": "pro_v2", - "path": "/v1/prices", - "method": "post", - "params": { - "product": "${pro_v2:id}", - "lookup_key": "pro_v2", - "currency": "usd", - "unit_amount": 1500, - "recurring": { - "interval": "month" - }, - "metadata": { - "sample": "fixed-price" - } - } - }, - { - "name": "business_v2", - "path": "/v1/products", - "method": "post", - "params": { - "name": "Business" - } - }, - { - "name": "business_v2", - "path": "/v1/prices", - "method": "post", - "params": { - "product": "${business_v2:id}", - "lookup_key": "business_v2", - "currency": "usd", - "unit_amount": 2500, - "recurring": { - "interval": "month" - }, - "metadata": { - "sample": "fixed-price" - } - } - }, - { - "name": "organization_v2", - "path": "/v1/products", - "method": "post", - "params": { - "name": "Organization" - } - }, - { - "name": "organization_v2", - "path": "/v1/prices", - "method": "post", - "params": { - "product": "${organization_v2:id}", - "lookup_key": "organization_v2", - "currency": "usd", - "unit_amount": 5000, - "recurring": { - "interval": "month" - }, - "metadata": { - "sample": "fixed-price" - } - } - }, - { - "name": "enterprise_v2", - "path": "/v1/products", - "method": "post", - "params": { - "name": "Enterprise" - } - }, - { - "name": "enterprise_price", - "path": "/v1/prices", - "method": "post", - "params": { - "product": "${enterprise_v2:id}", - "lookup_key": "enterprise_v2", - "currency": "usd", - "unit_amount": 20000, - "recurring": { - "interval": "month" - }, - "metadata": { - "sample": "fixed-price" - } - } - } - ], - "prices": [ - { - "id": "member_website" - } - ] - }, - "features": { - "environments": { - "models": [ - { - "id": "production", - "name": "Production" - }, - { - "id": "preview", - "name": "Preview Beta" - }, - { - "id": "development", - "name": "Development" - } - ] - }, - "models": [ - { - "name": "domains", - "active": true, - "environments": [ - { - "id": "production", - "active": true - }, - { - "id": "development", - "active": true - }, - { - "id": "preview", - "active": true - } - ] - }, - { - "name": "applications", - "active": true, - "environments": [ - { - "id": "production", - "active": true - }, - { - "id": "development", - "active": true - }, - { - "id": "preview", - "active": true - } - ] - }, - { - "name": "commerce", - "active": false, - "environments": [ - { - "id": "production", - "active": true - }, - { - "id": "development", - "active": true - }, - { - "id": "preview", - "active": true - } - ] - }, - { - "name": "coord", - "active": true, - "environments": [ - { - "id": "production", - "active": true - }, - { - "id": "development", - "active": true - }, - { - "id": "preview", - "active": true - } - ] - }, - { - "name": "notes", - "active": true, - "environments": [ - { - "id": "production", - "active": true - }, - { - "id": "development", - "active": true - }, - { - "id": "preview", - "active": true - } - ] - }, - { - "name": "settings", - "active": false, - "environments": [ - { - "id": "production", - "active": true - }, - { - "id": "development", - "active": true - }, - { - "id": "preview", - "active": true - } - ] - }, - { - "name": "account", - "active": true, - "environments": [ - { - "id": "production", - "active": true - }, - { - "id": "development", - "active": true - }, - { - "id": "preview", - "active": true - } - ] - } - ] - }, - "catalog": { - "archive": { - "status": 1, - "addons": { - "items": [ - { - "id": "", - "count": 0, - "_reciept": [] - } - ] - }, - "templates": { - "domain": { - "id": "", - "modules": { - "email": { - "count": 0, - "send": 0 - }, - "storage": { - "count": 0 - }, - "processors": { - "count": 0 - }, - "forms": { - "count": 0 - }, - "sponsorships": { - "count": 0 - }, - "events": { - "count": 0 - }, - "contacts": { - "count": 0 - } - } - } - }, - "alloc": { - "websites": { - "hosting": { - "count": 0 - } - }, - "voip": { - "number": { - "count": 0 - } - }, - "storage": { - "number": { - "count": 0 - } - }, - "domains": [] - } - }, - "registry": { - "alloc": { - "members": { - "allocation": [ - 1, - 1, - 3, - 5, - 10 - ], - "modules": { - "storage": { - "allocation": 100, - "memberships": [ - { - "size": 2000, - "amount": 1, - "count": 0 - }, - { - "size": 2000, - "amount": 1, - "count": 0 - }, - { - "size": 5000, - "amount": 1, - "count": 0 - }, - { - "size": 25000, - "amount": 1, - "count": 0 - }, - { - "size": -1, - "amount": 1, - "count": 0 - } - ] - }, - "websites": { - "allocation": 100, - "memberships": [ - { - "amount": 1, - "count": 0 - }, - { - "amount": 1, - "count": 0 - }, - { - "amount": 3, - "count": 0 - }, - { - "amount": 5, - "count": 0 - }, - { - "amount": 10, - "count": 0 - } - ] - } - } - }, - "websites": { - "allocation": [ - 1, - 1, - 3, - 5, - 10 - ], - "modules": { - "hosting": { - "allocation": 100, - "memberships": [ - { - "count": 1 - }, - { - "count": 2 - }, - { - "count": 5 - }, - { - "count": 15 - }, - { - "count": 50 - } - ] - } - } - }, - "voip": { - "allocation": [ - 1, - 1, - 3, - 5, - 10 - ], - "modules": { - "phone_number": { - "allocation": 100, - "memberships": [ - { - "amount": 1, - "count": 0, - "send": "100,1m" - }, - { - "amount": 1, - "count": 0, - "send": "200,30" - }, - { - "amount": 5, - "count": 0, - "send": "300,30" - }, - { - "amount": 25, - "count": 0, - "send": "400,30" - }, - { - "amount": -1, - "count": 0, - "send": "500,30" - } - ] - } - } - }, - "domains": { - "allocation": [ - 1, - 1, - 3, - 5, - 10 - ], - "modules": { - "email": { - "allocation": 100, - "memberships": [ - { - "amount": 1, - "count": 0, - "send": "100,1m" - }, - { - "amount": 1, - "count": 0, - "send": "200,30" - }, - { - "amount": 5, - "count": 0, - "send": "300,30" - }, - { - "amount": 25, - "count": 0, - "send": "400,30" - }, - { - "amount": -1, - "count": 0, - "send": "500,30" - } - ] - }, - "storage": { - "allocation": 100, - "memberships": [ - { - "size": 2000 - }, - { - "size": 2000 - }, - { - "size": 5000 - }, - { - "size": 25000 - }, - { - "size": -1 - } - ] - }, - "processors": { - "allocation": 100, - "memberships": [ - { - "count": 1 - }, - { - "count": 2 - }, - { - "count": 5 - }, - { - "count": 15 - }, - { - "count": 50 - } - ] - }, - "forms": { - "allocation": 100, - "memberships": [ - { - "count": 10 - }, - { - "count": 25 - }, - { - "count": 500 - }, - { - "count": 5000 - }, - { - "count": 10000 - } - ] - }, - "sponsorships": { - "allocation": 100, - "memberships": [ - { - "count": 1 - }, - { - "count": 3 - }, - { - "count": 5 - }, - { - "count": 15 - }, - { - "count": 50 - } - ] - }, - "events": { - "allocation": 100, - "memberships": [ - { - "count": 1 - }, - { - "count": 2 - }, - { - "count": 5 - }, - { - "count": 15 - }, - { - "count": 50 - } - ] - }, - "contacts": { - "allocation": 100, - "memberships": [ - { - "count": 1 - }, - { - "count": 5 - }, - { - "count": 50 - }, - { - "count": 100 - }, - { - "count": 500 - } - ] - } - } - }, - "coordinator": [], - "commerce": [], - "dreamgraph": [], - "notes": [] - }, - "addons": { - "items": [ - { - "id": "website", - "price": "member_website", - "quantity": 1, - "description": "Adds the ability to create another website", - "reject": { - "status": [ - 2 - ], - "own": [ - 5, - 50, - 100 - ] - } - }, - { - "id": "phone_number", - "price": "phone_number", - "quantity": 1, - "description": "Adds the ability to create a voip telephone number", - "reject": { - "status": [] - } - }, - { - "id": "domain_name", - "price": "domain_name", - "quantity": 1, - "description": "Purchase a domain name i.e. example.com", - "reject": { - "status": [] - } - } - ] - } - } - }, - "authority": { - "member": { - "admin": { - "company": { - "create:any": [ - "*" - ], - "read:any": [ - "*" - ], - "update:any": [ - "*" - ], - "delete:any": [ - "*" - ] - }, - "brand": { - "create:any": [ - "*" - ], - "read:any": [ - "*" - ], - "update:any": [ - "*" - ], - "delete:any": [ - "*" - ] - }, - "social_media_links": { - "create:any": [ - "*" - ], - "read:any": [ - "*" - ], - "update:any": [ - "*" - ], - "delete:any": [ - "*" - ] - }, - "dashboard_label": { - "create:any": [ - "*" - ], - "read:any": [ - "*" - ], - "update:any": [ - "*" - ], - "delete:any": [ - "*" - ] - }, - "module_email": { - "create:any": [ - "*" - ], - "read:any": [ - "*" - ], - "update:any": [ - "*" - ], - "delete:any": [ - "*" - ] - }, - "module_forms": { - "create:any": [ - "*" - ], - "read:any": [ - "*" - ], - "update:any": [ - "*" - ], - "delete:any": [ - "*" - ] - }, - "module_payments": { - "create:any": [ - "*" - ], - "read:any": [ - "*" - ], - "update:any": [ - "*" - ], - "delete:any": [ - "*" - ] - }, - "module_subscribers": { - "create:any": [ - "*" - ], - "read:any": [ - "*" - ], - "update:any": [ - "*" - ], - "delete:any": [ - "*" - ] - }, - "module_contactus": { - "create:any": [ - "*" - ], - "read:any": [ - "*" - ], - "update:any": [ - "*" - ], - "delete:any": [ - "*" - ] - }, - "module_sponsorship": { - "create:any": [ - "*" - ], - "read:any": [ - "*" - ], - "update:any": [ - "*" - ], - "delete:any": [ - "*" - ] - }, - "module_events": { - "create:any": [ - "*" - ], - "read:any": [ - "*" - ], - "update:any": [ - "*" - ], - "delete:any": [ - "*" - ] - }, - "module_list": { - "create:any": [ - "*" - ], - "read:any": [ - "*" - ], - "update:any": [ - "*" - ], - "delete:any": [ - "*" - ] - } - }, - "user": { - "brand": { - "create:any": [ - "*" - ], - "read:any": [ - "*" - ], - "update:any": [ - "*" - ], - "delete:any": [ - "*" - ] - } - } - }, - "domain": { - "admin": { - "company": { - "create:any": [ - "*" - ], - "read:any": [ - "*" - ], - "update:any": [ - "*" - ], - "delete:any": [ - "*" - ] - }, - "brand": { - "create:any": [ - "*" - ], - "read:any": [ - "*" - ], - "update:any": [ - "*" - ], - "delete:any": [ - "*" - ] - }, - "social_media_links": { - "create:any": [ - "*" - ], - "read:any": [ - "*" - ], - "update:any": [ - "*" - ], - "delete:any": [ - "*" - ] - }, - "dashboard_label": { - "create:any": [ - "*" - ], - "read:any": [ - "*" - ], - "update:any": [ - "*" - ], - "delete:any": [ - "*" - ] - }, - "module_email": { - "create:any": [ - "*" - ], - "read:any": [ - "*" - ], - "update:any": [ - "*" - ], - "delete:any": [ - "*" - ] - }, - "module_forms": { - "create:any": [ - "*" - ], - "read:any": [ - "*" - ], - "update:any": [ - "*" - ], - "delete:any": [ - "*" - ] - }, - "module_payments": { - "create:any": [ - "*" - ], - "read:any": [ - "*" - ], - "update:any": [ - "*" - ], - "delete:any": [ - "*" - ] - }, - "module_subscribers": { - "create:any": [ - "*" - ], - "read:any": [ - "*" - ], - "update:any": [ - "*" - ], - "delete:any": [ - "*" - ] - }, - "module_contactus": { - "create:any": [ - "*" - ], - "read:any": [ - "*" - ], - "update:any": [ - "*" - ], - "delete:any": [ - "*" - ] - }, - "module_sponsorship": { - "create:any": [ - "*" - ], - "read:any": [ - "*" - ], - "update:any": [ - "*" - ], - "delete:any": [ - "*" - ] - }, - "module_events": { - "create:any": [ - "*" - ], - "read:any": [ - "*" - ], - "update:any": [ - "*" - ], - "delete:any": [ - "*" - ] - }, - "module_list": { - "create:any": [ - "*" - ], - "read:any": [ - "*" - ], - "update:any": [ - "*" - ], - "delete:any": [ - "*" - ] - } - }, - "user": { - "brand": { - "create:any": [ - "*" - ], - "read:any": [ - "*" - ], - "update:any": [ - "*" - ], - "delete:any": [ - "*" - ] - } - } - } - }, - "integrations": { - "email": { - "mysql_id": 1, - "category": "email_module", - "nameid": "default", - "accounts": [ - { - "username": "no-reply", - "type:": 1 - } - ], - "active_integration": "sendgrid", - "_integration_default": { - "name": "appfactory_studio", - "label": "Appfactory Studio", - "domain": "", - "server": "", - "key": "", - "secret": "" - }, - "integrations": [ - { - "name": "appfactory_studio", - "label": "Appfactory Studio", - "domain": "", - "server": "", - "key": "", - "secret": "", - "active": false - }, - { - "name": "sendgrid", - "label": "SendGrid", - "domain": "appfactory.studio", - "server": "server1.appfactory.studio", - "key": "", - "secret": "", - "active": true - }, - { - "name": "amazon_ses", - "label": "Amazon SES", - "domain": "", - "server": "", - "key": "", - "secret": "", - "active": false - }, - { - "name": "mailgun", - "label": "MailGun", - "domain": "", - "server": "", - "key": "", - "secret": "", - "active": false - }, - { - "name": "mailchimp", - "label": "MailChimp", - "domain": "", - "server": "", - "key": "", - "secret": "", - "active": false - } - ] - } - }, - "consts": { - "ADD_DOMAIN": "ADD_DOMAIN" - }, - "notifications": { - "messages": [ - "" - ] - }, - "pricing_table": { - "dividers": [ - { - "name": "domain", - "label": "Domain Website", - "description": "The number of websites that can be deployed" - }, - { - "name": "pm", - "label": "Project Manager", - "description": "" - }, - { - "name": "notes", - "label": "Notes", - "description": "" - }, - { - "name": "graph", - "label": "DreamGraph", - "description": "" - }, - { - "name": "commerce", - "label": "Commerce", - "description": "" - } - ], - "levels": [ - { - "fixture_name": "free", - "description": [ - { - "divider": "domain", - "options": [ - { - "name": "storage", - "value": "2G", - "description": "" - }, - { - "name": "payments", - "value": "check", - "description": "" - }, - { - "name": "forms", - "value": "check", - "description": "" - }, - { - "name": "subscriber", - "value": "check", - "description": "" - }, - { - "name": "events", - "value": "check", - "description": "" - }, - { - "name": "sponsorships", - "value": "check", - "description": "" - } - ] - } - ] - }, - [], - { - "header_label": "Professional", - "price_label": "$25", - "description": [] - }, - { - "header_label": "Orginazation", - "price_label": "$50", - "description": [] - }, - { - "header_label": "Enterprise", - "price_label": "$199", - "description": [] - } - ], - "features_description": [ - { - "divider": "domain", - "name": "storage", - "label": "Storage", - "description": "" - }, - { - "divider": "domain", - "name": "forms", - "label": "Forms", - "description": "" - }, - { - "divider": "domain", - "name": "payments", - "label": "Stripe & PayPal Integration", - "description": "" - }, - { - "divider": "domain", - "name": "subscriber", - "label": "Subscriber", - "description": "" - }, - { - "divider": "domain", - "name": "events", - "label": "Events", - "description": "" - }, - { - "divider": "domain", - "name": "sponsorships", - "label": "Sponsorships", - "description": "" - }, - { - "divider": 9, - "name": "storage", - "label": "Storage", - "description": "" - }, - { - "divider": 9, - "name": "storage", - "label": "Storage", - "description": "" - }, - { - "divider": 9, - "name": "storage", - "label": "Storage", - "description": "" - }, - { - "divider": 9, - "name": "storage", - "label": "Storage", - "description": "" - }, - { - "divider": 9, - "name": "storage", - "label": "Storage", - "description": "" - }, - { - "divider": 9, - "name": "storage", - "label": "Storage", - "description": "" - }, - { - "divider": 9, - "name": "storage", - "label": "Storage", - "description": "" - }, - { - "divider": 9, - "name": "storage", - "label": "Storage", - "description": "" - }, - { - "divider": 9, - "name": "storage", - "label": "Storage", - "description": "" - }, - { - "divider": 0, - "name": "storage", - "label": "Storage", - "description": "" - }, - { - "divider": 9, - "name": "storage", - "label": "Storage", - "description": "" - }, - { - "divider": 9, - "name": "storage", - "label": "Storage", - "description": "" - }, - { - "divider": 9, - "name": "storage", - "label": "Storage", - "description": "" - }, - { - "divider": 9, - "name": "storage", - "label": "Storage", - "description": "" - }, - { - "divider": 9, - "name": "storage", - "label": "Storage", - "description": "" - }, - { - "divider": 9, - "name": "storage", - "label": "Storage", - "description": "" - }, - { - "divider": 9, - "name": "storage", - "label": "Storage", - "description": "" - }, - { - "divider": 9, - "name": "storage", - "label": "Storage", - "description": "" - }, - { - "divider": 9, - "name": "storage", - "label": "Storage", - "description": "" - }, - { - "divider": 9, - "name": "storage", - "label": "Storage", - "description": "" - }, - { - "divider": 9, - "name": "storage", - "label": "Storage", - "description": "" - }, - { - "divider": 9, - "name": "storage", - "label": "Storage", - "description": "" - }, - { - "divider": 9, - "name": "storage", - "label": "Storage", - "description": "" - }, - { - "divider": 9, - "name": "storage", - "label": "Storage", - "description": "" - } - ] - } - }, - "direct_payment": { - "id": 3, - "category": "direct_payments", - "name": "Membership", - "reference_num": "4093-4070-2198-3695", - "processor": "vDc1P3JC", - "type": 0, - "status": 0, - "json": { - "display_name": "Membership", - "configuration": { - "payables": { - "processor": "vDc1P3JC" - }, - "recurring": { - "processors": [ - { - "name": "default", - "processor_nameid": "vDc1P3JC", - "subscription_group": "default" - } - ], - "subscriptions": [ - { - "name": "default", - "tiers": [ - { - "name": "member", - "label": "Member", - "lookup_key": "_none_", - "price": "free", - "price_int": 0 - }, - { - "name": "pro", - "label": "Pro", - "lookup_key": "pro_v2", - "price": "15.00", - "price_int": 1500 - }, - { - "name": "business", - "label": "business", - "lookup_key": "business_v2", - "price": "25.00", - "price_int": 2500 - }, - { - "name": "org", - "label": "Organization", - "lookup_key": "organization_v2", - "price": "50.00", - "price_int": 5000 - }, - { - "name": "ent", - "label": "Enterprise", - "lookup_key": "enterprise_v2", - "price": "199.99", - "price_int": 19999 - } - ] - } - ], - "discount_codes": [] - } - }, - "mail_handlers": [], - "reference_num": "4093-4070-2198-3695", - "mysql_id": 3 - }, - "date": "2024-12-08 02:46:16", - "_processor": { - "id": 20, - "category": "processors", - "reference_abbr": "proc", - "json": { - "nameid": "vDc1P3JC", - "display_name": "Test Live 001", - "active": true, - "mode": "sandbox", - "client_id": "pk_test_51SAx9EJUS5PVgv23ssnELvqRI9uboZQssLzextGht6kZCt8W2ZRVstn9WdoCQamPL0bkL41TC6MyuY8Ola6bqSu400ESNK7kMS", - "service_port": "", - "service_end_point": "", - "processor": "stripe", - "mysql_id": 20, - "category": "processors" - }, - "date": "2025-09-24 15:37:18" - } - }, - "stripe_data": { - "customer": { - "id": "cus_T7JDuu8PVHzl8B", - "object": "customer", - "address": { - "city": "Houston", - "country": "US", - "line1": "7112 Goforth Street", - "line2": "", - "postal_code": "77021", - "state": "TX" - }, - "balance": 0, - "created": 1758766099, - "currency": null, - "default_source": null, - "delinquent": false, - "description": null, - "discount": null, - "email": null, - "invoice_prefix": "BWTP1ZLP", - "invoice_settings": { - "custom_fields": null, - "default_payment_method": null, - "footer": null, - "rendering_options": null - }, - "livemode": false, - "metadata": [], - "name": null, - "next_invoice_sequence": 1, - "phone": null, - "preferred_locales": [], - "shipping": null, - "tax_exempt": "none", - "test_clock": null - }, - "payment_intent": { - "id": "pi_3SB4bXJUS5PVgv231wjSZQiT", - "object": "payment_intent", - "amount": 1599, - "amount_capturable": 0, - "amount_details": { - "tip": [] - }, - "amount_received": 0, - "application": null, - "application_fee_amount": null, - "automatic_payment_methods": { - "allow_redirects": "always", - "enabled": true - }, - "canceled_at": null, - "cancellation_reason": null, - "capture_method": "automatic_async", - "client_secret": "pi_3SB4bXJUS5PVgv231wjSZQiT_secret_pOaIOzn6uUSuRjllyl82m7EcH", - "confirmation_method": "automatic", - "created": 1758766099, - "currency": "usd", - "customer": null, - "description": null, - "excluded_payment_method_types": null, - "last_payment_error": null, - "latest_charge": null, - "livemode": false, - "metadata": { - "tax_calculation": "taxcalc_1SB4bXJUS5PVgv23pIy43mSD" - }, - "next_action": null, - "on_behalf_of": null, - "payment_method": null, - "payment_method_configuration_details": { - "id": "pmc_1SAx9bJUS5PVgv23C3HMUxgl", - "parent": null - }, - "payment_method_options": { - "afterpay_clearpay": { - "reference": null - }, - "card": { - "installments": null, - "mandate_options": null, - "network": null, - "request_three_d_secure": "automatic" - }, - "cashapp": [], - "klarna": { - "preferred_locale": null - }, - "link": { - "persistent_token": null - } - }, - "payment_method_types": [ - "card", - "afterpay_clearpay", - "klarna", - "link", - "cashapp" - ], - "processing": null, - "receipt_email": null, - "review": null, - "setup_future_usage": null, - "shipping": null, - "source": null, - "statement_descriptor": null, - "statement_descriptor_suffix": null, - "status": "requires_payment_method", - "transfer_data": null, - "transfer_group": null - }, - "calculation": { - "id": "taxcalc_1SB4bXJUS5PVgv23pIy43mSD", - "object": "tax.calculation", - "amount_total": 1599, - "currency": "usd", - "customer": null, - "customer_details": { - "address": { - "city": "Houston", - "country": "US", - "line1": "7112 Goforth Street", - "line2": "", - "postal_code": "77021", - "state": "TX" - }, - "address_source": "billing", - "ip_address": null, - "tax_ids": [], - "taxability_override": "none" - }, - "expires_at": 1766542099, - "livemode": false, - "ship_from_details": null, - "shipping_cost": null, - "tax_amount_exclusive": 99, - "tax_amount_inclusive": 0, - "tax_breakdown": [ - { - "amount": 99, - "inclusive": false, - "tax_rate_details": { - "country": "US", - "flat_amount": null, - "percentage_decimal": "8.25", - "rate_type": "percentage", - "state": "TX", - "tax_type": "sales_tax" - }, - "taxability_reason": "taxable_basis_reduced", - "taxable_amount": 1200 - } - ], - "tax_date": 1758766099 - } - } + "label_price": 99, + "label": "Enterprise", + "domain" } \ No newline at end of file diff --git a/portal/admin/core/api/php/includes/AppfactoryStudio/Plugins/Membership.php b/portal/admin/core/api/php/includes/AppfactoryStudio/Plugins/Membership.php index d394c528..841dda82 100644 --- a/portal/admin/core/api/php/includes/AppfactoryStudio/Plugins/Membership.php +++ b/portal/admin/core/api/php/includes/AppfactoryStudio/Plugins/Membership.php @@ -33,15 +33,25 @@ class Membership { $domain = get_subdomain_managed_domain_new_way($subdomain); $username = \Input::get("username"); + + if($username==""){ + $payload = json_decode(@file_get_contents('php://input'), true); + $username = $payload["username"]; + } + + // $nameid = \Input::get("nameid"); $db = new \DB(); - $rows = $db->query("SELECT * FROM users_member WHERE reference_num='$username'"); + $rows = $db->query("SELECT * FROM users_member WHERE reference_num='$username'",[], \PDO::FETCH_ASSOC); $member = ["set"=>false,"username"=>$username]; if($rows->count() > 0){ $member = $rows->results()[0]; + $member["json_data"] = json_decode(html_entity_decode($member["json_data"]),true); } $db = null; + + $config_domain = __get_main_configurations(); $managed_domain = $config_domain["managed_domain"]; $config = $config_domain["configurations"]; diff --git a/portal/admin/core/api/php/includes/AppfactoryStudio/Plugins/StripeModule.php b/portal/admin/core/api/php/includes/AppfactoryStudio/Plugins/StripeModule.php index c3610ff0..a99772f3 100644 --- a/portal/admin/core/api/php/includes/AppfactoryStudio/Plugins/StripeModule.php +++ b/portal/admin/core/api/php/includes/AppfactoryStudio/Plugins/StripeModule.php @@ -17,7 +17,6 @@ class StripeModule { public function __construct() { } - // rrrrr function GetStripe($client_secret,$manage_domain){ \Stripe\Stripe::setAppInfo( "stripe_processor", @@ -35,10 +34,16 @@ class StripeModule { function init(){ $content = rawurldecode(trim(@file_get_contents("php://input"))); $data = json_decode($content, true); - $data["data"] = json_decode($data["data"],true); + if(gettype($data["data"])=="string"){ + $data["data"] = json_decode($data["data"],true); + } // $_POST["category"] = "processors"; $configuration = get_configuration_obj("processors"); $one = $data["data"]['direct_payment']; + if(gettype($one)=="string"){ + $one = json_decode($one,true); + } + // Utils_WriteFileJson("/mnt/node1/appfactorystudio/tmp/afile00.json",$one); // TODO_1: direct payment must be type 0 - type 1 subscriptions is not implemented yet $processor = DirectPaymentsSelectProcessor($one, $configuration); $manage_domain = GetManagedDomain(); @@ -202,6 +207,8 @@ class StripeModule { \Stripe\Stripe::setApiKey($data["processor"]['json']['client_secret']); + + // rrrrr $objects = []; $customer = null; $paymentIntent = null; @@ -214,6 +221,7 @@ class StripeModule { $product_id = $data["data"]["product_id"]; $customer_address = $data["data"]["address"]; + $amount = $data["data"]["amount"]; // Create a Tax Calculation try { @@ -224,7 +232,7 @@ class StripeModule { 'address_source' => 'billing', ], 'line_items' => [[ - 'amount' => (int)$data["data"]["amount"], //1000, // $10.00 + 'amount' => (int)$amount, //1000, // $10.00 'reference' => 'L1', // Unique identifier for the line item 'product' => $product_id, // 'tax_code' => 'txcd_99999999', // 'General merchandise' tax code @@ -238,45 +246,13 @@ class StripeModule { // $total_inclusive_tax = $calculation->tax_amount_inclusive; // $total_amount_before_tax = $calculation->amount_total - $total_inclusive_tax; // $total_amount = $calculation->amount_total; - + EchoJsonObject([ "customer" => $customer, "calculation" => $calculation, - // "payment_intent" => $paymentIntent, - "data" => $data + "data" => $data, + "amount" => $amount ]); - - // Display the results to the customer - // echo "Subtotal: $" . number_format($total_amount_before_tax / 100, 2) . "\n"; - // echo "Tax: $" . number_format($total_tax / 100, 2) . "\n"; - // echo "Total: $" . number_format($total_amount / 100, 2) . "\n"; - - // if($data["data"]["payment_intent_created"]==false){ - // // $paymentIntent = $this->_createPaymentIntent($stripe,$data); - // // Create a PaymentIntent using the tax calculation results - // $paymentIntent = \Stripe\PaymentIntent::create([ - // 'amount' => $calculation->amount_total, - // 'currency' => $calculation->currency, - // // 'tax_calculation' => $calculation->id, - // 'automatic_payment_methods' => ['enabled' => true], - // 'metadata' => ['tax_calculation' => $calculation->id] - // ]); - // }else{ - // // rrrrr - // $payment_intent_id = $data["data"]["payment_intent_id"]; - // $paymentIntent = \Stripe\PaymentIntent::update( - // $payment_intent_id, //'pi_YOUR_PAYMENT_INTENT_ID', // Replace with the actual PaymentIntent ID - // [ - // 'amount' => $calculation->amount_total, - // 'metadata' => ['tax_calculation' => $calculation->id] - // //'amount' => 2000, // Update the amount to 20.00 USD (in cents) - // //'currency' => 'usd', - // //'description' => 'Updated payment for order #123', - // ] - // ); - - - // } } catch (\Stripe\Exception\ApiErrorException $e) { EchoJsonObject([ @@ -289,14 +265,6 @@ class StripeModule { return; } - - - - - - - - } public function create_subscription(){ @@ -471,6 +439,7 @@ class StripeModule { // Create a new customer object $customer = $stripe->customers->create(); + // rrrrr try { $promotionCodes = $stripe->promotionCodes->all([ @@ -676,11 +645,13 @@ class StripeModule { * @return void */ private function _record_tax($stripe){ - $transaction = $stripe->tax->transactions->createFromCalculation([ - 'calculation' => '{{TAX_CALCULATION}}', - 'reference' => '{{PAYMENT_INTENT_ID}}', - 'expand' => ['line_items'] - ]); + $this->handleExceptions(function() use ($stripe) { + $transaction = $stripe->tax->transactions->createFromCalculation([ + 'calculation' => '{{TAX_CALCULATION}}', + 'reference' => '{{PAYMENT_INTENT_ID}}', + 'expand' => ['line_items'] + ]); + }); } @@ -705,6 +676,68 @@ class StripeModule { } + /** + * Pass through function so that if an exception is called it will be handle. + * + * @param mixed $method_call + * @return void + */ + private function handleExceptions($method_call){ + try { + $method_call(); + } catch(\Stripe\Exception\UnexpectedValueException $e) { + // Invalid payload + http_response_code(400); + Utils_WriteFileJson($this->LOG_FILE,['Error parsing payload: ' => $e->getMessage()],"a"); + exit(); + } catch(\Stripe\Exception\SignatureVerificationException $e) { + // Invalid signature + http_response_code(400); + Utils_WriteFileJson($this->LOG_FILE,['Error verifying webhook signature: ' => $e->getMessage()],"a"); + exit(); + + } catch(\Stripe\Exception\ApiConnectionException) { + + } catch(\Stripe\Exception\ApiErrorException $e){ + + } catch(\Stripe\Exception\AuthenticationException $e){ + + } catch(\Stripe\Exception\BadMethodCallException $e){ + + } catch(\Stripe\Exception\CardException $e){ + + } catch(\Stripe\Exception\ExceptionInterface $e){ + + } catch(\Stripe\Exception\IdempotencyException $e){ + + } catch(\Stripe\Exception\InvalidArgumentException $e){ + + } catch(\Stripe\Exception\InvalidRequestException $e){ + + } catch(\Stripe\Exception\PermissionException $e){ + + } catch(\Stripe\Exception\RateLimitException $e){ + + } catch(\Stripe\Exception\TemporarySessionExpiredException $e){ + + } catch(\Stripe\Exception\UnexpectedValueException $e){ + + } catch(\Stripe\Exception\UnknownApiErrorException $e){ + + } catch(\Exception $e) { + // Invalid payload + http_response_code(400); + Utils_WriteFileJson($this->LOG_FILE,["error" => $e->getMessage()], 'a'); + exit(); + } + + + + + + + } + // stripe listen --forward-to https://api.appfactory.studio/v1/modules/stripe/webhook?dp=4093-4070-2198-3695 --skip-verify public function webhook(){ @@ -920,7 +953,7 @@ class StripeModule { // Unhandled event type } - } catch(\UnexpectedValueException $e) { + } catch(\Stripe\Exception\UnexpectedValueException $e) { // Invalid payload http_response_code(400); Utils_WriteFileJson($this->LOG_FILE,['Error parsing payload: ' => $e->getMessage()],"a"); @@ -930,6 +963,35 @@ class StripeModule { http_response_code(400); Utils_WriteFileJson($this->LOG_FILE,['Error verifying webhook signature: ' => $e->getMessage()],"a"); exit(); + + } catch(\Stripe\Exception\ApiConnectionException) { + + } catch(\Stripe\Exception\ApiErrorException $e){ + + } catch(\Stripe\Exception\AuthenticationException $e){ + + } catch(\Stripe\Exception\BadMethodCallException $e){ + + } catch(\Stripe\Exception\CardException $e){ + + } catch(\Stripe\Exception\ExceptionInterface $e){ + + } catch(\Stripe\Exception\IdempotencyException $e){ + + } catch(\Stripe\Exception\InvalidArgumentException $e){ + + } catch(\Stripe\Exception\InvalidRequestException $e){ + + } catch(\Stripe\Exception\PermissionException $e){ + + } catch(\Stripe\Exception\RateLimitException $e){ + + } catch(\Stripe\Exception\TemporarySessionExpiredException $e){ + + } catch(\Stripe\Exception\UnexpectedValueException $e){ + + } catch(\Stripe\Exception\UnknownApiErrorException $e){ + } catch(\Exception $e) { // Invalid payload http_response_code(400); @@ -1196,7 +1258,7 @@ class StripeModule { $managed_domain = $json["managed_domain"]; $config1 = $json["config"]; $handler = $json["mail_handlers"]; - $member = $json["member"]; + $member = $json["member"]; Utils_WriteFileJson("/mnt/node1/appfactorystudio/tmp/tailfile077.json",["handle" => $json]); @@ -1742,7 +1804,6 @@ class StripeModule { - // rrrrr // If you are testing your webhook locally with the Stripe CLI you // can find the endpoint's secret by running `stripe listen` // Otherwise, find your endpoint's secret in your webhook settings in the Developer Dashboard diff --git a/portal/admin/core/api/php/includes/AppfactoryStudio/Plugins/Subscribers.php b/portal/admin/core/api/php/includes/AppfactoryStudio/Plugins/Subscribers.php new file mode 100644 index 00000000..b81da0cc --- /dev/null +++ b/portal/admin/core/api/php/includes/AppfactoryStudio/Plugins/Subscribers.php @@ -0,0 +1,120 @@ + '; + } + + + public function member_update(){ + $content = trim(file_get_contents("php://input")); + $decoded = json_decode($content, true); + $member = $decoded["data"]; + // $member = json_decode(\Input::get("data"),true); + SaveMember($member); + EchoJsonResponse($decoded); + } + + public function get_membership(){ + $subdomain = getSubdomain2(); + $domain = get_subdomain_managed_domain_new_way($subdomain); + + $username = \Input::get("username"); + + if($username==""){ + $payload = json_decode(@file_get_contents('php://input'), true); + $username = $payload["username"]; + } + + + // $nameid = \Input::get("nameid"); + $db = new \DB(); + $rows = $db->query("SELECT * FROM users_member WHERE reference_num='$username'",[], \PDO::FETCH_ASSOC); + $member = ["set"=>false,"username"=>$username]; + if($rows->count() > 0){ + $member = $rows->results()[0]; + $member["json_data"] = json_decode(html_entity_decode($member["json_data"]),true); + } + $db = null; + + + + $config_domain = __get_main_configurations(); + $managed_domain = $config_domain["managed_domain"]; + $config = $config_domain["configurations"]; + + $tenants = []; + $db = new \DB(); + $rows = $db->query("SELECT * FROM brain_http_server_tenants WHERE member_reference_num='$username'",[],\PDO::FETCH_ASSOC); + if($rows->count() > 0){ + for ($i=0; $i < $rows->count(); $i++) { + $tenant = $rows->results()[$i]; + $tenant["json"] = json_decode(html_entity_decode($tenant["json"]),true); + array_push($tenants, $tenant); + } + } + $db = null; + // $authfile = dirname(__DIR__, 5) . "/db/application_data_model_schema.json"; + // $auth_config = file_get_contents($authfile); + + $authfile2 = dirname(__DIR__, 7) . "/system/data/application_registry_schema.json"; + $auth_config2 = file_get_contents($authfile2); + return json_encode([ + // "account" => $account, + // "config" => json_decode($auth_config), + "member" => $member, + "tenants" => $tenants, + "access" => $config["access"][0]["json"], + "registry" => json_decode($auth_config2), + "username" => $username, + ]); + + } + + public function member_get_config(){ + // ApiCheck(function($header_set,$status,$decoded){ + $username = \Input::get("subdomain"); + $subdomain = getSubdomain2(); + $domain = get_subdomain_managed_domain_new_way($subdomain); + + $db = new \DB(); + $rows = $db->query("SELECT * FROM configurations WHERE category='domain_settings'",[],\PDO::FETCH_ASSOC); + $configurations = array(); + if($rows->count() > 0){ + // $configurations['access'] = true; + for($i=0; $i < $rows->count(); $i++){ + if(array_key_exists($rows->results()[$i]["category"], $configurations)==false){ + $configurations[$rows->results()[$i]["category"]] = []; + } + $con = $rows->results()[$i]; + $con["json"] = json_decode(html_entity_decode($con["json"]),true); + array_push($configurations[$rows->results()[$i]["category"]], $con); + } + } + $db = null; + EchoJsonObject( [ "configuration" => $configurations, "domain" => $domain ] ); + // }); + } + + + +} + + diff --git a/portal/admin/core/api/php/includes/functions.php b/portal/admin/core/api/php/includes/functions.php index d701f162..192d51ae 100644 --- a/portal/admin/core/api/php/includes/functions.php +++ b/portal/admin/core/api/php/includes/functions.php @@ -29,7 +29,7 @@ require_once dirname( __DIR__ ) . "/includes/mylibs/email/email_manager.php"; // /home/appfactorystudio/websites/www/portal/admin/core/api/php/includes/mylibs/email/sendgrid.php - + use Psr\Http\Message\ResponseInterface as Response; use Psr\Http\Message\ServerRequestInterface as Request; @@ -70,9 +70,9 @@ function sendmessagetome(){ function InitMemberUserAuthObject($type = "mysql"){ // \ini_set('session.cookie_domain', 'appfactory.studio'); - if(session_status() !== PHP_SESSION_ACTIVE){ - \ini_set('session.cookie_path', '/members'); - } + // if(session_status() !== PHP_SESSION_ACTIVE){ + // \ini_set('session.cookie_path', '/members'); + // } $username = $GLOBALS['config'][$type]["username"]; $password = $GLOBALS['config'][$type]["password"]; @@ -483,7 +483,6 @@ function EchoJsonObject($object){ echo json_encode($object); } function RunCommand($shParams,$managed_domain,$cb=null,$isOutput=false){ - // ppppp $basefolder = "/home/" . $managed_domain["SystemUser"] . "/websites/" . $managed_domain["Subdomain"] . "/portal/admin/core/scripts"; $shCmd = $basefolder . "/commands.sh"; $cmd = $basefolder . "/bin/afs-website \"" . $shCmd . " " . $shParams . "\""; @@ -590,15 +589,20 @@ function get_membership_from_brain_controller(){ 'content' => http_build_query($obj) ] ]; - $tenants = []; + $tenants = []; $context = stream_context_create($options); $result = file_get_contents($requestUrl, false, $context); if ($result === FALSE) { $result = ["status" => "failure"]; }else{ $result = json_decode($result,true); - $result["member"]["domain"] = $domain; - $result["member"]["json_data"] = json_decode(html_entity_decode($result["member"]["json_data"]), true); + // $result["member"]["domain"] = $domain; + + //Utils_WriteFileJson("/mnt/node1/appfactorystudio/tmp/_afile.json",$result["member"]); + if(gettype($result["member"]["json_data"])=="string"){ + $result["member"]["json_data"] = json_decode(html_entity_decode($result["member"]["json_data"]), true); + } + for ($i=0; $i < count($result["tenants"]); $i++) { $tenants[$i] = $result["tenants"][$i]; // $tenants[$i]["json"] = json_decode(html_entity_decode($tenants[$i]["json"]), true); @@ -646,7 +650,8 @@ function get_membership_from_brain_controller(){ "tenant" => $tenant, "member" => $result["member"], "url" => $requestUrl, - "result" => $result + "result" => $result, + "domain" => $domain // "createdby" => $createdby, // "domain" => $domain, // "override" => $override, @@ -1490,7 +1495,7 @@ function SendEmailBuilder($handler,$integration,$config,$domain,$cb=null){ $form_data["variables"]["system"] = SetupEmailSystemVariables($integration,$config, $form_data, $domain); - Utils_WriteFileJson("/mnt/node1/appfactorystudio/tmp/tailfile778.json",$form_data); + // Utils_WriteFileJson("/mnt/node1/appfactorystudio/tmp/tailfile778.json",$form_data); // nnnnn if($form_data!=null && @@ -1530,55 +1535,43 @@ function SendEmailBuilder($handler,$integration,$config,$domain,$cb=null){ $from = $form_data["from"]; // ccccc - if(array_key_exists("variables",$form_data)){ - // the system and schema variables only need 1 array as their values shouldn't change - $index_count = 0; - // schema variables process first because they might contain other variables - if(array_key_exists("schema",$form_data["variables"])){ - // $setvariables = $form_data["variables"]["schema"]; - // - $form_data["variables"]["schema"] = [$form_data["variables"]["schema"]]; + try { + if(array_key_exists("variables",$form_data)){ + // the system and schema variables only need 1 array as their values shouldn't change + $index_count = 0; + // schema variables process first because they might contain other variables + if(array_key_exists("schema",$form_data["variables"])){ + // $setvariables = $form_data["variables"]["schema"]; + + // + $form_data["variables"]["schema"] = [$form_data["variables"]["schema"]]; - // https://www.appfactory.studio/portal/admin/core/assets/tabler-icons/icons/brand-instagram.svg - // https://www.appfactory.studio/assets/social_icons/facebook_733547.png - // https://www.appfactory.studio/assets/social_icons/instagram_174855.png - // https://www.appfactory.studio/assets/social_icons/twitter_11823292.png + // https://www.appfactory.studio/portal/admin/core/assets/tabler-icons/icons/brand-instagram.svg + // https://www.appfactory.studio/assets/social_icons/facebook_733547.png + // https://www.appfactory.studio/assets/social_icons/instagram_174855.png + // https://www.appfactory.studio/assets/social_icons/twitter_11823292.png - // https://www.appfactory.studio/portal/admin/core/assets/tabler-icons/icons/brand-facebook-filled.svg - // Utils_WriteFileJson("/mnt/node1/appfactorystudio/tmp/tailfile303.json",$form_data["variables"]); - if($form_data["variables"]["schema"][$index_count]!=null){ - for($n=0; $n < count($form_data["variables"]["schema"][$index_count]); $n++){ - $var = $form_data["variables"]["schema"][$index_count][$n]; - $value = ""; - if($var!=null){ - Utils_WriteFileJson("/mnt/node1/appfactorystudio/tmp/_tailfile.json",$var); - if(array_key_exists("value",$var)){$value = $var["value"];} - $subject = str_replace("\${".$var["name"]."}", strip_tags( $value), $subject); - $title = str_replace("\${".$var["name"]."}", $value, $title); - $html = str_replace("\${".$var["name"]."}", $value, $html); + // https://www.appfactory.studio/portal/admin/core/assets/tabler-icons/icons/brand-facebook-filled.svg + // Utils_WriteFileJson("/mnt/node1/appfactorystudio/tmp/tailfile303.json",$form_data["variables"]); + if($form_data["variables"]["schema"][$index_count]!=null){ + for($n=0; $n < count($form_data["variables"]["schema"][$index_count]); $n++){ + $var = $form_data["variables"]["schema"][$index_count][$n]; + $value = ""; + if($var!=null){ + // Utils_WriteFileJson("/mnt/node1/appfactorystudio/tmp/_tailfile.json",$var); + if(array_key_exists("value",$var)){$value = $var["value"];} + $subject = str_replace("\${".$var["name"]."}", strip_tags( $value), $subject); + $title = str_replace("\${".$var["name"]."}", $value, $title); + $html = str_replace("\${".$var["name"]."}", $value, $html); + } } } } - } - if(array_key_exists("client",$form_data["variables"])){ - for($n=0; $n < count($form_data["variables"]["client"][$i]); $n++){ - $var = $form_data["variables"]["client"][$i][$n]; - $value = ""; - if($var!=null){ - if(array_key_exists("value",$var)){$value = $var["value"];} - $subject = str_replace("\${".$var["name"]."}", strip_tags( $value), $subject); - $title = str_replace("\${".$var["name"]."}", $value, $title); - $html = str_replace("\${".$var["name"]."}", $value, $html); - } - } - } - if(array_key_exists("system",$form_data["variables"])){ - $setvariables = $form_data["variables"]["system"]; - if($setvariables!=null && $setvariables[$index_count]!=null){ - for($n=0; $n < count($setvariables[$index_count]); $n++){ - $var = $setvariables[$index_count][$n]; + if(array_key_exists("client",$form_data["variables"])){ + for($n=0; $n < count($form_data["variables"]["client"][$i]); $n++){ + $var = $form_data["variables"]["client"][$i][$n]; $value = ""; if($var!=null){ if(array_key_exists("value",$var)){$value = $var["value"];} @@ -1588,7 +1581,26 @@ function SendEmailBuilder($handler,$integration,$config,$domain,$cb=null){ } } } + if(array_key_exists("system",$form_data["variables"])){ + $setvariables = $form_data["variables"]["system"]; + if($setvariables!=null && $setvariables[$index_count]!=null){ + for($n=0; $n < count($setvariables[$index_count]); $n++){ + $var = $setvariables[$index_count][$n]; + $value = ""; + if($var!=null){ + if(array_key_exists("value",$var)){$value = $var["value"];} + // Utils_WriteFileJson("/mnt/node1/appfactorystudio/tmp/tailfile30345.json",["message" => $form_data["variables"]["system"]]); + $subject = str_replace("\${".$var["name"]."}", strip_tags( $value), $subject); + $title = str_replace("\${".$var["name"]."}", $value, $title); + $html = str_replace("\${".$var["name"]."}", $value, $html); + } + } + } + } } + + }catch(\Exception $e){ + } // $html = str_replace(" ","", $html); // $html = str_replace(" ","", $html); @@ -1597,7 +1609,7 @@ function SendEmailBuilder($handler,$integration,$config,$domain,$cb=null){ $html = str_replace(" ", "", $html); $html = html_entity_decode($html); - Utils_WriteFileJson("/mnt/node1/appfactorystudio/tmp/tailfile333.json",$integration); + // Utils_WriteFileJson("/mnt/node1/appfactorystudio/tmp/tailfile333.json",$integration); if($integration["name"]=="sendgrid"){ $mydata = []; $mydata["subject"] = $subject; @@ -1608,7 +1620,7 @@ function SendEmailBuilder($handler,$integration,$config,$domain,$cb=null){ $mydata["html"] = $html; $mydata["sendgrid_key"] = $integration["secret"];//"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"; _email_send_sendgrid($mydata,$message_response, $cb); - Utils_WriteFileJson("/mnt/node1/appfactorystudio/tmp/tailfile334.json",$mydata); + // Utils_WriteFileJson("/mnt/node1/appfactorystudio/tmp/tailfile334.json",$mydata); } if($integration["name"]=="appfactory_studio"){ $mailobj = [ @@ -1679,26 +1691,12 @@ function admin_email_test_send_email(){ $data["variables"]["client"] = [[["name" => "_testing_", "value" => "_name_"]]]; // $data["variables"]["schema"] = $data["variables"]["schema"]; - Utils_WriteFileJson("/mnt/node1/appfactorystudio/tmp/__tailfile.json",$data["variables"]["schema"]); + // Utils_WriteFileJson("/mnt/node1/appfactorystudio/tmp/__tailfile.json",$data["variables"]["schema"]); $integration = GetActiveEmailIntegration($config); SendEmailBuilder($data,$integration, $config, $managed_domain,function($resp)use ($data){ EchoJsonObject(["data" => $resp, "variables" => $data["variables"]]); }); - // $client_variables = []; - // $integration = GetActiveEmailIntegration($config); - // // $mail_handler = array_shift($mail_handlers); - // $mail_handlers = ["handler" => $data]; - // SendEmailBuildIntegration( - // $mail_handlers, - // $client_variables, - // $integration, - // $config, - // $managed_domain, - // function($resp){ - // EchoJsonObject(["data" => $resp]); - // }); - } @@ -1973,7 +1971,6 @@ function send_invite_email($fields){ } function send_email($data){ - // ppppp $to = $data['to']; $from = $data['from']; $subject = $data['subject']; @@ -2531,6 +2528,7 @@ function DirectPaymentsSelectProcessor($obj,$configuration){ $processor = null; for ($i=0; $i < count($processors); $i++) { + // Utils_WriteFileJson("/mnt/node1/appfactorystudio/tmp/afile$i.json", $processors[$i]); $nameid = $processors[$i]["json"]["nameid"]; if($obj["type"]==0){ if($nameid==$obj["json"]["configuration"]["payables"]["processor"]){ @@ -4160,7 +4158,7 @@ function create_new_member($auth){ "firstname" => $member["firstname"], "lastname" => $member["lastname"], "email" => $member["email"], - "family" => $member["family"], + "family" => 1, //$member["family"], "level" => $member["level"], "membership" => $member["membership"], "password" => $member["password"], @@ -4408,7 +4406,7 @@ function member_createERPNextCustomer($userId,$member){ 'cust_name' => $member["firstname"], 'cust_type' => 'Individual', 'cust_group' => 'Individual', - 'territory' => $member["country"], + 'territory' => $member["country_code"], 'default_currency' => 'USD', 'email_id' => $member["email"], 'address_title' => 'Main', @@ -4417,7 +4415,7 @@ function member_createERPNextCustomer($userId,$member){ 'address_line2' => '', 'city' => $member["city"], 'state' => $member["state"], - 'country' => $member["country"], + 'country' => $member["country_name"], 'pincode' => $member["zip_code"]], CURLOPT_HTTPHEADER => [ 'Authorization: Token c49c62746224379:2f52f3438cfe883', @@ -4996,12 +4994,12 @@ function apicall_stripe_create_subscription($decoded){ function webhookStripeHandlePaymentIntentSucceeded($event){ $paymentMethod = $event->data->object; - $file = "/mnt/node1/appfactorystudio/tmp/a_hello_world_payment1.json"; + // $file = "/mnt/node1/appfactorystudio/tmp/a_hello_world_payment1.json"; Utils_WriteFileJson($file,["event" => $event->type, "payment" => $paymentMethod]); } function webhookStripeHandlePaymentMethodAttached($event){ $paymentMethod = $event->data->object; - $file = "/mnt/node1/appfactorystudio/tmp/a_hello_world_payment2.json"; + // $file = "/mnt/node1/appfactorystudio/tmp/a_hello_world_payment2.json"; Utils_WriteFileJson($file,["event" => $event->type, "payment" => $paymentMethod]); } function webhookStripeHandlePaymentSucceeded($event){ @@ -6744,7 +6742,7 @@ function get_admin_user($auth){ $user = $result->fetch_assoc(); unset($user["password_hash"]); $user["user_id"] = $auth->getUserId(); - $user["json_data"] = json_decode(html_entity_decode($user["json_data"]),true); + $user["json"] = json_decode(html_entity_decode($user["json"]),true); EchoJsonObject(["user" => $user]); } @@ -7161,25 +7159,13 @@ function admin_subscriber_get_subscribers(){ EchoJsonObject($subscribers); } -function admin_subscriber_update_subscriber(){ - $subscriber = json_decode(Input::get("subscriber"), true); - $db = new DB(); - $db->updateFields("subscribers",[ - "name" => $subscriber["name"], - // "catagory" => $subscriber["catagory"], - "json" => htmlentities(json_encode($subscriber["json"])) - ],[ - "reference_num" => $subscriber["reference_num"] - ]); - $db = null; - EchoJsonResponse(); -} + function client_subscriber_get_catalogs(){ $token = Input::get("token"); - if(CheckClientToken($token)==false){ - EchoJsonResponse("request_failure"); - return; - } + // if(CheckClientToken($token)==false){ + // EchoJsonResponse("request_failure"); + // return; + // } $catalogs = []; $db = new DB(); @@ -7195,23 +7181,54 @@ function client_subscriber_get_catalogs(){ EchoJsonObject(["catalogs" => $catalogs]); } + + // ppppp -function client_subscriber_add_subscriber(){ - $token = Input::get("token"); - if(CheckClientToken($token)==false){ - EchoJsonResponse("request_failure"); - return; +function admin_subscriber_update_subscriber(){ + $subscriber = json_decode(Input::get("subscriber"), true); + $email = $subscriber["email"]; + $db = new DB(); + $rows = $db->query("SELECT * FROM subscribers WHERE email='$email'"); + if($rows->count() > 0){ + $db->updateFields("subscribers",[ + "name" => $subscriber["name"], + // "catagory" => $subscriber["catagory"], + "json" => htmlentities(json_encode($subscriber["json"])) + ],[ + "reference_num" => $subscriber["reference_num"] + ]); + }else{ + $db->insert("subscribers",[ + "reference_num" => $subscriber["reference_num"], + "email" => $email, + "json" => htmlentities(json_encode($subscriber["json"])) + ]); } + + $db = null; + EchoJsonResponse('success'); +} +function client_subscriber_add_subscriber(){ + // $token = Input::get("token"); + // if(CheckClientToken($token)==false){ + // EchoJsonResponse("request_failure"); + // return; + // } $config_domain = __get_main_configurations(); $managed_domain = $config_domain["managed_domain"]; $config = $config_domain["configurations"]; $settings = $config["settings"][0]["json"]; - $sendresponse = Input::get("sendresponse"); - $subscriber = json_decode(Input::get("subscriber"), true); - $response = json_decode(Input::get("response"), true); + $payload = json_decode(@file_get_contents('php://input'), true); + $sendresponse = $payload["data"]["sendresponse"]; + $subscriber = $payload["data"]["subscriber"]; $email = $subscriber["email"]; + // $sendresponse = Input::get("sendresponse"); + // $subscriber = json_decode(Input::get("subscriber"), true); + // $mail_handlers = json_decode(Input::get("mail_handlers"), true); + // $email = $subscriber["email"]; + $db = new DB(); $rows = $db->query("SELECT * FROM subscribers WHERE email='$email'",[],PDO::FETCH_ASSOC); if($rows->count() > 0){ @@ -7240,13 +7257,13 @@ function client_subscriber_add_subscriber(){ ]); } $db = null; - if($sendresponse==true || $sendresponse=="true"){ - SendEmailBuilder($response,$managed_domain,function($resp){ - // EchoJsonObject(["data" => $resp]); - }); - } + // if($sendresponse==true || $sendresponse=="true"){ + // SendEmailBuilder($response,$managed_domain,function($resp){ + // // EchoJsonObject(["data" => $resp]); + // }); + // } - EchoJsonResponse(); + EchoJsonObject($payload); } @@ -7803,7 +7820,7 @@ function submit_form(){ $reference_num = Input::get("reference_num"); $form_json = json_decode(Input::get("form_json"),true); $submission_json = json_decode(Input::get("submission_json"),true); - + $client_variables = json_decode(Input::get('client_variables'),true); $db = new DB(); $db->insert("form_submissions", array( @@ -7824,6 +7841,23 @@ function submit_form(){ $mytype = "yes"; } + // ppppp + + $integration = GetActiveEmailIntegration($config); + $mail_handler = array_shift($mail_handlers); + SendEmailBuildIntegration( + $mail_handler, + $client_variables, + $integration, + $config, + $managed_domain, + function($resp){ + + }); + + + + // // $form_json["email_alert"]["variables"] = [$form_json["variables"]]; // $form_json["json"]["email_alert"]["_output_html"] = "forms/alert_" . $time . ".html"; // SendEmail($form_json["json"]["email_alert"],$managed_domain,function($message){ @@ -10321,7 +10355,7 @@ function SetupEmailSystemVariables($integration, $config, $handler, $managed_dom $logo1 = ""; if(array_key_exists("logo1", $domain_setting["brand"]["logos"])) { - $logo1 = $domain_setting["brand"]["logos"]["logo1"]; + $logo1 = $domain_setting["brand"]["logos"]["logo1"]["reference_num"]; } array_push($variables, [ "name" => "mybrand_logo1", @@ -10330,7 +10364,7 @@ function SetupEmailSystemVariables($integration, $config, $handler, $managed_dom $logo2 = ""; if(array_key_exists("logo2", $domain_setting["brand"]["logos"])) { - $logo2 = $domain_setting["brand"]["logos"]["logo2"]; + $logo2 = $domain_setting["brand"]["logos"]["logo2"]["reference_num"]; } array_push($variables, [ "name" => "mybrand_logo2", @@ -10339,7 +10373,7 @@ function SetupEmailSystemVariables($integration, $config, $handler, $managed_dom $logo3 = ""; if(array_key_exists("logo3", $domain_setting["brand"]["logos"])) { - $logo2 = $domain_setting["brand"]["logos"]["logo3"]; + $logo2 = $domain_setting["brand"]["logos"]["logo3"]["reference_num"]; } array_push($variables, [ "name" => "mybrand_logo3", diff --git a/portal/admin/core/api/php/includes/include.php b/portal/admin/core/api/php/includes/include.php index 88ba4a01..de315a71 100644 --- a/portal/admin/core/api/php/includes/include.php +++ b/portal/admin/core/api/php/includes/include.php @@ -53,7 +53,7 @@ function func_page($auth, $is_sandbox = false){ - + @@ -120,10 +120,10 @@ function func_page($auth, $is_sandbox = false){ - + diff --git a/portal/admin/core/api/php/includes/mylibs/email/email_manager.php b/portal/admin/core/api/php/includes/mylibs/email/email_manager.php index c6fb6fdb..18b174f9 100644 --- a/portal/admin/core/api/php/includes/mylibs/email/email_manager.php +++ b/portal/admin/core/api/php/includes/mylibs/email/email_manager.php @@ -10,6 +10,25 @@ use \SendGrid\Mail\Mail; class EmailManager { public function __construct(){ } + + public function authDomain(){ + + $apiKey = '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';//getenv('SENDGRID_API_KEY'); // Or replace with your actual API key + $sg = new \SendGrid($apiKey); + + $requestBody = json_decode('{ + "domain": "mail.cradle2careertx.org", + "automated_security": false + }'); + + try { + $response = $sg->client->whitelabel()->domains()->post($requestBody); + // echo $response->statusCode(); + return $response->body(); + } catch (Exception $e) { + return 'Caught exception: '. $e->getMessage() ."\n"; + } + } public function initialize($type,$data,$message_response,$cb){ diff --git a/portal/admin/core/api/php/request.php b/portal/admin/core/api/php/request.php index 128b9319..d08ff450 100644 --- a/portal/admin/core/api/php/request.php +++ b/portal/admin/core/api/php/request.php @@ -499,7 +499,7 @@ if(Input::get('get_form_submissions')){ get_form_submissions(); } if(Input::get('print_form')){ - print_form(); + print_form(); } if(Input::get('api_submit_form')){ api_submit_form(); diff --git a/portal/admin/core/api/styles/styles.css b/portal/admin/core/api/styles/styles.css index c790b264..593bacf2 100644 --- a/portal/admin/core/api/styles/styles.css +++ b/portal/admin/core/api/styles/styles.css @@ -1,5 +1,11 @@ @import url("https://fonts.googleapis.com/css?family=Roboto:300,400,400i,500"); +:root { + /* --tblr-primary: #f1f1f1 !important; */ + /* --tblr-bg-surface: #222222; */ +} + + body { overflow-x: hidden; font-family: "Roboto", sans-serif; diff --git a/portal/admin/core/api/styles/tabler/tabler.css b/portal/admin/core/api/styles/tabler/tabler.css index 6ce8cd0d..b6214508 100644 --- a/portal/admin/core/api/styles/tabler/tabler.css +++ b/portal/admin/core/api/styles/tabler/tabler.css @@ -6,6 +6,8 @@ * Copyright 2018-2023 codecalm.net Paweł Kuna * Licensed under MIT (https://github.com/tabler/tabler/blob/master/LICENSE) */ + + /* change */ @charset "UTF-8"; /* prettier-ignore */ /* prettier-ignore */ @@ -17587,7 +17589,11 @@ body.theme-dark .hide-theme-dark, body[data-bs-theme=dark] .hide-theme-dark { --tblr-emphasis-color: #ffffff; --tblr-emphasis-color-rgb: 255, 255, 255; --tblr-bg-forms: #151f2c; - --tblr-bg-surface: #182433; + /* change */ + /* --tblr-bg-surface: #182433; */ + /* --tblr-bg-surface: #111111; */ + /* --tblr-bg-surface: #222222; */ + --tblr-bg-surface: #121212; --tblr-bg-surface-dark: #151f2c; --tblr-bg-surface-secondary: #1b293a; --tblr-bg-surface-tertiary: #151f2c; diff --git a/portal/admin/core/html/_old/dashboard.html b/portal/admin/core/html/_old/dashboard.html index 3da4154c..3f0223d6 100644 --- a/portal/admin/core/html/_old/dashboard.html +++ b/portal/admin/core/html/_old/dashboard.html @@ -19,3 +19,18 @@
    + + + + + + + + + + + + + + + diff --git a/portal/admin/core/html/_template_dashboard.html b/portal/admin/core/html/_template_dashboard.html index 3e8933fd..e8068fd7 100644 --- a/portal/admin/core/html/_template_dashboard.html +++ b/portal/admin/core/html/_template_dashboard.html @@ -144,7 +144,7 @@
    diff --git a/portal/admin/core/html/general/analytics.html b/portal/admin/core/html/general/analytics.html index bae3b8dc..97a42369 100644 --- a/portal/admin/core/html/general/analytics.html +++ b/portal/admin/core/html/general/analytics.html @@ -43,7 +43,7 @@
    diff --git a/portal/admin/core/html/general/domain_edit_content.html b/portal/admin/core/html/general/domain_edit_content.html index cdf4154a..16e45158 100644 --- a/portal/admin/core/html/general/domain_edit_content.html +++ b/portal/admin/core/html/general/domain_edit_content.html @@ -41,7 +41,7 @@
    diff --git a/portal/admin/core/html/general/home_content.html b/portal/admin/core/html/general/home_content.html index 12859b91..74711e8d 100644 --- a/portal/admin/core/html/general/home_content.html +++ b/portal/admin/core/html/general/home_content.html @@ -392,7 +392,7 @@
    diff --git a/portal/admin/core/html/general/options_content.html b/portal/admin/core/html/general/options_content.html index 2fefded2..3e32c38a 100644 --- a/portal/admin/core/html/general/options_content.html +++ b/portal/admin/core/html/general/options_content.html @@ -129,7 +129,7 @@
    diff --git a/portal/admin/core/html/general/scheme_content.html b/portal/admin/core/html/general/scheme_content.html index ecaba009..7d504a6b 100644 --- a/portal/admin/core/html/general/scheme_content.html +++ b/portal/admin/core/html/general/scheme_content.html @@ -43,7 +43,7 @@
    diff --git a/portal/admin/core/html/modules/direct_payments/direct_payments_configuration.html b/portal/admin/core/html/modules/direct_payments/direct_payments_configuration.html index 0b5d88a2..3ec07c49 100644 --- a/portal/admin/core/html/modules/direct_payments/direct_payments_configuration.html +++ b/portal/admin/core/html/modules/direct_payments/direct_payments_configuration.html @@ -89,7 +89,7 @@
    diff --git a/portal/admin/core/html/modules/direct_payments/direct_payments_content.html b/portal/admin/core/html/modules/direct_payments/direct_payments_content.html index 573146c3..c562c4a9 100644 --- a/portal/admin/core/html/modules/direct_payments/direct_payments_content.html +++ b/portal/admin/core/html/modules/direct_payments/direct_payments_content.html @@ -45,7 +45,7 @@
    diff --git a/portal/admin/core/html/modules/direct_payments/direct_payments_payment.html b/portal/admin/core/html/modules/direct_payments/direct_payments_payment.html index 8feaea57..9660cc20 100644 --- a/portal/admin/core/html/modules/direct_payments/direct_payments_payment.html +++ b/portal/admin/core/html/modules/direct_payments/direct_payments_payment.html @@ -114,7 +114,7 @@
    diff --git a/portal/admin/core/html/modules/direct_payments/direct_payments_payments.html b/portal/admin/core/html/modules/direct_payments/direct_payments_payments.html index c4a3281a..be950967 100644 --- a/portal/admin/core/html/modules/direct_payments/direct_payments_payments.html +++ b/portal/admin/core/html/modules/direct_payments/direct_payments_payments.html @@ -78,7 +78,7 @@
    diff --git a/portal/admin/core/html/modules/direct_payments/direct_payments_settings.html b/portal/admin/core/html/modules/direct_payments/direct_payments_settings.html index 593558a2..7e01eba0 100644 --- a/portal/admin/core/html/modules/direct_payments/direct_payments_settings.html +++ b/portal/admin/core/html/modules/direct_payments/direct_payments_settings.html @@ -103,7 +103,7 @@
    diff --git a/portal/admin/core/html/modules/documents/documents_content.html b/portal/admin/core/html/modules/documents/documents_content.html index a32b87bf..0eceef3b 100644 --- a/portal/admin/core/html/modules/documents/documents_content.html +++ b/portal/admin/core/html/modules/documents/documents_content.html @@ -142,7 +142,7 @@
    diff --git a/portal/admin/core/html/modules/documents/documents_view_file_content.html b/portal/admin/core/html/modules/documents/documents_view_file_content.html index c2d72d4b..d978e250 100644 --- a/portal/admin/core/html/modules/documents/documents_view_file_content.html +++ b/portal/admin/core/html/modules/documents/documents_view_file_content.html @@ -432,7 +432,7 @@
    diff --git a/portal/admin/core/html/modules/email/email_content.html b/portal/admin/core/html/modules/email/email_content.html index 9635ef6b..0beceea2 100644 --- a/portal/admin/core/html/modules/email/email_content.html +++ b/portal/admin/core/html/modules/email/email_content.html @@ -53,7 +53,7 @@
    diff --git a/portal/admin/core/html/modules/forms/forms_edite_form.html b/portal/admin/core/html/modules/forms/forms_edite_form.html index 89922642..041c7c08 100644 --- a/portal/admin/core/html/modules/forms/forms_edite_form.html +++ b/portal/admin/core/html/modules/forms/forms_edite_form.html @@ -179,7 +179,7 @@
    diff --git a/portal/admin/core/html/modules/forms/forms_edite_form2.html b/portal/admin/core/html/modules/forms/forms_edite_form2.html index 9ca6c09c..9c11c386 100644 --- a/portal/admin/core/html/modules/forms/forms_edite_form2.html +++ b/portal/admin/core/html/modules/forms/forms_edite_form2.html @@ -131,7 +131,7 @@
    diff --git a/portal/admin/core/html/modules/forms/forms_form_submissions.html b/portal/admin/core/html/modules/forms/forms_form_submissions.html index fbeee778..9c0eb6ed 100644 --- a/portal/admin/core/html/modules/forms/forms_form_submissions.html +++ b/portal/admin/core/html/modules/forms/forms_form_submissions.html @@ -163,7 +163,7 @@
    diff --git a/portal/admin/core/html/modules/forms/forms_forms.html b/portal/admin/core/html/modules/forms/forms_forms.html index 146d35e4..6a1852fc 100644 --- a/portal/admin/core/html/modules/forms/forms_forms.html +++ b/portal/admin/core/html/modules/forms/forms_forms.html @@ -73,7 +73,7 @@
    diff --git a/portal/admin/core/html/modules/forms/forms_settings.html b/portal/admin/core/html/modules/forms/forms_settings.html index c795cd3a..90daec4b 100644 --- a/portal/admin/core/html/modules/forms/forms_settings.html +++ b/portal/admin/core/html/modules/forms/forms_settings.html @@ -87,7 +87,7 @@
    diff --git a/portal/admin/core/html/modules/forms/forms_submission.html b/portal/admin/core/html/modules/forms/forms_submission.html index 1874f26d..479bef2d 100644 --- a/portal/admin/core/html/modules/forms/forms_submission.html +++ b/portal/admin/core/html/modules/forms/forms_submission.html @@ -60,7 +60,7 @@
    diff --git a/portal/admin/core/html/modules/payments/payments_main.html b/portal/admin/core/html/modules/payments/payments_main.html index 317f2560..ac7bd4bd 100644 --- a/portal/admin/core/html/modules/payments/payments_main.html +++ b/portal/admin/core/html/modules/payments/payments_main.html @@ -80,7 +80,7 @@
    diff --git a/portal/admin/core/html/modules/payments/payments_money.html b/portal/admin/core/html/modules/payments/payments_money.html index e060982c..a7ba783b 100644 --- a/portal/admin/core/html/modules/payments/payments_money.html +++ b/portal/admin/core/html/modules/payments/payments_money.html @@ -207,7 +207,7 @@
    diff --git a/portal/admin/core/html/modules/payments/payments_payment.html b/portal/admin/core/html/modules/payments/payments_payment.html index f2154c48..442c60cd 100644 --- a/portal/admin/core/html/modules/payments/payments_payment.html +++ b/portal/admin/core/html/modules/payments/payments_payment.html @@ -59,7 +59,7 @@
    diff --git a/portal/admin/core/html/modules/payments/payments_processor_paypal.html b/portal/admin/core/html/modules/payments/payments_processor_paypal.html index 91cbf929..6e5ebece 100644 --- a/portal/admin/core/html/modules/payments/payments_processor_paypal.html +++ b/portal/admin/core/html/modules/payments/payments_processor_paypal.html @@ -81,7 +81,7 @@
    diff --git a/portal/admin/core/html/modules/payments/payments_processor_selection.html b/portal/admin/core/html/modules/payments/payments_processor_selection.html index a8f24bc7..4f720bbf 100644 --- a/portal/admin/core/html/modules/payments/payments_processor_selection.html +++ b/portal/admin/core/html/modules/payments/payments_processor_selection.html @@ -67,7 +67,7 @@
    diff --git a/portal/admin/core/html/modules/payments/payments_processor_stripe.html b/portal/admin/core/html/modules/payments/payments_processor_stripe.html index ab4a1544..d1fcf73b 100644 --- a/portal/admin/core/html/modules/payments/payments_processor_stripe.html +++ b/portal/admin/core/html/modules/payments/payments_processor_stripe.html @@ -85,7 +85,7 @@
    diff --git a/portal/admin/core/html/modules/payments/payments_processor_stripe_webhook.html b/portal/admin/core/html/modules/payments/payments_processor_stripe_webhook.html index fe45acbd..43e7f286 100644 --- a/portal/admin/core/html/modules/payments/payments_processor_stripe_webhook.html +++ b/portal/admin/core/html/modules/payments/payments_processor_stripe_webhook.html @@ -140,7 +140,7 @@
    diff --git a/portal/admin/core/html/modules/payments/payments_processor_stripe_webhooks.html b/portal/admin/core/html/modules/payments/payments_processor_stripe_webhooks.html index 82666b70..8dd0ae19 100644 --- a/portal/admin/core/html/modules/payments/payments_processor_stripe_webhooks.html +++ b/portal/admin/core/html/modules/payments/payments_processor_stripe_webhooks.html @@ -94,7 +94,7 @@
    diff --git a/portal/admin/core/html/modules/payments/payments_processors_paypal.html b/portal/admin/core/html/modules/payments/payments_processors_paypal.html index 72c12127..123038a7 100644 --- a/portal/admin/core/html/modules/payments/payments_processors_paypal.html +++ b/portal/admin/core/html/modules/payments/payments_processors_paypal.html @@ -88,7 +88,7 @@
    diff --git a/portal/admin/core/html/modules/payments/payments_processors_stripe.html b/portal/admin/core/html/modules/payments/payments_processors_stripe.html index 75a994a3..8a1972d3 100644 --- a/portal/admin/core/html/modules/payments/payments_processors_stripe.html +++ b/portal/admin/core/html/modules/payments/payments_processors_stripe.html @@ -88,7 +88,7 @@
    diff --git a/portal/admin/core/html/modules/payments/payments_subscription_paypal.html b/portal/admin/core/html/modules/payments/payments_subscription_paypal.html index b86cf1c1..6a9d1c85 100644 --- a/portal/admin/core/html/modules/payments/payments_subscription_paypal.html +++ b/portal/admin/core/html/modules/payments/payments_subscription_paypal.html @@ -140,7 +140,7 @@
    diff --git a/portal/admin/core/html/modules/payments/payments_subscriptions.html b/portal/admin/core/html/modules/payments/payments_subscriptions.html index 8272ba80..4b7e2ee8 100644 --- a/portal/admin/core/html/modules/payments/payments_subscriptions.html +++ b/portal/admin/core/html/modules/payments/payments_subscriptions.html @@ -101,7 +101,7 @@
    diff --git a/portal/admin/core/html/modules/sponsorship/sponsorship_content.html b/portal/admin/core/html/modules/sponsorship/sponsorship_content.html index 59b18df7..a729b7c3 100644 --- a/portal/admin/core/html/modules/sponsorship/sponsorship_content.html +++ b/portal/admin/core/html/modules/sponsorship/sponsorship_content.html @@ -71,7 +71,7 @@
    diff --git a/portal/admin/core/html/modules/sponsorship/sponsorship_edit_email_builder.html b/portal/admin/core/html/modules/sponsorship/sponsorship_edit_email_builder.html index 24d56c6e..a8ced13b 100644 --- a/portal/admin/core/html/modules/sponsorship/sponsorship_edit_email_builder.html +++ b/portal/admin/core/html/modules/sponsorship/sponsorship_edit_email_builder.html @@ -225,7 +225,7 @@
    diff --git a/portal/admin/core/html/modules/sponsorship/sponsorship_edit_menu.html b/portal/admin/core/html/modules/sponsorship/sponsorship_edit_menu.html index acbf2c7c..182da291 100644 --- a/portal/admin/core/html/modules/sponsorship/sponsorship_edit_menu.html +++ b/portal/admin/core/html/modules/sponsorship/sponsorship_edit_menu.html @@ -70,7 +70,7 @@
    @@ -159,7 +159,7 @@
    diff --git a/portal/admin/core/html/modules/sponsorship/sponsorship_edit_sponsorship.html b/portal/admin/core/html/modules/sponsorship/sponsorship_edit_sponsorship.html index 76e836d2..0d4dc0be 100644 --- a/portal/admin/core/html/modules/sponsorship/sponsorship_edit_sponsorship.html +++ b/portal/admin/core/html/modules/sponsorship/sponsorship_edit_sponsorship.html @@ -106,7 +106,7 @@
    diff --git a/portal/admin/core/html/modules/sponsorship/sponsorship_edit_template_selection.html b/portal/admin/core/html/modules/sponsorship/sponsorship_edit_template_selection.html index 0c684cdc..63306486 100644 --- a/portal/admin/core/html/modules/sponsorship/sponsorship_edit_template_selection.html +++ b/portal/admin/core/html/modules/sponsorship/sponsorship_edit_template_selection.html @@ -43,7 +43,7 @@
    diff --git a/portal/admin/core/html/modules/sponsorship/sponsorship_form_content.html b/portal/admin/core/html/modules/sponsorship/sponsorship_form_content.html index eab4d21d..0e01c03f 100644 --- a/portal/admin/core/html/modules/sponsorship/sponsorship_form_content.html +++ b/portal/admin/core/html/modules/sponsorship/sponsorship_form_content.html @@ -86,7 +86,7 @@
    diff --git a/portal/admin/core/html/modules/sponsorship/sponsorship_levels_content.html b/portal/admin/core/html/modules/sponsorship/sponsorship_levels_content.html index e96dc551..005b43b5 100644 --- a/portal/admin/core/html/modules/sponsorship/sponsorship_levels_content.html +++ b/portal/admin/core/html/modules/sponsorship/sponsorship_levels_content.html @@ -134,7 +134,7 @@
    diff --git a/portal/admin/core/html/modules/sponsorship/sponsorship_levels_create.html b/portal/admin/core/html/modules/sponsorship/sponsorship_levels_create.html index c521b28a..3d1d85c2 100644 --- a/portal/admin/core/html/modules/sponsorship/sponsorship_levels_create.html +++ b/portal/admin/core/html/modules/sponsorship/sponsorship_levels_create.html @@ -77,7 +77,7 @@
    diff --git a/portal/admin/core/html/modules/sponsorship/sponsorship_main_menu.html b/portal/admin/core/html/modules/sponsorship/sponsorship_main_menu.html index f386050b..ae43d86e 100644 --- a/portal/admin/core/html/modules/sponsorship/sponsorship_main_menu.html +++ b/portal/admin/core/html/modules/sponsorship/sponsorship_main_menu.html @@ -113,7 +113,7 @@
    @@ -202,7 +202,7 @@
    diff --git a/portal/admin/core/html/modules/sponsorship/sponsorship_manage_content.html b/portal/admin/core/html/modules/sponsorship/sponsorship_manage_content.html index 594af849..32deef3f 100644 --- a/portal/admin/core/html/modules/sponsorship/sponsorship_manage_content.html +++ b/portal/admin/core/html/modules/sponsorship/sponsorship_manage_content.html @@ -65,7 +65,7 @@
    diff --git a/portal/admin/core/html/modules/sponsorship/sponsorship_settings.html b/portal/admin/core/html/modules/sponsorship/sponsorship_settings.html index c573c08a..ff733ed5 100644 --- a/portal/admin/core/html/modules/sponsorship/sponsorship_settings.html +++ b/portal/admin/core/html/modules/sponsorship/sponsorship_settings.html @@ -97,7 +97,7 @@
    diff --git a/portal/admin/core/html/modules/sponsorship/sponsorship_sponsors.html b/portal/admin/core/html/modules/sponsorship/sponsorship_sponsors.html index 11a59e75..ef64de7b 100644 --- a/portal/admin/core/html/modules/sponsorship/sponsorship_sponsors.html +++ b/portal/admin/core/html/modules/sponsorship/sponsorship_sponsors.html @@ -62,7 +62,7 @@
    diff --git a/portal/admin/core/html/modules/sponsorship/sponsorship_sponsorship.html b/portal/admin/core/html/modules/sponsorship/sponsorship_sponsorship.html index 946268ce..e060d7d0 100644 --- a/portal/admin/core/html/modules/sponsorship/sponsorship_sponsorship.html +++ b/portal/admin/core/html/modules/sponsorship/sponsorship_sponsorship.html @@ -90,7 +90,7 @@
    diff --git a/portal/admin/core/html/modules/subscriber/subscribe_delivery.html b/portal/admin/core/html/modules/subscriber/subscribe_delivery.html index 1b34e843..1792a9f3 100644 --- a/portal/admin/core/html/modules/subscriber/subscribe_delivery.html +++ b/portal/admin/core/html/modules/subscriber/subscribe_delivery.html @@ -115,7 +115,7 @@
    diff --git a/portal/admin/core/html/modules/subscriber/subscribe_home.html b/portal/admin/core/html/modules/subscriber/subscribe_home.html index 0562f89f..159cb1dd 100644 --- a/portal/admin/core/html/modules/subscriber/subscribe_home.html +++ b/portal/admin/core/html/modules/subscriber/subscribe_home.html @@ -52,7 +52,7 @@
    diff --git a/portal/admin/core/html/modules/subscriber/subscribe_manage.html b/portal/admin/core/html/modules/subscriber/subscribe_manage.html index 68f1d40e..6480bec5 100644 --- a/portal/admin/core/html/modules/subscriber/subscribe_manage.html +++ b/portal/admin/core/html/modules/subscriber/subscribe_manage.html @@ -106,7 +106,7 @@
    diff --git a/portal/admin/core/html/modules/subscriber/subscriber_catalog_editor.html b/portal/admin/core/html/modules/subscriber/subscriber_catalog_editor.html index bb29420c..3c445aff 100644 --- a/portal/admin/core/html/modules/subscriber/subscriber_catalog_editor.html +++ b/portal/admin/core/html/modules/subscriber/subscriber_catalog_editor.html @@ -146,7 +146,7 @@
    diff --git a/portal/admin/core/html/modules/subscriber/subscriber_catalog_overview.html b/portal/admin/core/html/modules/subscriber/subscriber_catalog_overview.html index cc30824e..d69dcb9b 100644 --- a/portal/admin/core/html/modules/subscriber/subscriber_catalog_overview.html +++ b/portal/admin/core/html/modules/subscriber/subscriber_catalog_overview.html @@ -33,6 +33,11 @@
    + + + Settings + + Back @@ -236,7 +241,7 @@
    diff --git a/portal/admin/core/html/modules/subscriber/subscriber_manage_catalogs.html b/portal/admin/core/html/modules/subscriber/subscriber_manage_catalogs.html index b08f5963..fdd506f0 100644 --- a/portal/admin/core/html/modules/subscriber/subscriber_manage_catalogs.html +++ b/portal/admin/core/html/modules/subscriber/subscriber_manage_catalogs.html @@ -39,11 +39,11 @@ Back - + Create new Catalog diff --git a/portal/admin/core/html/modules/subscriber/subscriber_settings.html b/portal/admin/core/html/modules/subscriber/subscriber_settings.html index 3dd8503e..8d53777f 100644 --- a/portal/admin/core/html/modules/subscriber/subscriber_settings.html +++ b/portal/admin/core/html/modules/subscriber/subscriber_settings.html @@ -30,10 +30,7 @@
    - -
    -
    - +
    diff --git a/portal/admin/playground/client/general/email/request.php b/portal/admin/playground/client/general/email/request.php index 866068d7..e14c7e05 100644 --- a/portal/admin/playground/client/general/email/request.php +++ b/portal/admin/playground/client/general/email/request.php @@ -1,8 +1,9 @@ $value]); } + + +if(Input::get('domain')){ + + $email = new EmailManager(); + + $resp = $email->authDomain(); + + EchoJsonObject(["response" => json_decode($resp)]); + +} + + + if(Input::get("send_email")){ $data = json_decode(Input::get("data"), true); diff --git a/portal/admin/playground/client/general/email/script.js b/portal/admin/playground/client/general/email/script.js index bb3b01be..759d0bcd 100644 --- a/portal/admin/playground/client/general/email/script.js +++ b/portal/admin/playground/client/general/email/script.js @@ -8,23 +8,33 @@ $("#submit_send_email").on("click",function(e){ e.preventDefault(); - console.log("hello"); - const value = $("#data_input_textarea").val().trim(); let json = JSON.parse(value); console.log(json); if(value==""){alert("Please add text");return;} $("#data_output_textarea").val(""); + $.post("request.php",{ - "send_email": true, - "data": value + "domain": true, + "data": {} },function(resp){ + resp = JSON.parse(resp); resp = JSON.parse(resp); console.log(resp); // $("#data_output_textarea").val(JSON.stringify(resp.data)); }); + + // $.post("request.php",{ + // "send_email": true, + // "data": value + // },function(resp){ + // resp = JSON.parse(resp); + // console.log(resp); + // // $("#data_output_textarea").val(JSON.stringify(resp.data)); + // }); + }); // https://jsoneditoronline.org/#left=local.pewama diff --git a/portal/admin/playground/client/subscribers/_index.php b/portal/admin/playground/client/subscribers/_index.php new file mode 100644 index 00000000..32bde827 --- /dev/null +++ b/portal/admin/playground/client/subscribers/_index.php @@ -0,0 +1,478 @@ + + + + + + + + + + + + + Cradle2Career + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + + + + + + + + + + + + +
    +
    +
    +

    NOVEMBER 1, 2025 - TEEN PARENT SUMMIT

    + +

    Register Here

    +
    +
    +
    +

    + 🌟 You Got This! Teen Summit + Empowering teen parents through education, support & community +

    +
    +
    + +
    +
    + + + +
    +
    + +
    +
    + + +
    +
    + +

    Register Here

    +
    +

    Living Word Fellowshipp Church

    +

    7350 TC Jester BLVD.

    +

    Houston, TX 77088

    + + + + +

    (832) 987-2076 | info@cradle2careertx.org

    + +
    + +
    + + + + +
    +
    + + + +
    + + + + + + +
    + + + + + + + + + + + + +
    +
    + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/portal/admin/playground/client/subscribers/default_schema.js b/portal/admin/playground/client/subscribers/default_schema.js new file mode 100644 index 00000000..1b9e0882 --- /dev/null +++ b/portal/admin/playground/client/subscribers/default_schema.js @@ -0,0 +1,3017 @@ + + +function __tmp_zone_data(){ + return { + "$origin": "MYDOMAIN.COM.", + "$ttl": 3600, + "soa": { + "mname": "NS1.NAMESERVER.NET.", + "rname": "HOSTMASTER.MYDOMAIN.COM.", + "serial": "{time}", + "refresh": 3600, + "retry": 600, + "expire": 604800, + "minimum": 86400 + }, + "ns": [ + { "host": "NS1.NAMESERVER.NET." }, + { "host": "NS2.NAMESERVER.NET." } + ], + "a": [ + { "name": "@", "ip": "127.0.0.1" }, + { "name": "www", "ip": "127.0.0.1" }, + { "name": "mail", "ip": "127.0.0.1" } + ], + "aaaa": [ + { "ip": "::1" }, + { "name": "mail", "ip": "2001:db8::1" } + ], + "cname":[ + { "name": "mail1", "alias": "mail" }, + { "name": "mail2", "alias": "mail" } + ], + "mx":[ + { "preference": 0, "host": "mail1" }, + { "preference": 10, "host": "mail2" } + ], + "txt":[ + { "name": "txt1", "txt": "hello" }, + { "name": "txt2", "txt": "world" } + ], + "srv":[ + { "name": "_xmpp-client._tcp", "target": "jabber", "priority": 10, "weight": 0, "port": 5222 }, + { "name": "_xmpp-server._tcp", "target": "jabber", "priority": 10, "weight": 0, "port": 5269 } + ] + } +} + +let GLOBAL_SETTINGS = {}; + + +// DONE +GLOBAL_SETTINGS.IM_READY_TO_APPLY = [ + { + json: { + "mysql_id":-1, + "category":"none", + "nameid":"im_ready_to_apply", + "access":"fasdklfjadjsflkf4324nkd9324", + "language":"en-US", + "reference_abbr":"ira", + "reference_num":"", + "start_page":0, + "display_name":"I'm Ready To Apply", + "loading_delay":2000, + "files":[], + "submission":[], + "html_template":"basic", + "variables":[ + { + "name":"response_email", + "value":"info@cradle2careertx.xyz" + } + ], + "request":{ + "url":"/core/php/request.php", + "onsubmit":"api_submit_form_become_a_member", + "dataupload":"api_uploadme_data", + "fileupload":"api_uploadme_data2", + "savedirectory": "forms/im_ready_to_apply" + }, + "pdf_output":{ + "image":"c2c_hrz-bg_pos_RGB.png", + "title":"I'm Ready To Apply", + "content":"" + }, + "email_response":{ + "title":"", + "body":"

    Thank you $#fullname, for taking the time to fill out our online form. Your submission has been successfully received.

    Rest assured all the information you shared with us will be treated with the utmost confidentiality and used solely for the intended purpose.

    If you have any questions or require any assistance, please don't hesitate to contact us at info@cradle2careerx.org

    Sincerely,
    The Cradle Team
    ", + "subject":"Thank you $#fullname", + "email":"", + "template":"_email_alert", + "from":"no-reply", + "footer":"Make sure to add $#response_email to your contacts list." + }, + "email_alert":{ + "title":"New form applicant submission", + "body":"

    A new form has been submmitted, view quick link

    ", + "subject":"Cradle2Careertx - Notification Alert", + "emails":[ + "james@appfactory.studio" + ], + "template":"_email_alert", + "from":"no-reply", + "footer":"Make sure to add $#response_email to your contacts list." + }, + "html_templates":{ + "basic":{ + "style":"../../portal/admin/system/data/html_templates/im_ready_to_apply/1/styles.css", + "button":"../../portal/admin/system/data/html_templates/im_ready_to_apply/1/button.html", + "label":"../../portal/admin/system/data/html_templates/im_ready_to_apply/1/label.html", + "container":"../../portal/admin/system/data/html_templates/im_ready_to_apply/1/container.html", + "textfield":"../../portal/admin/system/data/html_templates/im_ready_to_apply/1/textfield.html", + "radio":"../../portal/admin/system/data/html_templates/im_ready_to_apply/1/radio.html", + "checkbox":"../../portal/admin/system/data/html_templates/im_ready_to_apply/1/checkbox.html", + "upload":"../../portal/admin/system/data/html_templates/im_ready_to_apply/1/upload.html", + "checkbox_group":"../../portal/admin/system/data/html_templates/im_ready_to_apply/1/checkbox_group.html", + "signature":"../../portal/admin/system/data/html_templates/im_ready_to_apply/1/signature.html" + } + }, + "pages":[ + // v + { + "id":0, + "nameid":"klasdjfkj34895", + "title":"What is your age?", + "buttons":[ + { + "label":"", + "id":"fsfggsghgfhgsfdg", + "element_id":"gsgfgfdggrthh", + "className":"form-nav-btns-left" + }, + { + "label":"Next", + "id":"fdgku657", + "element_id":"fdsghndhrtyhrtgggh", + "className":"form-nav-btns-right", + "actions":[ + { + "id":0, + "question_id":0, + "success":false, + "answers_match":[ + "" + ], + "type":"alert", + "message":"Please select your age group!" + }, + { + "id":1, + "question_id":0, + "success":false, + "answers_match":[ + 2 + ], + "type":"connect", + "to":"djflkjgfg3456" + }, + { + "id":2, + "question_id":0, + "success":true, + "answers_match":[ + 0, + 1, + 3 + ], + "type":"connect", + "to":"fadjhjfghj84434" + } + ] + } + ], + "questions":[ + { + "id":0, + "type":"radio", + "answers_choosen":[ + + ], + "correct_answer":[ + 1, + 2, + 3, + 4 + ], + "action_on_correct":2, + "use_title":true, + "name":"dtjshsttwth", + "options":[ + { + "element_id":"ksgjksdfglkjkdasfj84u5gfd", + "display_value":"13-17", + "return_value":0 + }, + { + "element_id":"fglkskg4935gfghfdsgsd", + "display_value":"18-20", + "return_value":1 + }, + { + "element_id":"dfgfghfgrt4tghhdfg", + "display_value":"I'm 21 or older", + "return_value":2 + }, + { + "element_id":"jhghjghhjwwerd", + "display_value":"I'm under the age of 13", + "return_value":3 + } + ] + } + ] + }, + + // v + { + "id":1, + "nameid":"fadjhjfghj84434", + "title":"I gave birth to my first child BEFORE I turned 20?", + "buttons":[ + { + "label":"Back", + "id":"sgghh545", + "className":"form-nav-btns-left", + "default":{ + "type":"connect", + "to":"klasdjfkj34895" + } + }, + { + "label":"Next", + "id":"sfdgsdfhdg", + "className":"form-nav-btns-right", + "actions":[ + { + "id":0, + "question_id":0, + "answers_match":[ + "" + ], + "type":"alert", + "message":"Please select an option!" + }, + { + "id":1, + "question_id":0, + "answers_match":[ + 1 + ], + "type":"connect", + "to":"djflkjgfg3456" + }, + { + "id":2, + "question_id":0, + "answers_match":[ + 0, + 2 + ], + "type":"connect", + "to":"fjkja99u435nv" + } + ] + } + ], + "questions":[ + { + "id":0, + "type":"radio", + "order":0, + "answers_choosen":[ + + ], + "correct_answers":[ + 1, + 2, + 3, + 4 + ], + "action_on_correct":2, + "use_title":true, + "name":"gfh9u435nn", + "options":[ + { + "element_id":"sdfgfghjhvcxxx", + "display_value":"Yes, this is correct", + "return_value":0 + }, + { + "element_id":"sswertyhhjbvcc", + "display_value":"No, I was 20 or older when my first child was born", + "return_value":1 + }, + { + "element_id":"sfghhjg4tyhfff", + "display_value":"I'm currently pregnant with my first child", + "return_value":2 + } + ] + } + ] + }, + + // v- fail + { + "id":2, + "nameid":"djflkjgfg3456", + "title":"Feel free to check out our Resource Directory at www.cradle2careertx.org/resources for a list of other local agencies that may be able to help! If you have any questions, feel free to give us a call at 832-987-2076).", + "buttons":[ + { + "label":"Back", + "id":"dfhfghjy5", + "className":"form-nav-btns-left", + "default":{ + "type":"connect", + "to":"klasdjfkj34895" + } + } + ], + "questions":[ + + ] + }, + + // v + { + "id":3, + "nameid":"fjkja99u435nv", + "title":"I am a documented US Citizen or have a lawful status", + "buttons":[ + { + "label":"Back", + "id":"jhfeyy5", + "className":"form-nav-btns-left", + "default":{ + "type":"connect", + "to":"fadjhjfghj84434" + } + }, + { + "label":"Next", + "id":"fjhhksfg4at", + "className":"form-nav-btns-right", + "actions":[ + { + "id":0, + "question_id":0, + "answers_match":[ + "" + ], + "type":"alert", + "message":"Please select an option!" + }, + { + "id":1, + "question_id":0, + "answers_match":[ + 0, + 1, + 2 + ], + "type":"connect", + "to":"kjfgkjdsaf823r8ujadf" + } + ] + } + ], + "questions":[ + { + "id":0, + "type":"radio", + "answers_choosen":[ + + ], + "order":0, + "correct_answer":[ + 1, + 2, + 3 + ], + "use_title":true, + "name":"kljdfggfaa4535", + "options":[ + { + "element_id":"gfsssswerr34ujnn", + "display_value":"Yes", + "return_value":0 + }, + { + "element_id":"mmkllhloiyddee", + "display_value":"No", + "return_value":1 + }, + { + "element_id":"zzwtyhhhjjkkggfdfet", + "display_value":"I'm not sure", + "return_value":2 + } + ] + } + ] + }, + + // + { + "id":4, + "nameid":"kjfgkjdsaf823r8ujadf", + "title":"Cradle2Career - Youth Parent intake form", + "buttons":[ + { + "label":"Back", + "id":"sfdgsdfggfsf", + "className":"form-nav-btns-left", + "default":{ + "type":"connect", + "to":"fjkja99u435nv" + } + }, + { + "label":"Submit", + "type":"submit", + "id":"kljhadg57666645", + "className":"form-nav-btns-right", + "actions":[ + { + "id":0, + "question_id":0, + "answers_match":[ + "" + ], + "type":"alert", + "message":"Please add your first and last name" + }, + { + "id":1, + "question_id":1, + "answers_match":[ + "" + ], + "type":"alert", + "message":"Please add your email address", + "validator":false + }, + { + "id":2, + "question_id":2, + "answers_match":[ + "" + ], + "type":"alert", + "message":"Please add your phone number", + "validator":false + }, + { + "id":3, + "question_id":3, + "answers_match":[ + "" + ], + "type":"alert", + "message":"Please select an option!", + "validator":false + }, + { + "id":4, + "question_id":4, + "answers_match":[ + "" + ], + "type":"alert", + "message":"Please select an option!", + "validator":false + }, + { + "id":5, + "question_id":5, + "answers_match":[ + "" + ], + "type":"alert", + "message":"Please confirm", + "validator":false + }, + { + "id":6, + "question_id":9, + "answers_match":[ + false, "" + ], + "type":"alert", + "message":"Please confirm that you understand if younger than 13 need parent or legal guardian consent", + "validator":false + }, + { + "id":7, + "type":"submit", + "answers_match":[ + "___ACTION___" + ], + "to":"ksdfjgkjdfgkads" + } + ] + } + ], + "questions":[ + { + "id":0, + "type":"text", + "element_id":"fhdhgsfdgghddfhfghfgssg", + "label":"What is your first and last name? *", + "order":0, + "person_name":true, + "variable":"fullname", + "answers_choosen":[ + + ], + "correct_answer":[ + + ], + "action_on_correct":2 + }, + { + "id":1, + "type":"email", + "element_id":"lkjjjhbhvhbhsdb", + "label":"What is your email address? *", + "order":1, + "variable":"email", + "response_email":true, + "answers_choosen":[ + + ], + "correct_answer":[ + + ], + "action_on_correct":2 + }, + { + "id":2, + "type":"text", + "label":"What is your phone number? *", + "element_id":"nnbffdfvfvdfv", + "order":2, + "answers_choosen":[ + + ], + "correct_answer":[ + + ], + "action_on_correct":2 + }, + { + "id":3, + "type":"radio", + "label":"How many children do you have? *", + "element_id":"adsfkfldjglkasdf", + "order":3, + "answers_choosen":[ + + ], + "correct_answer":[ + 1, + 2, + 3 + ], + "action_on_correct":2, + "options":[ + { + "display_value":"1", + "return_value":0 + }, + { + "display_value":"2", + "return_value":1 + }, + { + "display_value":"3", + "return_value":3 + }, + { + "display_value":"Currently pregnant", + "return_value":4 + } + ] + }, + { + "id":4, + "type":"checkbox_group", + "label":"What is the sex of your child/children? *", + "element_id":"hggfhghkjhjkh", + "order":2, + "options":[ + { + "id":0, + "type":"checkbox", + "element_id":"dghdghhsdgdfgfg", + "label":"Boy", + "return_value":0, + "order":6, + "answers_choosen":[ + + ] + }, + { + "id":1, + "type":"checkbox", + "element_id":"ggfhdghdg", + "label":"Girl", + "return_value":0, + "order":6, + "answers_choosen":[ + + ] + }, + { + "id":2, + "type":"checkbox", + "element_id":"dfgsdfgsdf", + "label":"Unknown", + "return_value":0, + "order":6, + "answers_choosen":[ + + ] + } + ] + }, + { + "id":5, + "type":"checkbox_group", + "label":"What are the ages of your child/children? * ", + "element_id":"adsfsdads", + "order":2, + "options":[ + { + "id":0, + "type":"checkbox", + "element_id":"fsgsfgfdg", + "label":"0-1", + "return_value":0, + "order":6, + "answers_choosen":[ + + ] + }, + { + "id":1, + "type":"checkbox", + "element_id":"dfjhjasdfkljdfdgjire", + "label":"3-6", + "return_value":0, + "order":6, + "answers_choosen":[ + + ] + }, + { + "id":2, + "type":"checkbox", + "element_id":"vnjjsdkfjkjaskfkad", + "label":"7-10", + "return_value":0, + "order":6, + "answers_choosen":[ + + ] + }, + { + "id":3, + "type":"checkbox", + "element_id":"vnjjsdkfjkjaskfkad", + "label":"Other", + "return_value":0, + "order":6, + "answers_choosen":[ + + ] + } + ] + }, + { + "id":6, + "type":"radio", + "label":"What is the best way for Cradle2Career staff to contact you? *", + "element_id":"dgfgjhgjhgfhfgfgdf", + "order":3, + "answers_choosen":[ + + ], + "correct_answer":[ + 1, + 2, + 3, + 4 + ], + "action_on_correct":2, + "options":[ + { + "display_value":"Phone", + "return_value":0 + }, + { + "display_value":"Email", + "return_value":1 + } + ] + }, + { + "id":7, + "type":"radio", + "label":"How did you hear about Cradle2Career? *", + "order":4, + "answers_choosen":[ + + ], + "correct_answer":[ + 1, + 2, + 3, + 4 + ], + "action_on_correct":2, + "name":"akjdsfkadf", + "options":[ + { + "element_id":"dgfdgh", + "display_value":"TV", + "return_value":0 + }, + { + "element_id":"asghghfgfhjghfsghhg", + "display_value":"Google", + "return_value":1 + }, + { + "element_id":"kljgdfjkgksdfg", + "display_value":"Instagram", + "return_value":2 + }, + { + "element_id":"klasdkfdhjkjgasdf", + "display_value":"Twitter", + "return_value":3 + }, + { + "element_id":"vbbgfdghdhfgdhf", + "display_value":"Facebook", + "return_value":4 + }, + { + "element_id":"ooihfjnshfdgjnjdv", + "display_value":"Friend/Family", + "return_value":5 + }, + { + "element_id":"jjgrhngfhfjhvri945", + "display_value":"Other", + "return_value":6 + } + ] + }, + + // files + { + "id":8, + "type":"upload", + "element_id":"sdfgrjwhf834bgj", + "label":"
    You can upload any additional items here.
    ", + "return_value":0, + "order":7, + "answers_choosen":[ + + ] + }, + + // + { + "id":9, + "type":"checkbox", + "element_id":"ghfghfgkghbjkmnjn", + "label":"I understand if younger than 13 need parent or legal guardian consent.", + "return_value":100, + "required":true, + "order":8, + "answers_choosen":[ + + ] + } + ] + }, + + // + { + "id":5, + "nameid":"hjkfdhgjfkdhthrhdyt", + "title":"Thank you for your submission. Someone from our staff will be in touch with you soon!", + "buttons":[ + { + "label":"Close", + "id":"dfhfghjy5", + "className":"form-nav-btns-left", + "default":{ + "type":"close" + } + } + ], + "questions":[ + + ] + } + ] + } + + } +]; + +// DONE +GLOBAL_SETTINGS.BECOME_A_BOARD_MEMBER_APP_DATA = [ + { + json: { + "mysql_id":-1, + "category":"none", + "nameid":"become_a_board_member", + "access":"fasdklfjadjsflkf4324nkd9324", + "language":"en-US", + "reference_abbr":"cabm", + "reference_num":"", + "start_page":1, + "display_name":"Become a Board Member", + "loading_delay":2000, + "files":[], + "submission":[], + "html_template":"basic", + "pdf_output":{ + "image":"c2c_hrz-bg_pos_RGB.png", + "title":"Become a Board Member", + "content":"" + }, + "variables":[ + { + "name":"response_email", + "value":"info@cradle2careertx.xyz" + } + ], + "request":{ + "url":"/core/php/request.php", + "onsubmit":"api_submit_form_become_a_member", + "dataupload":"api_uploadme_data", + "fileupload":"api_uploadme_data2", + "savedirectory": "forms/become_a_board_member" + }, + "email_response":{ + "title":"", + "body":"

    Thank you $#fullname, for taking the time to fill out our online form. Your submission has been successfully received.

    Rest assured all the information you shared with us will be treated with the utmost confidentiality and used solely for the intended purpose.

    If you have any questions or require any assistance, please don't hesitate to contact us at info@cradle2careerx.org

    Sincerely,
    The Cradle Team
    ", + "subject":"Thank you $#fullname", + "email":"", + "template":"_email_alert", + "from":"no-reply", + "footer":"Make sure to add $#response_email to your contacts list." + }, + "email_alert":{ + "title":"New form applicant submission", + "body":"

    A new form has been submmitted, to view the form please click here for quick view.

    ", + "subject":"Cradle2Careertx - Notification Alert", + "emails":[ + "james@appfactory.studio" + ], + "template":"_email_alert", + "from":"no-reply", + "footer":"Make sure to add $#response_email to your contacts list." + }, + "html_templates":{ + "basic":{ + "style":"../../portal/admin/system/data/html_templates/im_ready_to_apply/1/styles.css", + "button":"../../portal/admin/system/data/html_templates/im_ready_to_apply/1/button.html", + "label":"../../portal/admin/system/data/html_templates/im_ready_to_apply/1/label.html", + "container":"../../portal/admin/system/data/html_templates/im_ready_to_apply/1/container.html", + "textfield":"../../portal/admin/system/data/html_templates/im_ready_to_apply/1/textfield.html", + "radio":"../../portal/admin/system/data/html_templates/im_ready_to_apply/1/radio.html", + "checkbox":"../../portal/admin/system/data/html_templates/im_ready_to_apply/1/checkbox.html", + "upload":"../../portal/admin/system/data/html_templates/im_ready_to_apply/1/upload.html", + "checkbox_group":"../../portal/admin/system/data/html_templates/im_ready_to_apply/1/checkbox_group.html", + "text_group":"../../portal/admin/system/data/html_templates/im_ready_to_apply/1/text_group.html", + "text_style2":"../../portal/admin/system/data/html_templates/im_ready_to_apply/1/text_style2.html", + "textarea":"../../portal/admin/system/data/html_templates/im_ready_to_apply/1/textarea.html", + "signature":"../../portal/admin/system/data/html_templates/im_ready_to_apply/1/signature.html" + } + }, + "pages":[ + { + "id":0, + "nameid":"fjkja99u435nv", + "title":"I am a documented US Citizen or have a lawful status", + "buttons":[ + { + "label":"Back", + "id":"jhfeyy5", + "className":"form-nav-btns-left", + "default":{ + "type":"connect", + "to":"fadjhjfghj84434" + } + }, + { + "label":"Next", + "id":"fjhhksfg4at", + "className":"form-nav-btns-right", + "actions":[ + { + "id":0, + "question_id":0, + "answers_match":[ + "" + ], + "type":"alert", + "message":"Please select an option!" + }, + { + "id":1, + "question_id":0, + "answers_match":[ + 0, + 1, + 2 + ], + "type":"connect", + "to":"kjfgkjdsaf823r8ujadf" + } + ] + } + ], + "questions":[ + { + "id":0, + "type":"radio", + "answers_choosen":[ + + ], + "order":0, + "correct_answer":[ + 1, + 2, + 3 + ], + "use_title":true, + "name":"kljdfggfaa4535", + "options":[ + { + "element_id":"gfsssswerr34ujnn", + "display_value":"Yes", + "return_value":0 + }, + { + "element_id":"mmkllhloiyddee", + "display_value":"No", + "return_value":1 + }, + { + "element_id":"zzwtyhhhjjkkggfdfet", + "display_value":"I'm not sure", + "return_value":2 + } + ] + } + ] + }, + { + "id":1, + "nameid":"kjfgkjdsaf823r8ujadf", + "title":"Cradle2Career Board Member Application", + "buttons":[ + { + "label":"", + "id":"sfdgsdfggfsf", + "className":"form-nav-btns-left", + "default":{ + "type":"connect", + "to":"fjkja99u435nv" + } + }, + { + "label":"Submit", + "type":"submit", + "id":"kljhadg57666645", + "className":"form-nav-btns-right", + "actions":[ + { + "id":0, + "question_id":1, + "answers_match":[ + "" + ], + "type":"alert", + "message":"Please out all fields", + "required":true + }, + { + "id":1, + "question_id":2, + "answers_match":[ + "" + ], + "type":"alert", + "message":"Please out all fields", + "required":true + }, + { + "id":2, + "question_id":3, + "answers_match":[ + "" + ], + "type":"alert", + "message":"Please select an option!", + "required":true + }, + { + "id":3, + "question_id":4, + "answers_match":[ + "" + ], + "type":"alert", + "message":"Please out all fields", + "required":true + }, + { + "id":4, + "question_id":7, + "answers_match":[ + "" + ], + "type":"alert", + "message":"Please out all fields", + "required":true + }, + { + "id":5, + "question_id":8, + "answers_match":[ + "" + ], + "type":"alert", + "message":"Please out all fields", + "required":true + }, + { + "id":6, + "question_id":9, + "answers_match":[ + "" + ], + "type":"alert", + "message":"Please out all fields", + "required":true + }, + { + "id":7, + "question_id":10, + "answers_match":[ + "" + ], + "type":"alert", + "message":"Please out all fields", + "required":true + }, + { + "id":8, + "question_id":11, + "answers_match":[ + "" + ], + "type":"alert", + "message":"Please out all fields", + "required":true + }, + { + "id":9, + "question_id":12, + "answers_match":[ + "" + ], + "type":"alert", + "message":"Please sign your name and date!", + "required":true + }, + { + "id":10, + "question_id":13, + "answers_match":[ + false,"" + ], + "type":"alert", + "message":"Please consent to be sent communications regarding my Board application!", + "required":true + }, + { + "id":11, + "type":"submit", + "answers_match":[ + "___ACTION___" + ], + "to":"ksdfjgkjdfgkads" + } + ] + } + ], + "questions":[ + { + "id":0, + "type":"label", + "classes":"mb-4", + "element_id":"dghdgfhjytry54hd", + "label":"Thank you for your interest in joining Cradle2Career 501(c3) non-profit board! Please tell us about yourself. Please Note: the information submitted will be shared as applicable. " + }, + { + "id":1, + "type":"text", + "label":"What is your first and last name? *", + "order":0, + "person_name":true, + "variable":"fullname", + "required":true, + "element_id":"xvcbgngnnjdfgrtj", + "answers_choosen":[ + + ], + "correct_answer":[ + + ], + "action_on_correct":2 + }, + { + "id":2, + "type":"email", + "element_id":"lkjjjhbhvhbhsdb", + "label":"What is your email address? *", + "variable":"email", + "order":1, + "required":true, + "response_email":true, + "answers_choosen":[ + + ], + "correct_answer":[ + + ], + "action_on_correct":2 + }, + { + "id":3, + "type":"text", + "label":"What is your phone number? *", + "element_id":"nnbffdfh7yhuyvfvdfv", + "order":2, + "required":true, + "variable":"phone", + "answers_choosen":[ + + ], + "correct_answer":[ + + ], + "action_on_correct":2 + }, + { + "id":4, + "type":"textarea", + "label":"Briefly describe why you would like to join our Board of Directors: ", + "element_id":"sdfgsgjhsfdjh8345njg", + "order":2, + "required":true, + "answers_choosen":[ + + ], + "correct_answer":[ + + ] + }, + { + "id":5, + "type":"text_group", + "label":"Your current organizational affiliations (names of the organization and your role(s), please include any current boards you serve on): ", + "element_id":"sdfgsgjhsfdjh8345njg", + "order":2, + "required":true, + "answers_choosen":[ + + ], + "correct_answer":[ + + ], + "options":[ + { + "id":0, + "type":"text", + "label":"1", + "element_id":"gsfgret8ungnsfgfs", + "order":2, + "answers_choosen":[ + + ] + }, + { + "id":1, + "type":"text", + "label":"2", + "element_id":"kdjfka8u4gsfdkgn", + "order":2, + "answers_choosen":[ + + ] + }, + { + "id":2, + "type":"text", + "label":"3", + "element_id":"fsdlgkdfkgjijeij843nsg", + "order":2, + "answers_choosen":[ + + ] + }, + { + "id":3, + "type":"text", + "label":"4", + "element_id":"sdfgjdjs8u4hngjnadjnd", + "order":2, + "answers_choosen":[ + + ] + } + ] + }, + { + "id":6, + "type":"checkbox_group", + "label":"Which of your skills would you like to utilize on the Board? Check those that apply:", + "element_id":"hggfhghkjhjkh", + "required":true, + "order":2, + "options":[ + { + "id":0, + "type":"checkbox", + "element_id":"dghdghhsdgdfgfg", + "label":"Board development", + "return_value":0, + "order":6, + "answers_choosen":[ + + ] + }, + { + "id":1, + "type":"checkbox", + "element_id":"ggfhdghdg", + "label":"Strategic planning", + "return_value":1, + "order":6, + "answers_choosen":[ + + ] + }, + { + "id":2, + "type":"checkbox", + "element_id":"sdfghgfdhjd6hdgfh", + "label":"Staffing / HR", + "return_value":2, + "order":6, + "answers_choosen":[ + + ] + }, + { + "id":3, + "type":"checkbox", + "element_id":"ghjshdfsgdhghs5t4y6h", + "label":"Program development", + "return_value":3, + "order":6, + "answers_choosen":[ + + ] + }, + { + "id":4, + "type":"checkbox", + "element_id":"dklfjaeiofuheuergthh843u", + "label":"Financial management", + "return_value":4, + "order":6, + "answers_choosen":[ + + ] + }, + { + "id":5, + "type":"checkbox", + "element_id":"kdjajnfqi834uyrh54ggg", + "label":"Fundraising", + "return_value":5, + "order":6, + "answers_choosen":[ + + ] + }, + { + "id":6, + "type":"checkbox", + "element_id":"sgfngrjitigrgireja4983u8t8g", + "label":"Evaluation", + "return_value":6, + "order":6, + "answers_choosen":[ + + ] + }, + { + "id":7, + "type":"checkbox", + "element_id":"fdglkfgpdgfdgoerpgjfdgsg", + "label":"Community networking", + "return_value":7, + "order":6, + "answers_choosen":[ + + ] + }, + { + "id":8, + "type":"checkbox", + "element_id":"gsdflgkopnvbnxcbznnsdf", + "label":"Training", + "return_value":8, + "order":6, + "answers_choosen":[ + + ] + }, + { + "id":9, + "type":"checkbox", + "element_id":"sdfgakmwepokfi43ujtggf", + "label":"Marketing", + "return_value":9, + "order":6, + "answers_choosen":[ + + ] + }, + { + "id":10, + "type":"checkbox", + "element_id":"adsfjjrie94utgiohifadfdsa", + "label":"Volunteer management", + "return_value":10, + "order":6, + "answers_choosen":[ + + ] + }, + { + "id":11, + "type":"checkbox", + "element_id":"fdsggijfgiajrigrgijagadf", + "label":"Facilities management", + "return_value":11, + "order":6, + "answers_choosen":[ + + ] + } + ] + }, + { + "id":7, + "label":"Other skill(s) of yours that you would like to utilize", + "type":"text", + "element_id":"fdgfhfhgsdg5gdgh", + "order":2, + "required":true, + "answers_choosen":[ + + ] + }, + { + "id":8, + "label":"What would you like to get for yourself out of your participation on the Board, e.g., what types of experiences, skills to develop, interests to cultivate for you, etc.? ", + "type":"text", + "element_id":"lakjdkfj8h35jnjhasdfa", + "order":2, + "required":true, + "answers_choosen":[ + + ] + }, + { + "id":9, + "type":"radio", + "label":"If you join the Board, you agree that you can provide at least 2-4 hours a month in attendance to Board and Committee meetings, and that you do not have any conflict-of-interest in participating on the Board.", + "answers_choosen":[ + + ], + "correct_answer":[ + 1, + 2, + 3, + 4 + ], + "element_id":"kfjkfjfkadks", + "action_on_correct":2, + "order":9, + "required":true, + "name":"dtjshsttfsfdfdfdakjfkldjfwth", + "options":[ + { + "element_id":"ksgjfsdfddsffksdfgl", + "display_value":"Yes", + "return_value":0 + }, + { + "element_id":"fglkskfddsfsg4935", + "display_value":"No", + "return_value":1 + } + ] + }, + { + "id":10, + "type":"radio", + "label":"If you are not selected as a member of the Board, or if you decide not to join, would you like to be a volunteer to assist our organization in various ways that match your skills and interests?", + "answers_choosen":[ + + ], + "correct_answer":[ + 1, + 2, + 3, + 4 + ], + "element_id":"dasfjkljgdfjgijfa843unrfna", + "action_on_correct":2, + "order":10, + "name":"dtjshsttgfdfgsfdakjfkldjfwth", + "options":[ + { + "element_id":"ksgjksdfgl", + "display_value":"Yes", + "return_value":0 + }, + { + "element_id":"fglkskg4935", + "display_value":"No", + "return_value":1 + }, + { + "element_id":"dfgfghghhdfg", + "display_value":"Perhaps", + "return_value":2 + } + ] + }, + { + "id":11, + "type":"upload", + "element_id":"sdfgrjwhf834bgj", + "label":"
    You can upload any additional items here.
    ", + "return_value":0, + "order":7, + "answers_choosen":[ + + ] + }, + { + "id":12, + "type":"signature", + "date":true, + "date_lock":true, + "element_id":"dasfjfkldgjsfdge3kjasdkfasd", + "signature_id":"ajfkajdfj954utinrngfd", + "signature_datepicker_id":"afkdfjgio4jtnadifadfadf", + "required":true + }, + { + "id":13, + "type":"checkbox", + "element_id":"sdfgsdfgssfgfgssfdg", + "label":"I consent to be sent communications regarding my Board application", + "required":true, + "order":13, + "answers_choosen":[ + + ] + } + ] + }, + { + "id":5, + "nameid":"hjkfdhgjfkdhthrhdyt", + "title":"Thank you for your submission. Someone from our staff will be in touch with you soon!", + "buttons":[ + { + "label":"Close", + "id":"dfhfghjy5", + "className":"form-nav-btns-left", + "default":{ + "type":"close" + } + } + ], + "questions":[ + + ] + } + ] + } + + } +]; + +// WORKING +GLOBAL_SETTINGS.FORMS = [ + { + json:{ + "mysql_id":-1, + "category":"forms", + "nameid":"formsnameid", + "email_response":{ + "title":"", + "body":"forms_response_v1", + "subject":"Thank you for contacting us", + "emails":[], + "template":"forms_response_v1", + "from":"no-reply", + "footer":"" + }, + "email_alert":{ + "title":"", + "body":"contactus_alert_v1", + "subject":"${mycompany_name} - Notification Alert", + "emails":["james@appfactory.studio"], + "template":"forms_alert_v1", + "from":"no-reply", + "footer":"" + } + } + } +]; + + + +// WORKING +GLOBAL_SETTINGS.PAYMENTS_SYSTEMS = [ + { + json: { + "mysql_id":-1, + "nameid":"default", + "reference_num":"", + "category":"payments_systems", + "processor": "paypal", + "reference_abbr":"proc", + "client_id": "", + "client_secret": "", + "active": false, + "is_my_processor": 0, + "display_name": "", + "service_port": "9991", + "mode": "sandbox", + "service_end_point": "", + "webhooks":[] + } + + } +]; + + +// WORKING +GLOBAL_SETTINGS.PROCESSORS = [ + { + json: { + "mysql_id":-1, + "nameid":"default", + "reference_num":"", + "category":"processors", + "processor": "paypal", + "reference_abbr":"proc", + "client_id": "", + "client_secret": "", + "active": false, + "is_my_processor": 0, + "display_name": "", + "service_port": "9991", + "mode": "sandbox", + "service_end_point": "", + "webhooks":[] + } + + } +]; + +GLOBAL_SETTINGS.PAYMENTS_SYSTEMS_DESCRIPTIONS = [ + { + json: { + "mysql_id":-1, + "nameid":"default", + "reference_num":"", + "category":"processor_descriptions", + "webhook": { + "nameid":"default", + "reference_num":"", + "options": { + "active": true, + "endpoint": "", + "secret": "", + "enabled_events": [] + }, + "settings": {}, + "stripe": {}, + "paypal": {}, + "square": {} + }, + "payment_processors": { + "square":{}, + "paypal":{}, + "stripe":{ + "events": [ + "payment_intent.payment_failed", + "payment_intent.succeeded", + "invoice.payment_succeeded", + "customer.subscription.trial_will_end", + "customer.subscription.deleted", + "invoice.finalized", + "invoice.payment_failed" + ] + } + } + } + } +]; + + +// WORKING +GLOBAL_SETTINGS.EMAIL = [ + { + json: { + "mysql_id":-1, + "category":"email", + "nameid":"default", + "accounts": [{ + "username": "no-reply", + "type:": 1 + }], + "active_module": "appfactory_studio", + "modules": [ + // { + // "name": "appfactory_studio", + // "domain": "" + // }, + { + "name": "sendgrid" + }, + // { + // "name": "amazon_ses" + // }, + // { + // "name": "mailgun" + // }, + // { + // "name": "mailchimp" + // } + ] + } + } +]; + +// WORKING +GLOBAL_SETTINGS.EMAIL_MODULE = [ + { + json: { + "mysql_id":-1, + "category":"email_module", + "nameid":"default", + "accounts": [{ + "username": "no-reply", + "type:": 1 + }], + "active_integration": "", + "_integration_default":{ + "name": "appfactory_studio", + "label": "Appfactory Studio", + "domain": "", + "server": "", + "key": "", + "secret": "" + }, + "integrations": [ + // { + // "name": "appfactory_studio", + // "label": "Appfactory Studio", + // "domain": "", + // "server": "", + // "key": "", + // "secret": "" + // }, + { + "name": "sendgrid", + "label": "SendGrid", + "domain": "", + "server": "", + "key": "", + "secret": "" + }, + // { + // "name": "amazon_ses", + // "label": "Amazon SES", + // "domain": "", + // "server": "", + // "key": "", + // "secret": "" + // }, + // { + // "name": "mailgun", + // "label": "MailGun", + // "domain": "", + // "server": "", + // "key": "", + // "secret": "" + // }, + // { + // "name": "mailchimp", + // "label": "MailChimp", + // "domain": "", + // "server": "", + // "key": "", + // "secret": "" + // } + ] + } + } +]; +GLOBAL_SETTINGS.MAIL_HANDLERS = [ + { + json: { + "category": "mail_handler", + "handler":{ + "active": true, + "integration": {}, + "alert": false, + "emails":[], + "from":"no-reply", + "title":"", + "subject":"", + "body": "", + "body_mjml_projectData": "", + "body_mjml_html": "", + "template":"", + "variables": { + "schema": [{name:"content",value:""}], + "client": [{"name": "", "value": ""}], + "system": [{"name": "", "value": ""}] + } + } + } + } +]; + + + + +GLOBAL_SETTINGS.CARDS_SPONSORSHIP_TEMPLATE = [ + { + json: { + "id": -1, + "category":"sponsorship_template", + "nameid":"sponsorship", + "reference_num":"", + "display_name": "SPONSORSHIP LEVELS", + "type": "general", + "language":"en-US", + "levels": [ + { + "id":"0", + "name": "Partner", + "label": "Partner - $500", + "price": "500.00" + }, + { + "id":"1", + "name": "Ambassador", + "label": "Ambassador - $1,000", + "price": "1000.00" + }, + { + "id":"2", + "name": "Advocate", + "label": "Advocate - $2,500", + "price": "2500.00" + }, + { + "id":"3", + "name": "Champion", + "label": "Champion - $5,000", + "price": "5000.00" + }, + { + "id":"4", + "name": "Hero", + "label": "Hero - $7,500", + "price": "7500.00" + } + ], + "mail_handlers": { + "email_response_text": "

    Thank you ${fullname}, for taking the time to fill out our online form. Your submission has been successfully received.

    Rest assured all the information you shared with us will be treated with the utmost confidentiality and used solely for the intended purpose.

    If you have any questions or require any assistance, please don't hesitate to contact us at info@cradle2careerx.org

    Sincerely,
    The Cradle Team
    ", + "email_alert": { + "title": "", + "body": "forms_alert_v1", + "subject": "${mycompany_name} - Notification Alert", + "emails": [ + "james@appfactory.studio" + ], + "template": "forms_alert_v1", + "from": "no-reply", + "variables": [], + "footer": "" + }, + "email_response": { + "title": "", + "body": "forms_response_v1", + "subject": "Thank you ${fullname}", + "emails": [], + "template": "forms_response_v1", + "from": "subscriber", + "variables": [], + "footer": "" + } + }, + "form": { + "name": "Become A Board Member", + "completeText": "Submit Form", + "reference_num": "form676048000851", + "type": "surveyjs", + "on_complete_html": "Thank you for your submission. Someone from our staff will be in touch with you soon!", + "form_data": { + + }, + "form_style": { + "backgroundImage": "", + "backgroundImageFit": "cover", + "backgroundImageAttachment": "scroll", + "backgroundOpacity": 1, + "themeName": "default", + "isPanelless": true, + "colorPalette": "light", + "cssVariables": { + "--sjs-general-backcolor": "rgba(255, 255, 255, 1)", + "--sjs-general-backcolor-dark": "rgba(248, 248, 248, 1)", + "--sjs-general-backcolor-dim": "rgba(255, 255, 255, 1)", + "--sjs-general-backcolor-dim-light": "rgba(249, 249, 249, 1)", + "--sjs-general-backcolor-dim-dark": "rgba(243, 243, 243, 1)", + "--sjs-general-forecolor": "rgba(0, 0, 0, 0.91)", + "--sjs-general-forecolor-light": "rgba(0, 0, 0, 0.45)", + "--sjs-general-dim-forecolor": "rgba(0, 0, 0, 0.91)", + "--sjs-general-dim-forecolor-light": "rgba(0, 0, 0, 0.45)", + "--sjs-primary-backcolor": "rgba(0, 176, 82, 1)", + "--sjs-primary-backcolor-light": "rgba(0, 176, 82, 0.1)", + "--sjs-primary-backcolor-dark": "rgba(0, 161, 75, 1)", + "--sjs-primary-forecolor": "rgba(255, 255, 255, 1)", + "--sjs-primary-forecolor-light": "rgba(255, 255, 255, 0.25)", + "--sjs-base-unit": "8px", + "--sjs-corner-radius": "4px", + "--sjs-secondary-backcolor": "rgba(255, 152, 20, 1)", + "--sjs-secondary-backcolor-light": "rgba(255, 152, 20, 0.1)", + "--sjs-secondary-backcolor-semi-light": "rgba(255, 152, 20, 0.25)", + "--sjs-secondary-forecolor": "rgba(255, 255, 255, 1)", + "--sjs-secondary-forecolor-light": "rgba(255, 255, 255, 0.25)", + "--sjs-shadow-small": "0px 1px 2px 0px rgba(0, 0, 0, 0.15)", + "--sjs-shadow-small-reset": "0px 0px 0px 0px rgba(0, 0, 0, 0.15)", + "--sjs-shadow-medium": "0px 2px 6px 0px rgba(0, 0, 0, 0.1)", + "--sjs-shadow-large": "0px 8px 16px 0px rgba(0, 0, 0, 0.1)", + "--sjs-shadow-inner": "inset 0px 1px 2px 0px rgba(0, 0, 0, 0.15)", + "--sjs-shadow-inner-reset": "inset 0px 0px 0px 0px rgba(0, 0, 0, 0.15)", + "--sjs-border-light": "rgba(0, 0, 0, 0.09)", + "--sjs-border-default": "rgba(0, 0, 0, 0.16)", + "--sjs-border-inside": "rgba(0, 0, 0, 0.16)", + "--sjs-special-red": "rgba(229, 10, 62, 1)", + "--sjs-special-red-light": "rgba(229, 10, 62, 0.1)", + "--sjs-special-red-forecolor": "rgba(255, 255, 255, 1)", + "--sjs-special-green": "rgba(25, 179, 148, 1)", + "--sjs-special-green-light": "rgba(25, 179, 148, 0.1)", + "--sjs-special-green-forecolor": "rgba(255, 255, 255, 1)", + "--sjs-special-blue": "rgba(67, 127, 217, 1)", + "--sjs-special-blue-light": "rgba(67, 127, 217, 0.1)", + "--sjs-special-blue-forecolor": "rgba(255, 255, 255, 1)", + "--sjs-special-yellow": "rgba(255, 152, 20, 1)", + "--sjs-special-yellow-light": "rgba(255, 152, 20, 0.1)", + "--sjs-special-yellow-forecolor": "rgba(255, 255, 255, 1)", + "--sjs-article-font-xx-large-textDecoration": "none", + "--sjs-article-font-xx-large-fontWeight": "700", + "--sjs-article-font-xx-large-fontStyle": "normal", + "--sjs-article-font-xx-large-fontStretch": "normal", + "--sjs-article-font-xx-large-letterSpacing": "0", + "--sjs-article-font-xx-large-lineHeight": "64px", + "--sjs-article-font-xx-large-paragraphIndent": "0px", + "--sjs-article-font-xx-large-textCase": "none", + "--sjs-article-font-x-large-textDecoration": "none", + "--sjs-article-font-x-large-fontWeight": "700", + "--sjs-article-font-x-large-fontStyle": "normal", + "--sjs-article-font-x-large-fontStretch": "normal", + "--sjs-article-font-x-large-letterSpacing": "0", + "--sjs-article-font-x-large-lineHeight": "56px", + "--sjs-article-font-x-large-paragraphIndent": "0px", + "--sjs-article-font-x-large-textCase": "none", + "--sjs-article-font-large-textDecoration": "none", + "--sjs-article-font-large-fontWeight": "700", + "--sjs-article-font-large-fontStyle": "normal", + "--sjs-article-font-large-fontStretch": "normal", + "--sjs-article-font-large-letterSpacing": "0", + "--sjs-article-font-large-lineHeight": "40px", + "--sjs-article-font-large-paragraphIndent": "0px", + "--sjs-article-font-large-textCase": "none", + "--sjs-article-font-medium-textDecoration": "none", + "--sjs-article-font-medium-fontWeight": "700", + "--sjs-article-font-medium-fontStyle": "normal", + "--sjs-article-font-medium-fontStretch": "normal", + "--sjs-article-font-medium-letterSpacing": "0", + "--sjs-article-font-medium-lineHeight": "32px", + "--sjs-article-font-medium-paragraphIndent": "0px", + "--sjs-article-font-medium-textCase": "none", + "--sjs-article-font-default-textDecoration": "none", + "--sjs-article-font-default-fontWeight": "400", + "--sjs-article-font-default-fontStyle": "normal", + "--sjs-article-font-default-fontStretch": "normal", + "--sjs-article-font-default-letterSpacing": "0", + "--sjs-article-font-default-lineHeight": "28px", + "--sjs-article-font-default-paragraphIndent": "0px", + "--sjs-article-font-default-textCase": "none" + } + } + + } + } + } +]; + + + + + + + + + +// WORKING +GLOBAL_SETTINGS.CARDS_SPONSORSHIP = [ + { + json: { + "id": -1, + "category":"sponsorship", + "nameid":"sponsorship", + "reference_num":"s739402498248", + "template": { + "mysql_id":-1, + "access": { + "active": true, + "id": "sponsors", + "default": false, + "displayName": "Sponsorship" + }, + "language":"en-US", + "reference_abbr":"spn", + "name":"sponsorship_1", + "reference_num":"s739402498248", + "displayName": "SPONSORSHIP LEVELS", + "type": "general", + "html_template": "basic", + "available":true, + "description": "By becoming a sponsor today you'll have the opportunity to support a great orginazation and have your name or company logo displayed in our sponsors area. Once again thank you for your support.", + "image": "", + "open_dialog_button_title": "Sponsor", + "card_image": "../../assets/c2c_stckd-bg_pos_RGB.svg", + "success_message":"

    Thank you for your sponsorship, you will receive an email regarding your sponsorship and upon approval your sponsorship and will become active thank you

    Any questions $#response_contact_email

    ", + "variables":[], + "email_response":{ + "title":"", + "body": "sponsorship_alert_v1", + "subject":"Thank you $#fullname", + "from":"no-reply", + "emails":[], + + "template":"emailtemp_sponsorship_v2", + "footer":"Make sure to add us to your contacts list." + }, + "email_alert":{ + "title":"New Sponsorship", + "body": "sponsorship_response_v1", + "subject":"$#mycompany_name - Notification Alert", + "from":"no-reply", + "emails":["james@appfactory.studio"], + + "template":"", + "footer":"" + }, + "request":{ + "url":"core/php/request.php", + "onsubmit":"", + "dataupload":"api_upload_data", + "fileupload":"api_upload_file", + "savedirectory": "sponsors/files" + }, + "html_templates":{ + "basic":{ + "style":"../../portal/admin/system/data/html_templates/sponsors/1/styles.css", + "button":"../../portal/admin/system/data/html_templates/sponsors/1/button.html", + "label":"../../portal/admin/system/data/html_templates/sponsors/1/label.html", + "container":"../../portal/admin/system/data/html_templates/sponsors/1/container.html", + "textfield":"../../portal/admin/system/data/html_templates/sponsors/1/textfield.html", + "radio":"../../portal/admin/system/data/html_templates/sponsors/1/radio.html", + "checkbox":"../../portal/admin/system/data/html_templates/sponsors/1/checkbox.html", + "upload":"../../portal/admin/system/data/html_templates/sponsors/1/upload.html", + "checkbox_group":"../../portal/admin/system/data/html_templates/sponsors/1/checkbox_group.html", + "text_group":"../../portal/admin/system/data/html_templates/sponsors/1/text_group.html", + "text_style2":"../../portal/admin/system/data/html_templates/sponsors/1/text_style2.html", + "textarea":"../../portal/admin/system/data/html_templates/sponsors/1/textarea.html", + "signature":"../../portal/admin/system/data/html_templates/sponsors/1/signature.html" + } + }, + "order_data": {}, + "package":{ + "pdf": { + "display_name": "Cradle2Career Sponsorship-2023 (revised).pdf", + "new_name": "mJ5hla7yftbJ3.pdf" + } + }, + "account": { "status": 0 }, + "form": { + "title": "Sponsorship Registration", + "answers": [], + "selected_level": {}, + "levels": [ + { + "id":"0", + "name": "Partner", + "label": "Partner - $500", + "price": "500.00" + }, + { + "id":"1", + "name": "Ambassador", + "label": "Ambassador - $1,000", + "price": "1000.00" + }, + { + "id":"2", + "name": "Advocate", + "label": "Advocate - $2,500", + "price": "2500.00" + }, + { + "id":"3", + "name": "Champion", + "label": "Champion - $5,000", + "price": "5000.00" + }, + { + "id":"4", + "name": "Hero", + "label": "Hero - $7,500", + "price": "7500.00" + } + ], + "pages": [ + + // 1 + { + "id": 1, + "step":1, + "step_title": "Personal Info", + "title":"Personal Info", + "buttons": [ + { + "label": "Prev", + "type": "startover", + "mode": "back" + }, + { + "label": "Next", + "step_to": 2 + } + ], + "questions": [ + { + "id": "ffgfggfgfghgasgfgfgfdagfgfgsfgtgerh", + "label": "Full name:", + "type": "text", + "tag": "fullname", + "required":{ + "error_message": "Please fill your full name." + }, + "variable": "fullname", + "response_name": true + }, + { + "id": "ffgfggfgfghgasgfgfgfdagfgfgsfgtgerh", + "label": "Email:", + "type": "text", + "required":{ + "error_message": "Please provide an email address." + }, + "tag": "email", + "variable": "email", + "response_email": true + }, + { + "id": "ffgfggfgfghgasgfgtgerh", + "label": "Phone:", + "type": "text", + "tag": "phone", + "variable": "phone", + "response_phone": true + }, + { + "id": "jyjyu65u85fgdfgfgsfg656767rtytrtyrt", + "label": "Who should be acknowledged for the contribution?", + "type": "text", + "tag": "acknowledged" + }, + { + "id": "ffgfggfgfghgasgfgtgerh", + "label": "Create a password to access your sponsor dashboard:", + "type": "text", + "required":{ + "error_message": "Please create a password." + }, + "tag": "password", + "variable": "password", + "response_password": true + }, + ] + }, + + // 2 + { + "id": 0, + "step":2, + "step_title": "Company Info", + "title":"Company Information", + "buttons": [ + { + "label": "Back", + "step_to": 1, + "mode": "back" + }, + { + "label": "Next", + "step_to": 3 + } + ], + "questions": [ + { + "tag": "contact_name", + "id": "hfjkfhad87345ntsddafu", + "label": "Contact Name:", + "type": "text", + "variable": "contact_name" + }, + { + "tag": "contact_title", + "id": "aljksdflk49u435u3", + "label": "Contact Title:", + "type": "text", + "variable": "contact_title" + }, + { + "tag": "company_name", + "id": "dfghsgljgu54yonaeri8herithn", + "label": "Company Name:", + "type": "text", + "variable": "company_name" + } + ] + }, + + // 3 + { + "id": 2, + "step":3, + "step_title": "Summary", + "type": "summary", + "title":"Summary", + "buttons": [ + { + "label": "Prev", + "step_to": 2, + "mode": "back" + }, + { + "label": "Next", + "step_to": 4 + } + ], + "questions": [ + { + "tag": "accept_checkbox", + "id": "afdjhjkhffgjsjfhfjdsadsfkjlk", + "label": "Accept Term & Conditions", + "type": "checkbox", + "required":{ + "error_message": "Please accept terms" + }, + "name": "accept_sponsorship_checkbox", + "value": 1 + } + ] + }, + + // 4 + { + "id": 3, + "step":4, + "step_title": "Payment", + "title":"Payment", + "buttons": [ + { + "label": "Prev", + "step_to": 3, + "mode": "back" + }, + { + "type": "submit", + "label": "Submit" + } + ], + "questions": [ + { + "service": "paypal" + } + ] + } + ] + } + } + } + } +]; + +// WORKING +GLOBAL_SETTINGS.EVENTS = [ + { + json: { + "mysql_id":-1, + "category":"events", + "nameid":"template", + + "template": { + "event_name": "", + "status": 0, + "archived": 0, + "location": "", + "reference_num": "", + "json": { + "location_description": "", + "short_description": "", + "description": "", + "images": [], + "documents": [], + "date": "2023-02-24 14:57:53", + "options": { + "datetime":{ + "enabled": false, + "days":[] + }, + "tickets": { + "enabled": false, + "count": 0, + "coupons": [] + }, + "location":{ + "enabled":false + }, + "notifications":{ + "enabled":false, + "email_response":{ + "title":"", + "body":"", + "subject":"", + "email":"", + "template":"_email_alert", + "from":"no-reply", + "image": "", + "footer":"" + }, + "email_alert":{ + "title":"", + "body":"", + "subject":"", + "emails":[], + "template":"_email_alert", + "from":"no-reply", + "image": "", + "footer":"" + }, + }, + "age_requirement":{ + "enabled":false, + "min": 0, + "max": 0 + } + }, + "plugins": { + "sponsorships": { + "enabled":false + + }, + "subscriber": { + "enabled":false + + } + }, + "mail_handlers": { + "email_alert": { + "title": "", + "body": "forms_alert_v1", + "subject": "${mycompany_name} - Notification Alert", + "emails": [], + "template": "forms_alert_v1", + "from": "no-reply", + "variables": [], + "footer": "" + }, + "email_response": { + "title": "", + "body": "forms_response_v1", + "subject": "Thank you ${fullname}", + "emails": [], + "template": "forms_response_v1", + "from": "subscriber", + "variables": [], + "footer": "" + } + }, + "variables":[] + } + } + } + } +]; + +// WORKING +GLOBAL_SETTINGS.CONTACT_US = [ + { + json:{ + "mysql_id":-1, + "category":"contactus", + "nameid":"contactus", + "mail_handlers": { + "email_response":{ + "title":"", + "body":"contactus_response_v1", + "subject":"Thank you for contacting us", + "emails":[], + "template":"contactus_response_v1", + "from":"no-reply", + "footer":"" + }, + "email_alert":{ + "title":"", + "body":"contactus_alert_v1", + "subject":"${mycompany_name} - Notification Alert", + "emails":[ + "james@appfactory.studio" + ], + "template":"contactus_alert_v1", + "from":"no-reply", + "footer":"" + } + } + } + } +]; + + + +// WORKING +GLOBAL_SETTINGS.SUBSCRIBER = [ + { + json: { + "mysql_id":-1, + "category":"subscriber", + "nameid":"default", + "reference_abbr": "sub", + "display_name": "News5", + "description": "", + "short_description": "", + "reference_num": "sub_239874234", + "articles": [ + { + "title":"My 1 Post", + "reference_num":"sub_897345jgd", + "type":"email", + "delivered":false + } + ], + "subscribers":[] + } + } +]; + +GLOBAL_SETTINGS.SUBSCRIBER_CATALOG = [ + { + json: { + "mysql_id":-1, + "category":"subscriber_catalog", + "title": "", + "reference_num": "", + "nameid":"default", + "release_type": false, + "description": "", + "short_description": "" + } + } +]; + +GLOBAL_SETTINGS.SUBSCRIBER_ARTICLES = [ + { + json: { + "category":"catalog_article", + "delivery_type": "email", + "deliveries": [] + } + } +]; + +// WORKING +GLOBAL_SETTINGS.PHOTO_GALLERY = [ + { + json: { + "mysql_id":-1, + "category":"gallery" + } + } +]; + +// WORKING +GLOBAL_SETTINGS.DOCUMENTS = [ + { + json: { + "mysql_id":-1, + "category":"documents", + "nameid": "default", + "files":[ + { + "original_name": "", + "generated_name": "", + "file_size": "", + "file_type": "", + "upload_date": "", + "directory": "", + "url": "" + } + ] + } + } +]; + +// WORKING +GLOBAL_SETTINGS.RESOURCES_LISTINGS = [ + { + json: { + "mysql_id":-1, + "category":"resources_listing", + "name": "", + "business": "", + "descrition": "", + "phoneNumer": "", + "address": "", + "services_description": "" + } + } +]; + + +GLOBAL_SETTINGS.DONATIONS = [ + { + json: { + "mysql_id":-1, + "category":"donations", + "nameid":"quick_donate", + "language":"en-US", + "reference_abbr":"don", + "email_response":{ + "title":"", + "body": "donations_response_v1", + "subject":"Thank you ${fullname}", + "emails":[], + "template":"donations_response_v1", + "from":"no-reply", + "footer":"Make sure to add ${response_email} to your contacts list." + }, + "email_alert":{ + "title":"New Donation", + "body":``, + "subject":"${mycompany_name} - Notification Alert", + "emails":[], + "template":"donations_alert_v1", + "from":"no-reply", + "footer":"Make sure to add $#response_email to your contacts list." + } + } + + } +]; + + + + +GLOBAL_SETTINGS.DIRECT_PAYMENTS = [ + { + json: { + "id": -1, + "mysql_id":-1, + "category":"direct_payments", + "reference_num":"", + "processor": "", + "status": 0, + "type": 0, + "json": { + "display_name": "", + "configuration": { + "payables": { + "processor": "" + }, + "recurring": { + "processors": [], + "subscriptions": [] + } + }, + "mail_handlers": { + // "email_response":{ + // "title":"", + // "body": "donations_response_v1", + // "subject":"Thank you ${fullname}", + // "emails":[], + // "template":"donations_response_v1", + // "from":"no-reply", + // }, + // "email_alert":{ + // "title":"New Donation", + // "body":``, + // "subject":"${mycompany_name} - Notification Alert", + // "emails":[], + // "template":"donations_alert_v1", + // "from":"no-reply", + // } + } + } + } + } +]; +GLOBAL_SETTINGS.DIRECT_PAYMENTS_TEMPLATE = [ + { + json: { + "category":"direct_payments_template", + "template": { + "processors": { + "name": "default", + "processor_nameid": "", + "subscription_group": "default" + }, + "subscriptions": { + "name": "", + "tiers": [] + }, + "tiers": { + "name": "", + "label": "", + "lookup_key": "", + "price": "", + "price_int": 0 + } + } + + } + } +]; + + +GLOBAL_SETTINGS.MEMBER_DOMAINS = [ + { + json: { + "mysql_id":-1, + "category":"domain_zone", + "nameid": "", + "reference_num": "", + "member_reference_num":"", + "domain_name": "", + "username":"", + "zone_active": false, + "zone_a_record":"", + "json_zone_data": {}, + "zone_text_file": "" + } + } +]; + +GLOBAL_SETTINGS.BRAIN = [ + { + json: { + "mysql_id":-1, + "category":"brain", + "nameid": "", + "reference_num": "", + "keys": [] + } + } +]; + +GLOBAL_SETTINGS.NAMESERVERS = [ + { + json: { + "mysql_id":-1, + "category":"nameservers", + "nameid": "", + "active": true, + "ip4":"", + "ip6":"", + "hostname":"", + "password":"", + "reference_num": "", + "date": "" + } + } +]; + + +GLOBAL_SETTINGS.ACCESS = [ + { + json: + { + "mysql_id":-1, + "category":"access", + "nameid":"access_module", + "active": true, + "displayName": "", + "variables":[], + + "groups": { + "processors": [], + "subscriptions": [], + "authorizations": [] + }, + + "addons": {}, + "mail": { + "email_response": null, + "email_alert": null, + "email_confirm": null + }, + + + + "mail_handlers": { + "email_response": null, + "email_alert": null, + "email_confirm": null + } + + } + } +]; + +GLOBAL_SETTINGS.ACCESS_DEFINITIONS = [ + { + json: + { + "mysql_id":-1, + "category":"access_definitions", + "nameid":"access_definitions", + + "addons": {}, + "accesslimits": { + "domain": { + "email": { count: 0}, + "storage": { count: 0}, + "processors": { count: 0 }, + "forms": { count: 0}, + "sponsorships": {count:0}, + "events": { count:0}, + "contacts": { count:0}, + "voip": { count: 0}, + }, + "coordinator": {}, + "commerce": {}, + "dreamgraph": {}, + "notes": {} + + } + } + } +]; + +GLOBAL_SETTINGS.ACCESS_MEMBER = [ + { + json: { + "mysql_id":-1, + "category":"access_member", + "nameid":"access_module", + "transactions": { + "charges": [], + "stripe": null, + "discount_codes": [ + { + "name": "", + "code": "", + "amount": "", + "period": "" + } + ] + }, + "access_auth0": { + + } + } + } +]; + +GLOBAL_SETTINGS.WEBSITE_BUILDER = [ + { + json: { + "mysql_id":-1, + "category":"website_builder", + "nameid":"website_builder", + "active_project": null, + "path": "pages", + "projects": [] + } + } +]; + + + + +// WORKING +GLOBAL_SETTINGS.DOMAIN_USER_SETTINGS = [ + { + json: { + "mysql_id":-1, + "category":"domain_user_settings", + "nameid":"default", + "reference_num": "default", + } + } +]; +GLOBAL_SETTINGS.DOMAIN_SETTINGS = [ + { + json: { + "mysql_id":-1, + "category":"domain_settings", + "nameid":"default", + "reference_num": "default", + "system_variables": [], + "auth0": { + "accesscontrol": { + "admin": { + "company": { + 'create:any': ['*'], + 'read:any': ['*'], + 'update:any': ['*'], + 'delete:any': ['*'] + }, + "brand": { + 'create:any': ['*'], + 'read:any': ['*'], + 'update:any': ['*'], + 'delete:any': ['*'] + }, + "social_media_links": { + 'create:any': ['*'], + 'read:any': ['*'], + 'update:any': ['*'], + 'delete:any': ['*'] + }, + "dashboard_label": { + 'create:any': ['*'], + 'read:any': ['*'], + 'update:any': ['*'], + 'delete:any': ['*'] + }, + "module_email": { + 'create:any': ['*'], + 'read:any': ['*'], + 'update:any': ['*'], + 'delete:any': ['*'] + }, + "module_forms": { + 'create:any': ['*'], + 'read:any': ['*'], + 'update:any': ['*'], + 'delete:any': ['*'] + }, + "module_payments": { + 'create:any': ['*'], + 'read:any': ['*'], + 'update:any': ['*'], + 'delete:any': ['*'] + }, + "module_subscribers": { + 'create:any': ['*'], + 'read:any': ['*'], + 'update:any': ['*'], + 'delete:any': ['*'] + }, + "module_contactus": { + 'create:any': ['*'], + 'read:any': ['*'], + 'update:any': ['*'], + 'delete:any': ['*'] + }, + "module_sponsorship": { + 'create:any': ['*'], + 'read:any': ['*'], + 'update:any': ['*'], + 'delete:any': ['*'] + }, + "module_events": { + 'create:any': ['*'], + 'read:any': ['*'], + 'update:any': ['*'], + 'delete:any': ['*'] + }, + "module_list": { + 'create:any': ['*'], + 'read:any': ['*'], + 'update:any': ['*'], + 'delete:any': ['*'] + } + + }, + "user": { + "brand": { + 'create:any': ['*'], + 'read:any': ['*'], + 'update:any': ['*'], + 'delete:any': ['*'] + } + }, + }, + "own": { + "brand": [1,1,1,"auth0_s_brand"], + "social_media_links": [1,1,1,"auth0_s_sml"], + "company": [0,0,0,"auth0_s_company"], + "dashboard": { + "label": [1,0,1,"auth0_dashboard_label"] + }, + "modules": { + "documents": [1,1,1,"auth0_m_documents"], + "forms": [1,1,1,"auth0_m_forms"], + + "payments": [1,1,0,"auth0_m_payments"], + "subscriber": [1,1,0,"auth0_m_subscriber"], + "events": [1,1,0,"auth0_m_events"], + "sponsorship": [1,1,0,"auth0_m_s"], + "contactus": [1,1,0,"auth0_m_contactus"], + "list": [1,1,0,"auth0_m_list"] + } + } + }, + "company": { + "name": "", + "address": "", + "phone": "", + "copyright_short": "", + "copyright_long": "" + }, + "brand": { + "colors": { + "primary_color_1": "", + "primary_color_2": "", + "primary_color_3": "", + "primary_color_4": "", + "primary_color_5": "" + }, + "favicons": { + "favicon1": "", + "favicon2": "", + "favicon3": "" + }, + "logos": { + "logo1": "", + "logo2": "", + "logo3": "" + } + }, + "social_media_links": { + "facebook": "", + "twitter": "", + "instagram": "", + "linkedin": "", + "youtube": "", + "tiktok": "", + "pinterest":"", + "discord": "", + "twitch": "", + "threads": "" + }, + "dashboard": { + "web_console_label": "", + "icon": { + "document": {} + } + }, + "modules": { + "documents": {active:false}, + "paypal": {active:false}, + "stripe": {active:false}, + "subscriber": {active:false}, + "forms": {active:false}, + "events": {active:false}, + "sponsorship": {active:false}, + "contactus": {active:false}, + "resources": {active:false} + }, + "website": { + "custome_deployment": { + "status": false + } + } + } + } +]; + + +function AFS_SCHEMA_DESCRIPTION_INTEGRATION(configurations){ + + for (const key in GLOBAL_SETTINGS) { + + let defaultConfigurationArray = GLOBAL_SETTINGS[key]; + for(let i=0; i < defaultConfigurationArray.length; i++){ + const index = i; + const category = defaultConfigurationArray[index].json.category; + let savedConfigurationArray = configurations[category]; + + if(category=="access" || + category=="nameservers" || + category=="brain" || + category=="domain_settings" || + category=="domain_user_settings" || + category=="website_builder" || + category=="events" || + category=="email_module" || + category=="contactus" || + category=="direct_payments" || + category=="subscriber" || + category=="catalog_article" || + category=="subscriber_catalog" || + category=="access_definitions" || + category=="direct_payments_template" || + category=="processor_descriptions" || + category=="payments_systems" + + + ){ + // TODO: new way of doing things, the first element should remain and be the default item + let defaultConfigurationArray = GLOBAL_SETTINGS[key]; + // console.log(configurations["access"]) + if(configurations[category]!=undefined){ + configurations[category] = defaultConfigurationArray.concat(configurations[category]); + }else{ + configurations[category] = defaultConfigurationArray; + } + }else{ + if(savedConfigurationArray==undefined){ + configurations[category] = defaultConfigurationArray; + break; + } + } + } + } + + + return configurations; +} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/portal/admin/playground/client/subscribers/index.php b/portal/admin/playground/client/subscribers/index.php new file mode 100644 index 00000000..a1f2c26a --- /dev/null +++ b/portal/admin/playground/client/subscribers/index.php @@ -0,0 +1,276 @@ + + + + + + + AFS Playground + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + +
    + + + + + + + + + + + + + + + + + + +
    +
    +
    +

    BECOME A BOARD MEMBER

    +
    +
    +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/portal/admin/playground/client/subscribers/index_include.php b/portal/admin/playground/client/subscribers/index_include.php new file mode 100644 index 00000000..49c096d5 --- /dev/null +++ b/portal/admin/playground/client/subscribers/index_include.php @@ -0,0 +1,149 @@ + + + +
    +
    +
    +

    BECOME A BOARD MEMBER

    +
    +
    +
    +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/portal/admin/playground/client/subscribers/script.js b/portal/admin/playground/client/subscribers/script.js new file mode 100644 index 00000000..0a8b125d --- /dev/null +++ b/portal/admin/playground/client/subscribers/script.js @@ -0,0 +1,788 @@ +(function(){ + + function init(app){ + AFSSdk.InitializeClientSDK('afsdev_XqyZekkvjEj8diB1oaAMn9SC',function(api_config){ + + // form + // AFSSdk.GetMailHandler('v9685-5735-1682-1043',function(mail_handler){ + // console.log(mail_handler); + // initForm(api_config,mail_handler,app); + // }); + + // subscriber + initSubscriber(api_config,app); + }); + + + function initForm(api_config,mail_handler,app){ + app.extra.myform = new AFSSurveyJSForm.AFSSurveyJSForm(app); + app.extra.myform.intializeForm("#surveyContainer","form808965595437",api_config,mail_handler, + function(){ + AFSSpinner.showFullScreen(true); + setTimeout(() => { window.scrollTo(0, 0); AFSSpinner.showFullScreen(false); },2000); + }, + function(survey){ + // send notification + // analytics + }); + } + function initSubscriber(api_config,app){ + app.extra.afssubscriber = new AFSSdk.AFSSubscriber(); + app.extra.afssubscriber.requestCatalogs(function(catalogs){ + AFSSdk.GetMailHandler('v1707-6481-8182-7066',function(mail_handler){ + console.log(api_config); + console.log(catalogs); + console.log(mail_handler); + + SetupEventListeners(app); + $('body').append(func_subscribeModal2(app)); + $('body').append(func_subscribeModal3(app)); + + const myModal1 = new bootstrap.Modal('#modal_target_new_subscriber', {}); + const myModal2 = new bootstrap.Modal('#modal_target_subscriber_thank_you', {}); + + $("#start_new_subscriber_signup").on("click",function(e){ + e.preventDefault(); + let emailValue = $("#footer-sub-input").val(); + if(emailValue==""){ + return; + } + myModal1.show(); + $("#title_modal_new_subscriber_section").text(" ( " +emailValue + " )"); + subscribeMe(app,mail_handler,emailValue,myModal1,myModal2); + }); + + + }); + }); + + + + } + + } + + + function subscribeMe(app,mail_handler,emailValue,myModal1,myModal2){ + + function append_subscriptions(app){ + let count = 0; + let ids = []; + let html = ""; + // let catalogs = app.extra.subscriber.getCatalogs(); + let catalogs = app.extra.afssubscriber.getCatalogs(); + + // console.log(catalogs); + for (let i = 0; i < catalogs.length; i++) { + const catalog = catalogs[i]; + if(catalog.json==undefined || catalog.json==null) continue; + if(catalog.json.release_type==false) continue; + console.log(catalog); + let inputhtml = func_subscriberInput(app); + let id = "m"+app.utils.randomGenerator(12); + let variables = [ + {"name":"reference_num", "value":catalog.reference_num}, + {"name":"input_classes", "value":"modal-subscribe-input modal-subscribe-custom1"}, + {"name":"title_classes", "value":"modal-subscribe-h5"}, + {"name":"short_classes", "value":"modal-subscribe-p"}, + {"name":"input_id", "value":id}, + {"name":"title", "value":catalog.title}, + {"name":"desc", "value":catalog.json.short_description} + ]; + html += app.utils.variablesReplace(inputhtml, variables); + ids.push({id:id, obj:catalog, index: i}); + if(count==3){ + count = 0; + } + } + + $("#row_one").empty(); + $("#row_one").append(html); + return ids; + } + + let ids = append_subscriptions(app); + $("#submit_new_subscriber").on("click",function(e){ + e.preventDefault(); + myModal1.hide(); + myModal2.show(); + + let newsub = app.extra.afssubscriber.initializeSubscriber(emailValue,"",""); + for (let i = 0; i < ids.length; i++) { + console.log(ids[i]); + const isChecked1 = $("#"+ids[i].id).is(":checked"); + if(isChecked1==true){ + let catalog = ids[i].obj; + newsub.addCatalog(catalog); + } + } + console.log(newsub); + app.extra.afssubscriber.createSubscriber(newsub,mail_handler,function(resp){ + $("#footer-sub-input").val(""); + // send notification + // app.extra.notifications.sendNotification( + // "subscriber", + // `New ${catalog.display_name} Subscriber`, + // `New email ${emailValue} has subscribed to ${catalog.display_name} catalog`, + // { + // "catalog_reference_num": catalog.reference_num, + // "mypage": mypage + // } + // ); + + // app.extra.analytics.track('new_subscriber', { + // date: moment().format('LLL'), + // page_name: mypage, + // subscriber: newsub.email + // }); + }); + + + + + // app.extra.subscriber.updateSubscriberConfiguration(newsub, function(catalog,resp){ }); + }); + } + + function SetupEventListeners(app){ + + $("#footer-sub-button").on(function(e){ + e.preventDefault(); + var email = $('#footer-sub-input').val(); + if(email==""){ + return; + } + + ModalHandler({ + headerClass: "", + title: "", + content: ` +
    + +
    + `, + callback: function(){ + $.post('core/php/request.php',{subscribe:true,email:email},function(resp1){ + $("#footer-sub-input").val(""); + $.post('../../portal/admin/core/request.php',{send_subscribed_confirmation_email:true,email:email},function(resp2){ + console.log(resp2); + }); + }); + } + }); + }); + + + $('.click-here-to-subscribe-button').click(function(e){ + e.preventDefault(); + ModalHandler({ + headerClass: "", + title: "", + content: ``, + callback: function(body){ + // if(newNode == null){ + // newNode = document.getElementById('buysomegum').cloneNode(true); + // $('#buysomegum').empty(); + // } + // var old_element = newNode; + // var new_element = old_element.cloneNode(true); + // old_element.parentNode.replaceChild(new_element, old_element); + // body.appendChild(old_element); + // newNode = old_element; + // newNode.style.display = 'block'; + + var node = app.utils.convertStringToHTMLNode(gl_SusbribeModal()); + body.appendChild(node); + + $('.modal-subscribe-news__btn').click(function(e){ + // modal-subscribe-check5 = sponsorship + // modal-subscribe-check4 = initiatives + // modal-subscribe-check2 = events + // modal-subscribe-check1 = news + var email = $('#modal-subscribe-input-id').val(); + var news = document.getElementById('modal-subscribe-check1').checked; + var events = document.getElementById('modal-subscribe-check2').checked; + var initiatives = document.getElementById('modal-subscribe-check4').checked; + var sponsorship = document.getElementById('modal-subscribe-check5').checked; + + if(email==""){ + + return; + } + if(!news && !events && !initiatives && !sponsorship){ + + return; + } + + + ModalHandler({ + headerClass:"", + title: "", + content: ` +

    Thank for your interest, you should be receiving a follow up email.

    + `, + callback: function(body2){ + + } + }); + var data = { + 'single_subscribe': true, + 'email': email, + 'news': news, + 'event': events, + 'initiatives': initiatives, + 'sponsorship': sponsorship, + 'assigned_from': mypage + }; + + // TODO: send follow up email + post(URL_OWN_REQUEST, data, function(resp1){ + console.log(resp1); + $('#modal-subscribe-input-id').val(""); + }); + + + }); + // $('#click-me-now').click(function(e){ + // //$("#modal-subscribe-check1").prop('checked', false); + // }); + $('#click-me-now').click(function(e){ + // console.log(1) + + + // var a = app.utils.convertStringToHTMLNode(``); + // console.log(a.firstElementChild); + // $("#help-me").empty(); + // document.getElementById("help-me").appendChild(a.firstElementChild); + + + }); + } + }) + }); + + + // $('#footer-apply-link').on('click',function(e){e.preventDefault();}); + // $('#footer-volunteer-link').on('click',function(e){e.preventDefault(); }); + + $('#footer-terms-link').on('click',function(e){ + e.preventDefault(); + let w = app.extra.config['managed_domain']['Address'] + '/terms_of_service.html'; + console.log(w); + window.location.href = w; + }); + $('#footer-policy-link').on('click',function(e){ + e.preventDefault(); + window.location.href = app.extra.config['managed_domain']['Address'] + '/privacy-policy.html'; + + }); + + $('.i-want-to-apply-footer').on('click',function(e){ + e.preventDefault(); + //window.open("https://www15.cradle2careertx.xyz/pages/apply/"); + window.location.href = app.extra.config['managed_domain']['Address'] + '/pages/apply/'; + }); + $('.volunteer-opportunities-footer').on('click',function(e){ + e.preventDefault(); + //window.open("https://www15.cradle2careertx.xyz/pages/volunteer/"); + window.location.href = app.extra.config['managed_domain']['Address'] + '/pages/volunteer/'; + }); + + + $('.facebook-click').on('click',function(e){ + e.preventDefault(); + window.open(app.extra.config['configurations']['domain_settings'][1]['json']['social_media_links']['facebook'], '_blank'); + }); + $('.instagram-click').on('click',function(e){ + e.preventDefault(); + window.open(app.extra.config['configurations']['domain_settings'][1]['json']['social_media_links']['instagram'], '_blank'); + }); + $('.twitter-click').on('click',function(e){ + e.preventDefault(); + window.open(app.extra.config['configurations']['domain_settings'][1]['json']['social_media_links']['twitter'], '_blank'); + }); + + } + + + const URL = "/core/php/request.php"; + let promises = [ + // retrieve_data_for_update + new Promise((resolve,reject) => { + $.post(URL, { + retrieve_data_for_update: true + }, function(obj){ + obj = JSON.parse(obj); + resolve(obj); + }) + }), + + ] + + Promise.all(promises).then((m) =>{ + console.log(m); + + let app = new ApplicationContextManager(); + app.extra.config = {}; + app.extra.current = {}; + app.extra.views = {}; + app.extra.config.configurations = AFS_SCHEMA_DESCRIPTION_INTEGRATION(m[0].configurations); + app.extra.url = "./request.php"; + + console.log(app.extra.config.configurations) + init(app); + }); + + + + + + + + + function func_subscribeModal2(app){ + return ` + + + + + `; + } + function func_subscribeModal3(app){ + return ` + + + + + + + + `; + } + function func_subscriberInput(app){ + return ` +
    +
    +
    + + +
    + + +
    +
    +
    + +

    \${title}

    +
    +
    +
    +
    + +

    \${desc}

    +
    +
    +
    +
    +
    + + + + `; + } + + + // Board members + function CreateFormData2(app){ + return { + "elements": [{ + name: "fullname", + title: "What is your first and last name?", + type: "text", + isRequired: true + },{ + name: "email", + title: "What is your email address?", + type: "text", + isRequired: true + },{ + name: "phonenumber", + title: "What is your phone number?", + type: "text", + isRequired: true + },{ + name: "brief_description", + title: "Briefly describe why you would like to join our Board of Directors:", + type: "text" + },{ + "type": "multipletext", + "name": "current_aff", + "title": "Your current organizational affiliations (names of the organization and your role(s), please include any current boards you serve on):", + "items": [ + { + "name": "1", + "inputType": "string", + }, + { + "name": "2", + "inputType": "string", + }, + { + "name": "3", + "inputType": "string", + }, + { + "name": "4", + "inputType": "string", + }, + { + "name": "5", + "inputType": "string", + } + ] + },{ + "type": "checkbox", + "name": "skills", + "title": "Which of your skills would you like to utilize on the Board? Check those that apply:", + "description": "", + "choices": [ "Board development", "Strategic planning", "Staffing / HR", "Program development", "Financial management", "Fundraising", "Evaluation","Community networking", "Training", "Marketing", "Volunteer management", "Facilities management"], + "isRequired": true, + "colCount": 2, + "showNoneItem": true, + "showOtherItem": true, + "showSelectAllItem": true, + "separateSpecialChoices": true + },{ + name: "other_skills", + title: "Other skill(s) of yours that you would like to utilize", + type: "text" + },{ + name: "other_types", + title: "What would you like to get for yourself out of your participation on the Board, e.g., what types of experiences, skills to develop, interests to cultivate for you, etc.?", + type: "text" + },{ + "type": "boolean", + "name": "if_join", + "label": "If you join the Board, you agree that you can provide at least 2-4 hours a month in attendance to Board and Committee meetings, and that you do not have any conflict-of-interest in participating on the Board.", + // "titleLocation": "hidden", + "valueTrue": "Yes", + "valueFalse": "No", + "renderAs": "radio" + },{ + "type": "boolean", + "name": "if_not_selected", + "label": "If you are not selected as a member of the Board, or if you decide not to join, would you like to be a volunteer to assist our organization in various ways that match your skills and interests?", + // "titleLocation": "hidden", + "valueTrue": "Yes", + "valueFalse": "No", + "renderAs": "radio" + },{ + "type": "file", + "title": "Please upload your files", + "name": "files", + "storeDataAsText": false, + "waitForUpload": true, + "allowMultiple": true, + "maxSize": 102400, + "hideNumber": true + },{ + "type": "signaturepad", + "name": "signature", + "title": "Please sign here", + "isRequired": true, + "signatureWidth": 600 + },{ + "type": "boolean", + "name": "agreement", + "title": "I consent to be sent communications regarding my Board application", + "defaultValue": "false", + "renderAs": "checkbox", + "validators": [ + { + "type": "expression", + "text": "Please confirm consent", + "expression": "{agreement} = true" + } + ], + "titleLocation": "left", + "label": "", + "showTitle": true + }] + } + } + + function CreateFormStyle(){ + return { + "backgroundImage": "", + "backgroundImageFit": "cover", + "backgroundImageAttachment": "scroll", + "backgroundOpacity": 1, + "themeName": "default", + "isPanelless": true, + "colorPalette": "light", + "cssVariables": { + "--sjs-general-backcolor": "rgba(255, 255, 255, 1)", + "--sjs-general-backcolor-dark": "rgba(248, 248, 248, 1)", + "--sjs-general-backcolor-dim": "rgba(255, 255, 255, 1)", + "--sjs-general-backcolor-dim-light": "rgba(249, 249, 249, 1)", + "--sjs-general-backcolor-dim-dark": "rgba(243, 243, 243, 1)", + "--sjs-general-forecolor": "rgba(0, 0, 0, 0.91)", + "--sjs-general-forecolor-light": "rgba(0, 0, 0, 0.45)", + "--sjs-general-dim-forecolor": "rgba(0, 0, 0, 0.91)", + "--sjs-general-dim-forecolor-light": "rgba(0, 0, 0, 0.45)", + "--sjs-primary-backcolor": "rgba(0, 176, 82, 1)", + "--sjs-primary-backcolor-light": "rgba(0, 176, 82, 0.1)", + "--sjs-primary-backcolor-dark": "rgba(0, 161, 75, 1)", + "--sjs-primary-forecolor": "rgba(255, 255, 255, 1)", + "--sjs-primary-forecolor-light": "rgba(255, 255, 255, 0.25)", + "--sjs-base-unit": "8px", + "--sjs-corner-radius": "4px", + "--sjs-secondary-backcolor": "rgba(255, 152, 20, 1)", + "--sjs-secondary-backcolor-light": "rgba(255, 152, 20, 0.1)", + "--sjs-secondary-backcolor-semi-light": "rgba(255, 152, 20, 0.25)", + "--sjs-secondary-forecolor": "rgba(255, 255, 255, 1)", + "--sjs-secondary-forecolor-light": "rgba(255, 255, 255, 0.25)", + "--sjs-shadow-small": "0px 1px 2px 0px rgba(0, 0, 0, 0.15)", + "--sjs-shadow-small-reset": "0px 0px 0px 0px rgba(0, 0, 0, 0.15)", + "--sjs-shadow-medium": "0px 2px 6px 0px rgba(0, 0, 0, 0.1)", + "--sjs-shadow-large": "0px 8px 16px 0px rgba(0, 0, 0, 0.1)", + "--sjs-shadow-inner": "inset 0px 1px 2px 0px rgba(0, 0, 0, 0.15)", + "--sjs-shadow-inner-reset": "inset 0px 0px 0px 0px rgba(0, 0, 0, 0.15)", + "--sjs-border-light": "rgba(0, 0, 0, 0.09)", + "--sjs-border-default": "rgba(0, 0, 0, 0.16)", + "--sjs-border-inside": "rgba(0, 0, 0, 0.16)", + "--sjs-special-red": "rgba(229, 10, 62, 1)", + "--sjs-special-red-light": "rgba(229, 10, 62, 0.1)", + "--sjs-special-red-forecolor": "rgba(255, 255, 255, 1)", + "--sjs-special-green": "rgba(25, 179, 148, 1)", + "--sjs-special-green-light": "rgba(25, 179, 148, 0.1)", + "--sjs-special-green-forecolor": "rgba(255, 255, 255, 1)", + "--sjs-special-blue": "rgba(67, 127, 217, 1)", + "--sjs-special-blue-light": "rgba(67, 127, 217, 0.1)", + "--sjs-special-blue-forecolor": "rgba(255, 255, 255, 1)", + "--sjs-special-yellow": "rgba(255, 152, 20, 1)", + "--sjs-special-yellow-light": "rgba(255, 152, 20, 0.1)", + "--sjs-special-yellow-forecolor": "rgba(255, 255, 255, 1)", + "--sjs-article-font-xx-large-textDecoration": "none", + "--sjs-article-font-xx-large-fontWeight": "700", + "--sjs-article-font-xx-large-fontStyle": "normal", + "--sjs-article-font-xx-large-fontStretch": "normal", + "--sjs-article-font-xx-large-letterSpacing": "0", + "--sjs-article-font-xx-large-lineHeight": "64px", + "--sjs-article-font-xx-large-paragraphIndent": "0px", + "--sjs-article-font-xx-large-textCase": "none", + "--sjs-article-font-x-large-textDecoration": "none", + "--sjs-article-font-x-large-fontWeight": "700", + "--sjs-article-font-x-large-fontStyle": "normal", + "--sjs-article-font-x-large-fontStretch": "normal", + "--sjs-article-font-x-large-letterSpacing": "0", + "--sjs-article-font-x-large-lineHeight": "56px", + "--sjs-article-font-x-large-paragraphIndent": "0px", + "--sjs-article-font-x-large-textCase": "none", + "--sjs-article-font-large-textDecoration": "none", + "--sjs-article-font-large-fontWeight": "700", + "--sjs-article-font-large-fontStyle": "normal", + "--sjs-article-font-large-fontStretch": "normal", + "--sjs-article-font-large-letterSpacing": "0", + "--sjs-article-font-large-lineHeight": "40px", + "--sjs-article-font-large-paragraphIndent": "0px", + "--sjs-article-font-large-textCase": "none", + "--sjs-article-font-medium-textDecoration": "none", + "--sjs-article-font-medium-fontWeight": "700", + "--sjs-article-font-medium-fontStyle": "normal", + "--sjs-article-font-medium-fontStretch": "normal", + "--sjs-article-font-medium-letterSpacing": "0", + "--sjs-article-font-medium-lineHeight": "32px", + "--sjs-article-font-medium-paragraphIndent": "0px", + "--sjs-article-font-medium-textCase": "none", + "--sjs-article-font-default-textDecoration": "none", + "--sjs-article-font-default-fontWeight": "400", + "--sjs-article-font-default-fontStyle": "normal", + "--sjs-article-font-default-fontStretch": "normal", + "--sjs-article-font-default-letterSpacing": "0", + "--sjs-article-font-default-lineHeight": "28px", + "--sjs-article-font-default-paragraphIndent": "0px", + "--sjs-article-font-default-textCase": "none" + } + } + } + + function SurveyUploadFileComponent(survey,app) { + survey.onComplete.add((sender, options) => { + console.log(JSON.stringify(sender.data, null, 3)); + }); + + survey.onUploadFiles.add((_, options) => { + + const formData = new FormData(); + options.files.forEach((file) => { + let data = { + original_name: file.name, + new_name: "file_" + app.utils.randomGenerator(32) + "." + file.name.split('.').pop(), + category: "forms", + nameid: "formsnameid", + savedirectory: "/modules/forms" + }; + + formData.append("api_upload_file", file); + formData.append("api_upload_data", JSON.stringify(data)); + }); + + let requesturl = "/portal/admin/core/api/php/request.php" + fetch(requesturl, { + method: "POST", + body: formData + }) + .then((response) => { return response.json(); }) + .then((data2) => { + + console.log(data2); + options.callback( + options.files.map((file) => { + console.log(file) + return { + file: file, + content: requesturl + "?api_download_file=" + data2["new_name"] + }; + }) + ); + }) + .catch((error) => { + console.error(error); + options.callback([], [ 'An error occurred during file upload.' ]); + }); + }); + + async function deleteFile(fileURL, options) { + try { + const name = fileURL.split("=")[1]; + const apiUrl = `https://api.surveyjs.io/private/Surveys/deleteTempFile?name=${name}`; + const response = await fetch(apiUrl, { + method: "DELETE" + }); + + if (response.status === 200) { + console.log(`File ${name} was deleted successfully`); + options.callback("success"); + } else { + console.error(`Failed to delete file: ${name}`); + options.callback("error"); + } + } catch (error) { + console.error("Error while deleting file: ", error); + options.callback("error"); + } + } + + survey.onClearFiles.add(async (_, options) => { + if (!options.value || options.value.length === 0) + return options.callback("success"); + if (!options.fileName && !!options.value) { + for (const item of options.value) { + await deleteFile(item.content, options); + } + } else { + const fileToRemove = options.value.find( + (item) => item.name === options.fileName + ); + if (fileToRemove) { + await deleteFile(fileToRemove.content, options); + } else { + console.error(`File with name ${options.fileName} is not found`); + } + } + }); + } + + + + + + + + + + + + + +})(); \ No newline at end of file diff --git a/portal/admin/playground/client/subscribers/styles.css b/portal/admin/playground/client/subscribers/styles.css new file mode 100644 index 00000000..382ca514 --- /dev/null +++ b/portal/admin/playground/client/subscribers/styles.css @@ -0,0 +1,2026 @@ + +/* * { + padding: 0; + margin: 0; + box-sizing: border-box; +} */ +@import url(https://fonts.googleapis.com/css?family=Cedarville+Cursive); +@font-face { + font-family: "Quirk"; + src: url('../../assets/fonts/Quirk.woff') format('woff'); + } + +body { + + background-color: #fff; + + /* font-family: "Fira Sans"; */ + /* font-family: "Fira Sans", "PT Sans", Calibri, Tahoma, sans-serif; */ +} + +@media screen and (max-width: 850px){ +.main-container { + width: 105%; +} + + +} + + + +/* .mycolor1 { color: #00B052;} +.mycolor2 { color: #2A6EB5; } +.mycolor3 { background-color: #00B052; } +.mycolor4 { background-color: #2A6EB5; } */ + + +/* +Green - #00b052 +Blue - #1a75cf +Brown - #c5b9ac + +*/ +.mycolor1 { color: #00b052;} +.mycolor2 { color: #1a75cf; } +.mycolor3 { background-color: #00B052; } +.mycolor4 { background-color: #1a75cf; } + + + +/* overwrite tabler styles */ +.main_nav_link:hover, +.main-nav-anchor:hover { + text-decoration: none; +} + +a:hover { + text-decoration: none; +} + +.btn-success { + background-color: #00B052; +} + +.quirk-font { + font-family: "Quirk"; +} + +.spacer { + width: 100%; + height:550px; +} + +.paypal-donate-btn { + color: white; +} + +.paypal-donate-btn:hover { + color: #1a75cf; +} + +.img-auto-sizer { + display: none; +} + + + + + +@media only screen and (max-width: 920px) { + + +} +@media screen and (min-width: 921px) { + +} +@media screen and (min-width: 1800px) { + +} +@media screen and (min-width: 1264px) { + + +} + + + + + + + + + + + + + +/* spinner */ +#link { + color: rgb(0, 176, 82); + display: block; + font: 12px "Helvetica Neue", Helvetica, Arial, sans-serif; + text-align: center; + text-decoration: none; + } + #link:hover { + color: #cccccc; + } + + #link, + #link:hover { + -webkit-transition: color 0.5s ease-out; + -moz-transition: color 0.5s ease-out; + -ms-transition: color 0.5s ease-out; + -o-transition: color 0.5s ease-out; + transition: color 0.5s ease-out; + } + + /** BEGIN CSS **/ + body { + /* background: #333333; */ + } + @keyframes rotate-loading { + 0% { + transform: rotate(0deg); + -ms-transform: rotate(0deg); + -webkit-transform: rotate(0deg); + -o-transform: rotate(0deg); + -moz-transform: rotate(0deg); + } + 100% { + transform: rotate(360deg); + -ms-transform: rotate(360deg); + -webkit-transform: rotate(360deg); + -o-transform: rotate(360deg); + -moz-transform: rotate(360deg); + } + } + + @-moz-keyframes rotate-loading { + 0% { + transform: rotate(0deg); + -ms-transform: rotate(0deg); + -webkit-transform: rotate(0deg); + -o-transform: rotate(0deg); + -moz-transform: rotate(0deg); + } + 100% { + transform: rotate(360deg); + -ms-transform: rotate(360deg); + -webkit-transform: rotate(360deg); + -o-transform: rotate(360deg); + -moz-transform: rotate(360deg); + } + } + + @-webkit-keyframes rotate-loading { + 0% { + transform: rotate(0deg); + -ms-transform: rotate(0deg); + -webkit-transform: rotate(0deg); + -o-transform: rotate(0deg); + -moz-transform: rotate(0deg); + } + 100% { + transform: rotate(360deg); + -ms-transform: rotate(360deg); + -webkit-transform: rotate(360deg); + -o-transform: rotate(360deg); + -moz-transform: rotate(360deg); + } + } + + @-o-keyframes rotate-loading { + 0% { + transform: rotate(0deg); + -ms-transform: rotate(0deg); + -webkit-transform: rotate(0deg); + -o-transform: rotate(0deg); + -moz-transform: rotate(0deg); + } + 100% { + transform: rotate(360deg); + -ms-transform: rotate(360deg); + -webkit-transform: rotate(360deg); + -o-transform: rotate(360deg); + -moz-transform: rotate(360deg); + } + } + + @keyframes rotate-loading { + 0% { + transform: rotate(0deg); + -ms-transform: rotate(0deg); + -webkit-transform: rotate(0deg); + -o-transform: rotate(0deg); + -moz-transform: rotate(0deg); + } + 100% { + transform: rotate(360deg); + -ms-transform: rotate(360deg); + -webkit-transform: rotate(360deg); + -o-transform: rotate(360deg); + -moz-transform: rotate(360deg); + } + } + + @-moz-keyframes rotate-loading { + 0% { + transform: rotate(0deg); + -ms-transform: rotate(0deg); + -webkit-transform: rotate(0deg); + -o-transform: rotate(0deg); + -moz-transform: rotate(0deg); + } + 100% { + transform: rotate(360deg); + -ms-transform: rotate(360deg); + -webkit-transform: rotate(360deg); + -o-transform: rotate(360deg); + -moz-transform: rotate(360deg); + } + } + + @-webkit-keyframes rotate-loading { + 0% { + transform: rotate(0deg); + -ms-transform: rotate(0deg); + -webkit-transform: rotate(0deg); + -o-transform: rotate(0deg); + -moz-transform: rotate(0deg); + } + 100% { + transform: rotate(360deg); + -ms-transform: rotate(360deg); + -webkit-transform: rotate(360deg); + -o-transform: rotate(360deg); + -moz-transform: rotate(360deg); + } + } + + @-o-keyframes rotate-loading { + 0% { + transform: rotate(0deg); + -ms-transform: rotate(0deg); + -webkit-transform: rotate(0deg); + -o-transform: rotate(0deg); + -moz-transform: rotate(0deg); + } + 100% { + transform: rotate(360deg); + -ms-transform: rotate(360deg); + -webkit-transform: rotate(360deg); + -o-transform: rotate(360deg); + -moz-transform: rotate(360deg); + } + } + + @keyframes loading-text-opacity { + 0% { + opacity: 0; + } + 20% { + opacity: 0; + } + 50% { + opacity: 1; + } + 100% { + opacity: 0; + } + } + + @-moz-keyframes loading-text-opacity { + 0% { + opacity: 0; + } + 20% { + opacity: 0; + } + 50% { + opacity: 1; + } + 100% { + opacity: 0; + } + } + + @-webkit-keyframes loading-text-opacity { + 0% { + opacity: 0; + } + 20% { + opacity: 0; + } + 50% { + opacity: 1; + } + 100% { + opacity: 0; + } + } + + @-o-keyframes loading-text-opacity { + 0% { + opacity: 0; + } + 20% { + opacity: 0; + } + 50% { + opacity: 1; + } + 100% { + opacity: 0; + } + } + .loading-container, + .loading { + height: 60px; + position: absolute; + border-radius: 100%; + + left: 50%; + top: 25%; + height:60px; + width:60px; + margin:0px auto; + } + + .loading-container { + margin: 40px auto; + } + + .loading { + border: 2px solid transparent; + border-color: transparent #00B052 transparent #00B052; + -moz-animation: rotate-loading 1.5s linear 0s infinite normal; + -moz-transform-origin: 50% 50%; + -o-animation: rotate-loading 1.5s linear 0s infinite normal; + -o-transform-origin: 50% 50%; + -webkit-animation: rotate-loading 1.5s linear 0s infinite normal; + -webkit-transform-origin: 50% 50%; + animation: rotate-loading 1.5s linear 0s infinite normal; + transform-origin: 50% 50%; + } + + .loading-container:hover .loading { + border-color: transparent #00B052 transparent #00B052; + } + .loading-container:hover .loading, + .loading-container .loading { + -webkit-transition: all 0.5s ease-in-out; + -moz-transition: all 0.5s ease-in-out; + -ms-transition: all 0.5s ease-in-out; + -o-transition: all 0.5s ease-in-out; + transition: all 0.5s ease-in-out; + } + + .loading-container { + /* margin-top: 50px; */ + } + + #loading-text { + -moz-animation: loading-text-opacity 2s linear 0s infinite normal; + -o-animation: loading-text-opacity 2s linear 0s infinite normal; + -webkit-animation: loading-text-opacity 2s linear 0s infinite normal; + animation: loading-text-opacity 2s linear 0s infinite normal; + color: #00B052; + font-family: "Helvetica Neue, " Helvetica ", " "arial"; + font-size: 8px; + font-weight: bold; + margin-top: 40px; + opacity: 0; + position: relative; + text-align: center; + text-transform: uppercase; + top: 0; + width: 120px; + } + + + +/* green - rgb(0, 176, 82) */ +/* blue - rgb(42, 110, 181)) */ + +/** small */ +@media only screen and (max-width: 920px) { + .loading-container, + .loading { + left: 35%; + top: 30%; + height:60px; + width:60px; + margin:0px auto; + } + #loading-text { + width: 100px; + } +} +/** medium */ +@media screen and (min-width: 921px) { + +} +/** large */ +@media screen and (min-width: 1800px) { + +} + + + + + + + + + + + + + + +/* Sponsorship */ +.spin::before { + animation: 1.5s linear infinite spinner12; + animation-play-state: inherit; + border: solid 5px #cfd0d1; + border-bottom-color: #1c87c9; + border-radius: 50%; + content: ""; + height: 40px; + position: absolute; + top: 10%; + left: 10%; + transform: translate3d(-50%, -50%, 0); + width: 40px; + will-change: transform; +} +@keyframes spinner12 { + 0% { + transform: translate3d(-50%, -50%, 0) rotate(0deg); + } + 100% { + transform: translate3d(-50%, -50%, 0) rotate(360deg); + } +} + + + + + + + +@media only screen and (max-width: 920px) { + + + +} +@media screen and (min-width: 921px) { + +} +@media screen and (min-width: 1800px) { + +} +@media screen and (min-width: 1264px) { + + +} + + + + +/* green - rgb(0, 176, 82) #00B052 */ +/* blue - rgb(42, 110, 181) #2A6EB5 */ +/* 0,165,70 */ + +/** Section-Block nav */ +/************* *****/ +/************* *****/ + +/* Overlay */ +#cover-spin { + position:fixed; + width:100%; + left:0;right:0;top:0;bottom:0; + background-color: rgba(255,255,255,0.7); + z-index:9999; + display:none; +} + +@-webkit-keyframes spin { +from {-webkit-transform:rotate(0deg);} +to {-webkit-transform:rotate(360deg);} +} + +@keyframes spin { +from {transform:rotate(0deg);} +to {transform:rotate(360deg);} +} + +#cover-spin::after { + content:''; + display:block; + position:absolute; + left:48%;top:40%; + width:40px;height:40px; + border-style:solid; + border-color:black; + border-top-color:transparent; + border-width: 4px; + border-radius:50%; + -webkit-animation: spin .8s linear infinite; + animation: spin .8s linear infinite; +} +/* End of Overlay */ + + + + + + + + + +article { + max-width: 1000px; + margin: 0 auto; + padding: 10px; +} + + +.button-34 { + display: none; + +} + + + + + + +.temp-container { + height: 500px; +} + + + + + +/** Section-Block home */ +/************* *****/ +/************* *****/ +@import url('https://fonts.googleapis.com/css2?family=Erica+One&display=swap'); +@font-face { + font-family: myFirstFont; + src: url(sansation_bold.woff); + font-weight: bold; +} + +.text2 { + font-family: 'Erica One'; + font-weight: bold; + font-size: xx-large; + color: rgb(42, 110, 181); +} +.text3 { + color: white; +} +.zero1 { + margin: 0px !important; + padding: 0px !important; +} + +/* CSS */ +.button-57 { + position: relative; + overflow: hidden; + width: 100%; + border: 1px solid #18181a; + color: #18181a; + display: inline-block; + font-size: 15px; + line-height: 15px; + padding: 18px 18px 17px; + text-decoration: none; + cursor: pointer; + background: #fff; + user-select: none; + -webkit-user-select: none; + touch-action: manipulation; + } + + .button-57 span:first-child { + position: relative; + transition: color 600ms cubic-bezier(0.48, 0, 0.12, 1); + z-index: 10; + } + + .button-57 span:last-child { + color: white; + display: block; + position: absolute; + bottom: 0; + transition: all 500ms cubic-bezier(0.48, 0, 0.12, 1); + z-index: 100; + opacity: 0; + top: 50%; + left: 50%; + transform: translateY(225%) translateX(-50%); + height: 14px; + line-height: 13px; + } + + .button-57:after { + content: ""; + position: absolute; + bottom: -50%; + left: 0; + width: 100%; + height: 100%; + background-color: rgb(25, 173, 72); + transform-origin: bottom center; + transition: transform 600ms cubic-bezier(0.48, 0, 0.12, 1); + transform: skewY(9.3deg) scaleY(0); + z-index: 50; + } + + + .button-57:hover:after { + transform-origin: bottom center; + transform: skewY(9.3deg) scaleY(2); + } + + .button-57:hover span:last-child { + transform: translateX(-50%) translateY(-100%); + opacity: 1; + transition: all 900ms cubic-bezier(0.48, 0, 0.12, 1); + } + + +.donate-container{ + /* height: 400px; */ + padding: 1rem; + background-color: rgb(42, 110, 181); +} + +.home1-container { + background-color: grey; + height:250px; +} +.home2-container { + background-color: white; +} +.my-text { + margin-top: 4rem; + font-size: 2rem; +} + +/* @media only screen and (max-width: 1075px) { */ +@media only screen and (max-width: 920px) { + .quick-donate-button { + margin-bottom: 35px; + width: 100%; + } + .donate-container{ + padding: 1rem; + background-color: rgb(42, 110, 181); + } + .text3 { + text-align: center; + } + .donate-image{ + text-align: center; + width: 100%; + margin-bottom: 25px; + + } + + } + @media screen and (min-width: 921px) { + + } + @media screen and (min-width: 1800px) { + + } + @media screen and (min-width: 1264px) { + + + } + + + + +.img-1 { + animation: transitionInRight 0.75s; + +} +.img-2 { + animation: transitionInLeft 1s; +} +@keyframes transitionInRight { + from { + opacity: 0; + transform: translateX(-150px); + } + + to { + opacity: 1; + transform: translateY(0); + } +} +@keyframes transitionInLeft { + from { + opacity: 0; + transform: translateX(150px); + } + + to { + opacity: 1; + transform: translateY(0); + } +} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +/* other */ +.mymodal-header-container{ + background-color: rgb(42, 110, 181); +} + + + + + + + + + + + + + + +/* subscription successful css */ + + + + + + + + + + +/* https://codepen.io/zastrow/pen/PoJmzGJ */ +@keyframes lights { + 0% { + color: hsl(230, 40%, 80%); + text-shadow: 0 0 1em hsla(320, 100%, 50%, 0.2), + 0 0 0.125em hsla(320, 100%, 60%, 0.3), + -1em -0.125em 0.5em hsla(40, 100%, 60%, 0), + 1em 0.125em 0.5em hsla(200, 100%, 60%, 0); + } + + 30% { + color: hsl(230, 80%, 90%); + text-shadow: 0 0 1em hsla(320, 100%, 50%, 0.5), + 0 0 0.125em hsla(320, 100%, 60%, 0.5), + -0.5em -0.125em 0.25em hsla(40, 100%, 60%, 0.2), + 0.5em 0.125em 0.25em hsla(200, 100%, 60%, 0.4); + } + + 40% { + color: hsl(230, 100%, 95%); + text-shadow: 0 0 1em hsla(320, 100%, 50%, 0.5), + 0 0 0.125em hsla(320, 100%, 90%, 0.5), + -0.25em -0.125em 0.125em hsla(40, 100%, 60%, 0.2), + 0.25em 0.125em 0.125em hsla(200, 100%, 60%, 0.4); + } + + 70% { + color: hsl(230, 80%, 90%); + text-shadow: 0 0 1em hsla(320, 100%, 50%, 0.5), + 0 0 0.125em hsla(320, 100%, 60%, 0.5), + 0.5em -0.125em 0.25em hsla(40, 100%, 60%, 0.2), + -0.5em 0.125em 0.25em hsla(200, 100%, 60%, 0.4); + } + + 100% { + color: hsl(230, 40%, 80%); + text-shadow: 0 0 1em hsla(320, 100%, 50%, 0.2), + 0 0 0.125em hsla(320, 100%, 60%, 0.3), + 1em -0.125em 0.5em hsla(40, 100%, 60%, 0), + -1em 0.125em 0.5em hsla(200, 100%, 60%, 0); + } + } + + + /******************/ + +/* .wrapper.four { + background-color: #9ba5b4; + font-family: "Play", sans-serif; +} +.four .type{ + padding: 2rem 1rem; + width: auto; + margin: auto; +} +.four h3 { + width: 70%; + border-right: 4px solid black; + margin: 2rem auto; + white-space: nowrap; + overflow: hidden; + animation: typing 2s steps(12, end), blink-caret 0.5s step-end infinite alternate; +} +#quote-span { + float: right; + margin-right: 1rem; +} +@-webkit-keyframes typing { + from { + width: 0; + } +} +@-webkit-keyframes blink-caret { + 50% { + border-color: transparent; + } +} +*/ + + +.home2-container { + background-color: #bac6d9; +} +.text-myh2 { + margin-top: 5rem; + margin-bottom: 5rem; + font-size: 2rem; + font-weight: 300; +} +#span-quote { + font-size: 1rem; + margin-top: -2rem; +} + + + +:root { + --red: rgb(0, 176, 82); + --darkred: rgb(26, 117, 207); + --platinum: #e5e5e5; + --black: #2b2d42; + --white: #fff; + --thumb: #edf2f4; + + --style-blue: #1a75cf; + --style-green: #00B052; + } + + @font-face { + font-family: myFirstFont; + src: url(../../assets/fonts/Lobster-Regular.ttf); +} + + +@media only screen and (max-width: 920px) { + + +} +@media screen and (min-width: 921px) { + +} +@media screen and (min-width: 1800px) { + +} +@media screen and (min-width: 1264px) { + + +} + + /* * { + box-sizing: border-box; + padding: 0; + margin: 0; + } + + body { + font: 16px / 24px "Rubik", sans-serif; + color: var(--black); + background: var(--platinum); + margin: 50px 0; + } */ + + + .currency { + padding-left:12px; + } + + .currency-symbol { + position:absolute; + padding: 2px 5px; + } + + + + + /* .container { + max-width: 1400px; + padding: 0 15px; + margin: 0 auto; + } */ + + h2 { + font-size: 24px; + margin-bottom: 1em; + } + + + + + /* FOOTER STYLES + –––––––––––––––––––––––––––––––––––––––––––––––––– */ + .page-footer { + position: fixed; + right: 0; + bottom: 50px; + display: flex; + align-items: center; + /* padding: 5px; */ + z-index: 1; + } + + .page-footer a { + display: flex; + margin-left: 4px; + } + + + +.currencyinput { + border: 1px inset #ccc; +} +.currencyinput input { + border: 0; +} + + + + + + + +/* sponsorship button */ + +.my_sponsorship_btn { + position: relative; + background: #444; + /* color: #fff; */ + text-decoration: none; + text-transform: uppercase; + border: none; + letter-spacing: 0.1rem; + font-size: 1rem; + padding: 1rem 3rem; + transition: 0.2s; + width: 100%; + min-height: 75px; +} + +.my_sponsorship_btn:hover { + letter-spacing: 0.2rem; + padding: 1.1rem 3.1rem; + background: var(--clr); + color: var(--clr); + /* box-shadow: 0 0 35px var(--clr); */ + /* animation: box 3s infinite; */ +} + +.my_sponsorship_btn::before { + content: ""; + position: absolute; + inset: 2px; + /* background: #272822; */ + background: white; +} + +.my_sponsorship_btn span { + position: relative; + z-index: 1; +} +.my_sponsorship_btn i { + position: absolute; + inset: 0; + display: block; +} + +.my_sponsorship_btn i::before { + content: ""; + position: absolute; + width: 10px; + height: 2px; + left: 80%; + top: -2px; + border: 2px solid var(--clr); + background: #272822; + transition: 0.2s; +} + +.my_sponsorship_btn:hover i::before { + width: 15px; + left: 20%; + animation: move 3s infinite; +} + +.my_sponsorship_btn i::after { + content: ""; + position: absolute; + width: 10px; + height: 2px; + left: 20%; + bottom: -2px; + border: 2px solid var(--clr); + background: #272822; + transition: 0.2s; +} + +.my_sponsorship_btn:hover i::after { + width: 15px; + left: 80%; + animation: move 3s infinite; +} + +@keyframes move { + 0% { + transform: translateX(0); + } + 50% { + transform: translateX(5px); + } + 100% { + transform: translateX(0); + } +} + +@keyframes box { + 0% { + box-shadow: #27272c; + } + 50% { + box-shadow: 0 0 25px var(--clr); + } + 100% { + box-shadow: #27272c; + } +} + + + + + + + + +/* FORM_BUILDER */ +h1 { + text-align: center; +} +h2 { + margin: 0; +} +#multi-step-form-container { + /* margin-top: 1rem; */ +} +.text-center { + text-align: center; +} +.mx-auto { + margin-left: auto; + margin-right: auto; +} +.pl-0 { + padding-left: 0; +} +.stepbutton { + padding: 0.7rem 1.5rem; + border: 1px solid var(--darkred); + background-color: var(--darkred); + color: #fff; + border-radius: 5px; + cursor: pointer; +} +.submit-btn { + border: 1px solid var(--red); + background-color: var(--red); +} +.mt-3 { + margin-top: 2rem; +} +.d-none { + display: none; +} +.form-step { + /* border: 1px solid rgba(0, 0, 0, 0.1); */ + /* border-radius: 20px; */ + padding: 2rem; +} +.font-normal { + font-weight: normal; +} +ul.form-stepper { + counter-reset: section; + /* margin-bottom: 3rem; */ +} +ul.form-stepper .form-stepper-circle { + position: relative; +} +ul.form-stepper .form-stepper-circle span { + position: absolute; + top: 50%; + left: 50%; + transform: translateY(-50%) translateX(-50%); +} +.form-stepper-horizontal { + position: relative; + display: -webkit-box; + display: -ms-flexbox; + display: flex; + -webkit-box-pack: justify; + -ms-flex-pack: justify; + justify-content: space-between; +} +ul.form-stepper > li:not(:last-of-type) { + margin-bottom: 0.625rem; + -webkit-transition: margin-bottom 0.4s; + -o-transition: margin-bottom 0.4s; + transition: margin-bottom 0.4s; +} +.form-stepper-horizontal > li:not(:last-of-type) { + margin-bottom: 0 !important; +} +.form-stepper-horizontal li { + position: relative; + display: -webkit-box; + display: -ms-flexbox; + display: flex; + -webkit-box-flex: 1; + -ms-flex: 1; + flex: 1; + -webkit-box-align: start; + -ms-flex-align: start; + align-items: start; + -webkit-transition: 0.5s; + transition: 0.5s; +} +.form-stepper-horizontal li:not(:last-child):after { + position: relative; + -webkit-box-flex: 1; + -ms-flex: 1; + flex: 1; + height: 1px; + content: ""; + top: 32%; +} +.form-stepper-horizontal li:after { + background-color: #dee2e6; +} +.form-stepper-horizontal li.form-stepper-completed:after { + background-color: #4da3ff; +} +.form-stepper-horizontal li:last-child { + flex: unset; +} +ul.form-stepper li a .form-stepper-circle { + display: inline-block; + width: 40px; + height: 40px; + margin-right: 0; + line-height: 1.7rem; + text-align: center; + background: rgba(0, 0, 0, 0.38); + border-radius: 50%; +} +.form-stepper .form-stepper-active .form-stepper-circle { + background-color: var(--darkred) !important; + color: #fff; +} +.form-stepper .form-stepper-active .label { + color: var(--darkred) !important; +} +.form-stepper .form-stepper-active .form-stepper-circle:hover { + background-color: var(--darkred) !important; + color: #fff !important; +} +.form-stepper .form-stepper-unfinished .form-stepper-circle { + background-color: #f8f7ff; +} +.form-stepper .form-stepper-completed .form-stepper-circle { + background-color: var(--red) !important; + color: #fff; +} +.form-stepper .form-stepper-completed .label { + color: var(--red) !important; +} +.form-stepper .form-stepper-completed .form-stepper-circle:hover { + background-color: var(--red) !important; + color: #fff !important; +} +.form-stepper .form-stepper-active span.text-muted { + color: #fff !important; +} +.form-stepper .form-stepper-completed span.text-muted { + color: #fff !important; +} +.form-stepper .label { + font-size: 1rem; + margin-top: 0.5rem; +} +.form-stepper a { + cursor: default; +} + + +@media only screen and (max-width: 920px) { + + .form-step { + border: none; + padding: 0; + } +} +@media screen and (min-width: 921px) { + +} +@media screen and (min-width: 1800px) { + +} +@media screen and (min-width: 1264px) { + + +} + + + + + +/* amazon wishlist button */ +@import url(https://fonts.googleapis.com/css?family=Lato); +.mehrcontainer{ + max-width:300px; + +} +.mehrcontainer:hover{ + cursor: pointer; +} +.amazonbutton{ + display: flex; + align-items: center; + justify-content: center; + border-radius: 5px; + border:1px solid #b79033; + background:linear-gradient( #fde7ae,#f3c451); +} + + +.amazonbutton img{ + max-height:20px; + +} +.amazonbutton span{ + font-family: Helvetica, sans-serif; + line-height:44px; + margin-left:10px; + color:black; +} + + + + + + + +.my_schema_box { + + +} + +#paypal-main-payment-container { + + /* min-height: 300px; */ + +} + + + + + + + + /* background: #262626; */ + .navigation { + height: 80px; + background: #fff; + margin-bottom: 15px; +} + +.brand { + /* position: absolute; */ + /* padding-left: 5px; */ + float: left; + line-height: 80px; + text-transform: uppercase; + font-size: 1.4em; +} +.brand a, +.brand a:visited { + color: #ffffff; + text-decoration: none; +} + +.brand_logo { + position: relative; + z-index: 500; +} + + +.clear-right { + + clear: both; + +} +.clear-left { + +clear: left; + +} + +.mainnav_list_item{ + font-size: 1.2rem; +} + + /* max-width: 1000px; */ +.nav-container { + /* max-width: 1215px; + margin: 0 auto; */ +} + + +.mymainnav { + width: 88%; + float: right; +} + +.mymainnav ul { + list-style: none; + margin: 0; + padding: 0; +} +.mymainnav ul li { + float: left; + position: relative; +} +.mymainnav ul li a { + display: block; + padding: 0 10px; + line-height: 70px; + background: #fff; + color: rgb(42, 110, 181); + text-decoration: none; +} + + + /* background: #262626; */ +.mymainnav ul li a:hover, +.mymainnav ul li a:visited:hover { + /* background: #2581DC; */ + /* color: #ffffff; */ +} +/* nav ul li a:not(:only-child):after, +nav ul li a:visited:not(:only-child):after { + padding-left: 4px; + content: " ▾"; +} */ +.mymainnav ul li ul li { + min-width: 190px; +} +.mymainnav ul li ul li a { + padding: 15px; + line-height: 20px; +} + + /* transform: scale(1.05) rotate(-1deg); */ + /* background-color: rgb(25, 173, 72); */ +.nav-dropdown a:hover { + background-color: rgba(44,187,99); + box-shadow: rgba(44,187,99,.35) 0 -25px 18px -14px inset,rgba(44,187,99,.25) 0 1px 2px,rgba(44,187,99,.25) 0 2px 4px,rgba(44,187,99,.25) 0 4px 8px,rgba(44,187,99,.25) 0 8px 16px,rgba(44,187,99,.25) 0 16px 32px; + +} + +.nav-dropdown { + position: absolute; + display: none; + z-index: 999; + box-shadow: 0 3px 12px rgba(0, 0, 0, 0.15); +} + +/* Mobile navigation */ +/* #262626;*/ +.nav-mobile { + display: none; + position: absolute; + top: 0; + right: 0; + background: white; + height: 70px; + width: 70px; +} + + + +.nav-toggle { + position: absolute; + left: 18px; + top: 22px; + cursor: pointer; + padding: 10px 35px 16px 0px; +} +.nav-toggle span, +.nav-toggle span:before, +.nav-toggle span:after { + cursor: pointer; + border-radius: 1px; + height: 5px; + width: 35px; + background: rgb(42, 110, 181); + position: absolute; + display: block; + content: ""; + transition: all 300ms ease-in-out; +} +.nav-toggle span:before { + top: -10px; +} +.nav-toggle span:after { + bottom: -10px; +} +.nav-toggle.active span { + background-color: transparent; +} +.nav-toggle.active span:before, .nav-toggle.active span:after { + top: 0; +} +.nav-toggle.active span:before { + transform: rotate(45deg); +} +.nav-toggle.active span:after { + transform: rotate(-45deg); +} + + +.nav-donate-btn { + background: rgb(42, 110, 181); + /* width: 10rem; */ + height: 3rem; + /* margin-left: 15rem; */ + margin-top: 1rem; + + float: right; + + border: none; + color: rgb(25, 173, 72); + text-align: center; + text-decoration: none; + cursor: pointer; + border-radius: 16px; + +} +.mobile-donate-btn { + /* position: absolute; */ + padding-left: 5px; + float: left; + line-height: 5px; + text-transform: uppercase; + font-size: 1.4em; +} +.mobile-seal-img { + position: absolute; + padding-left: 5px; + float: right; + width: 100px; + height: 75px; + /* margin-left: 4rem; */ +} +.mobile-seal-img-footer { + width: 100px; + height: 75px; +} + +/* CSS */ +.button-33 { + background-color: #c2fbd7; + border-radius: 100px; + box-shadow: rgba(44, 187, 99, .2) 0 -25px 18px -14px inset,rgba(44, 187, 99, .15) 0 1px 2px,rgba(44, 187, 99, .15) 0 2px 4px,rgba(44, 187, 99, .15) 0 4px 8px,rgba(44, 187, 99, .15) 0 8px 16px,rgba(44, 187, 99, .15) 0 16px 32px; + color: green; + cursor: pointer; + display: inline-block; + font-family: CerebriSans-Regular,-apple-system,system-ui,Roboto,sans-serif; + padding: 7px 35px; + text-align: center; + text-decoration: none; + transition: all 250ms; + border: 0; + font-size: 16px; + user-select: none; + -webkit-user-select: none; + touch-action: manipulation; +} + +.button-33:hover { + box-shadow: rgba(44,187,99,.35) 0 -25px 18px -14px inset,rgba(44,187,99,.25) 0 1px 2px,rgba(44,187,99,.25) 0 2px 4px,rgba(44,187,99,.25) 0 4px 8px,rgba(44,187,99,.25) 0 8px 16px,rgba(44,187,99,.25) 0 16px 32px; + transform: scale(1.05) rotate(-1deg); +} + +@media only screen and (max-width: 1070px) { +/* @media only screen and (max-width: 920px) { */ + .nav-mobile { + display: block; + } + .mymainnav { + width: 100%; + padding: 10px 0 15px; + } + .mymainnav ul { + display: none; + } + .mymainnav ul li { + float: none; + } + .mymainnav ul li a { + padding: 15px; + line-height: 20px; + } + .mymainnav ul li ul li a { + padding-left: 30px; + } + + .nav-dropdown { + position: static; + } + .button-33 { + display: none; + } + .button-34 { + display: block; + width: 3.5rem; + } +} + +/* @media only screen and (min-width: 921px) { + .nav-list { + display: none !important; + } +} */ +/** medium-screen */ +@media only screen and (min-width: 1070px) { +/* @media screen and (min-width: 921px) { */ + + + .mobile-donate-btn { + display: none; + } + + .mobile-seal-img{ + display: none; + } + +.main_nav_link { + position: relative; + padding: 0 10px; + font-size: 1.2rem; + } + + .after { + content: ""; + position: absolute; + background-color: rgb(25, 173, 72);; + height: 3px; + width: 0%; + left: 0; + bottom: -10px; + margin-bottom: 15px; + -webkit-transition: all 0.5s ease; + -moz-transition: all 0.5s ease; + transition: all 0.5s ease; + transform: translate(-50%, 0); /*Add this*/ + } + + .main_nav_link:after { + content: ""; + position: absolute; + background-color: rgb(25, 173, 72);; + height: 3px; + width: 0%; + left: 0; + bottom: -10px; + margin-bottom: 15px; + -webkit-transition: all 0.5s ease; + -moz-transition: all 0.5s ease; + transition: all 0.5s ease; + transform: translate(-50%, 0); /*Add this*/ + } + + .mnl_about:hover:after{ + margin-left: 49%; + width:85% + } + .mnl_news:hover:after{ + margin-left: 49%; + width:85% + } + .mnl_young:hover:after{ + margin-left: 49%; + width:85% + } + .mnl_you:hover:after{ + margin-left: 50%; + width:85% + } + .mnl_contact:hover:after{ + margin-left: 49%; + width:80% + } + .mnl_ini:hover:after{ + margin-left: 49%; + width:85% + } + + .mymainnav { + width: 85%; + float: right; + } + +} +/** large-screen */ +@media screen and (min-width: 1800px) { + .nav-container{ + max-width: 1850px; + } + .mymainnav { + width: 90%; + } + /* .nav-donate-btn { + margin-left: 50rem; + } */ + .mobile-donate-btn { + display: none; + } + + .mobile-seal-img{ + display: none; + } +} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +@media only screen and (max-width: 920px) {} +/** medium */ +@media screen and (min-width: 921px) {} +/** large */ +@media screen and (min-width: 1800px) {} + + + +/** Section-Block footer */ +/************* *****/ +/************* *****/ +.footer_body { + /* position: fixed; */ + left: 0; + bottom: 0; + width: 100%; + /* background-color: red; + color: white; */ + text-align: center; + } + footer { + background-color: #00a546;/* #121315; rgb(25, 173, 72); rgb(42, 110, 181);*/ + color: #a7a7a7; + font-size: 16px; + } + footer * { + font-family: "Poppins", sans-serif; + box-sizing: border-box; + border: none; + outline: none; + } + .footer_row { + padding: 1em 1em; + } + .footer_row.primary { + display: grid; + grid-template-columns: 3fr 3fr 3fr; + align-items: stretch; + } + .footer_column { + width: 100%; + display: flex; + flex-direction: column; + padding: 0 2em; + min-height: 12em; + } + .footer_h3 { + width: 100%; + text-align: left; + color: white; + font-size: 1.4em; + white-space: nowrap; + } + .footer_ul { + list-style: none; + display: flex; + flex-direction: column; + padding: 0; + margin: 0; + } + .footer_li:not(:first-child) { + margin-top: 0.8em; + } + .footer_ul .footer_li a { + + text-decoration: none; + } + .footer_ul .footer_li a:hover { + color: #2a8ded; + } + .footer_about p { + text-align: justify; + line-height: 2; + margin: 0; + } + .subscribe-email-input { + font-size: 1em; + padding: 1em; + width: 100%; + border-radius: 5px; + margin-bottom: 5px; + } + .mycolorbtn { + background-color: rgb(42, 110, 181); + } + .footer-btn { + font-size: 1em; + padding: 1em; + width: 100%; + border-radius: 5px; + margin-bottom: 5px; + color: #fff; + + border: black; + /* width: 100%; + padding: 1em; + background-color: rgb(42, 110, 181); + color: #fff; + font-size: 1em; */ + } + .footer-btn:hover { + color: silver; + border: silver; + background-color: rgb(42, 110, 181); + } + .footer-btn { + background-color: rgb(42, 110, 181); + /* color: #ffffff; */ + } + .footer-text-1 { + /* background-color: rgb(42, 110, 181); */ + color: white; /* rgb(42, 110, 181); */ + } + div.social { + display: flex; + justify-content: space-around; + font-size: 2.4em; + flex-direction: row; + margin-top: 0.5em; + } + .social i { + color: white; /* #bac6d9; */ + } + + .copyright { + padding: 0.3em 1em; + background-color: #25262e; + } + .footer-menu{ + float: left; + margin-top: 10px; + } + + .footer-menu a{ + color: #cfd2d6; + padding: 6px; + + text-decoration: none; + } + .footer-menu a:hover{ + color: #27bcda; + } + .copyright p { + font-size: 0.9em; + text-align: right; + } + + + .footer_h3_2 { + height: 5%; + } + .column-footer-3 { + display: none; +} + + +.mobile-seal-img-footer { + height: auto; +} + +@media screen and (max-width: 850px) { + .footer_row.primary { + grid-template-columns: 1fr; + } + .footer_h3_2 { + height: 0; + } + .footer_body{ + /* width: 105%; */ + } +} + + + + + +@media only screen and (max-width: 920px) { + .column-footer-3 { + display: block; + } + .footer_logo_img { + max-width: 200px; + + } + + .column-footer-2 { + min-height: 3px !important; + } + +} +@media screen and (min-width: 921px) { + + +} +@media screen and (min-width: 1800px) { + +} +@media screen and (min-width: 1264px) { + + +} + + + + + + + + +/* green - rgb(0, 176, 82) */ +/* blue - rgb(42, 110, 181)) */ + +/** small */ +@media only screen and (max-width: 920px) { + +} +/** medium */ +@media screen and (min-width: 921px) { + +} +/** large */ +@media screen and (min-width: 1800px) { + +} + + + + +#spacer { + width: 100%; + min-height:600px; +} + + + +.hero { + width: 100%; + height: 100%; + /* background: linear-gradient(45deg, #83B8D7, #BAA6FD); */ + display: grid; + } + + #calendar { + width: 100%; + /* margin: 40px auto; */ + } + + + .text3 { + color: #00B052; + } + + \ No newline at end of file diff --git a/portal/api/sdk/js/afssdk-internal.js b/portal/api/sdk/js/afssdk-internal.js index b8f7e0fc..012bf432 100644 --- a/portal/api/sdk/js/afssdk-internal.js +++ b/portal/api/sdk/js/afssdk-internal.js @@ -9,13 +9,13 @@ class Controller { constructor(environment, member_config, json_config){ - console.log(member_config); + // console.log(member_config); this.config = { "member": member_config, "json": json_config, "environment": environment }; this.membership = member_config.membership; this.testing = true; this.config.key = "passthrough"; - console.log(json_config); + // console.log(json_config); // TODO_4: user should already have json_data & records diff --git a/portal/api/sdk/js/afssdk.js b/portal/api/sdk/js/afssdk.js index e3b4c876..36abcf1f 100644 --- a/portal/api/sdk/js/afssdk.js +++ b/portal/api/sdk/js/afssdk.js @@ -220,6 +220,7 @@ console.log("Appfactory Studio: SDK has not been initialized!"); return; } + console.log(1); applicationManager.apicall("/v1/payments/initialize_direct_payments",{ method: 'POST', headers: { @@ -310,6 +311,7 @@ "payment_intent": payment_intent }); + console.log(2); self.appManager.apicall("/v1/payments/save_handler",{ method: 'POST', headers: { @@ -458,15 +460,6 @@ },1000); } - - - - - - - - - __runPaypal2(){ const self = this; function RunCreatePaypalPayment(){ @@ -641,8 +634,6 @@ RunCreatePaypalPayment(); } - - __payaplCheckOutHtmlElement(paypal_style,self){ let showpaypalbutton = ""; if(self.options.showPaypalButton){ @@ -1609,7 +1600,6 @@ return; } - // nnnnn $("#paypal_terms_and_conditions").on("click",function(e){ e.preventDefault(); window.open("https://www.paypal.com/us/legalhub/privacy-full"); @@ -2447,6 +2437,7 @@ console.log(props); console.log(directPayment); + console.log(3); directPayment.appManager.apicall("/v1/payments/stripe_create_customer",{ method: 'POST', body: JSON.stringify(props) @@ -2477,6 +2468,7 @@ // reference_num: props.reference_num } + console.log(4); directPayment.appManager.apicall("/v1/payments/stripe_create_subscription",{ method: 'POST', body: JSON.stringify(data) @@ -2755,140 +2747,11 @@ }); } function _stripe_subscribe(self){ - // helper method for displaying a status message. - const setMessage = (message) => { - const messageDiv = document.querySelector('#messages'); - messageDiv.innerHTML += "
    " + message; - } - // Fetch public key and initialize Stripe. - let stripe, cardElement; - - - let data = {}; - fetchJsonp(self.service_request_url + "?" + new URLSearchParams({type:"config",data: JSON.stringify(data)}), { - method: "get" - }) - .then((resp) => resp.json()) - .then((resp) => { - stripe = Stripe(resp.publishableKey); - - const elements = stripe.elements(); - cardElement = elements.create('card'); - cardElement.mount('#card-element'); - }).catch((err) => { - console.log(err); - }); - - // fetch('/config') - // .then((resp) => resp.json()) - // .then((resp) => { - // stripe = Stripe(resp.publishableKey); - - // const elements = stripe.elements(); - // cardElement = elements.create('card'); - // cardElement.mount('#card-element'); - // }); - - // Extract the client secret query string argument. This is - // required to confirm the payment intent from the front-end. - const subscriptionId = window.sessionStorage.getItem('subscriptionId'); - const clientSecret = window.sessionStorage.getItem('clientSecret'); - // This sample only supports a Subscription with payment - // upfront. If you offer a trial on your subscription, then - // instead of confirming the subscription's latest_invoice's - // payment_intent. You'll use stripe.confirmCardSetup to confirm - // the subscription's pending_setup_intent. - // See https://stripe.com/docs/billing/subscriptions/trials - - // Payment info collection and confirmation - // When the submit button is pressed, attempt to confirm the payment intent - // with the information input into the card element form. - // - handle payment errors by displaying an alert. The customer can update - // the payment information and try again - // - Stripe Elements automatically handles next actions like 3DSecure that are required for SCA - // - Complete the subscription flow when the payment succeeds - const form = document.querySelector('#subscribe-form'); - form.addEventListener('submit', async (e) => { - e.preventDefault(); - const nameInput = document.getElementById('name'); - - // Create payment method and confirm payment intent. - stripe.confirmCardPayment(clientSecret, { - payment_method: { - card: cardElement, - billing_details: { - name: nameInput.value, - }, - } - }).then((result) => { - if(result.error) { - setMessage(`Payment failed: ${result.error.message}`); - } else { - // Redirect the customer to their account page - setMessage('Success! Redirecting to your account.'); - window.location.href = '/account.html'; - } - }); - }); } async function _stripe_single_charge_payment_intent(options,cbStart,cbSuccess,cbBackEndError,cbStripeError,self){ - let data = { - // customer: options.customer, - // mail_handlers: options.mail_handlers - }; - fetchJsonp(self.service_request_url + "?" + new URLSearchParams({type:"signle-create-payment-intent",data: JSON.stringify(data)}), { - method: "get" - }) - .then((resp) => resp.json()) - .then(async (resp) => { - let clientSecret = resp.clientSecret; - if (resp.error) { - console.log(resp); - console.log(cbBackEndError); - if(cbBackEndError!=undefined && cbBackEndError!=null) cbBackEndError(resp); - return; - } - - if(options.name==undefined) options.name = ""; - if(options.email==undefined) options.email = ""; - - cbStart(resp.paymentIntent, async function(){ - // Confirm the card payment given the clientSecret - // from the payment intent that was just created on - // the server. - const {error: stripeError, paymentIntent} = await options.stripe.confirmCardPayment( - clientSecret, - { - payment_method: { - card: options.card, - billing_details: { - name: options.name, - phone: "713-777-5555", - _member_reference_num: options._member_reference_num - }, - }, - metadata: { - - } - } - ); - - if (stripeError) { - console.log(stripeError); - if(cbStripeError!=undefined && cbStripeError!=null) cbStripeError(stripeError); - return; - } - - cbSuccess(paymentIntent); - }); - - }).catch((err) => { - console.error(err); - // cb(null,null); - }); } async function _stripe_standalone_payment(props,cb,self){ let data = {}; @@ -3718,6 +3581,21 @@ } + function EmailHandlerAddResponseEmail(email,mail_handlers){ + if(email!=undefined && email!=null){ + for(let prop1 in mail_handlers){ + for(let prop2 in mail_handlers[prop1].handlers){ + if(mail_handlers[prop1].handlers[prop2]['alert']==true) + continue; + mail_handlers[prop1].handlers[prop2]['emails'] = [email]; + } + } + } + return mail_handlers; + } + + + // nnnnn class Utils { @@ -3736,6 +3614,16 @@ return rest + "." + lastTwo; } + static numberId(len){ + let text = ""; + let possible = "0123456789"; + if(len==null || len==undefined) len = 5; + + for( var i=0; i < len; i++ ) + text += possible.charAt(Math.floor(Math.random() * possible.length)); + return text; + } + } @@ -3757,6 +3645,55 @@ } + /** + * + * @example + * path: "/path", + data: { + code: code, + direct_payment: JSON.stringify(direct_payments_obj) + } + * + * @param {object} params + * @param {function} cb + * @param {boolean} raw - should the params be added together for a get request + * @returns + */ + function callAPI(params,cb,raw=true){ + // const url = GetUrl('stripe'); + // https://api.appfactory.studio/v1/modules/stripe/webhook + // let urlpath = "https://www." + applicationManager.config.api.json.url + "/portal/admin/core/api/php/request.php"; + // let urlpath = "https://api.appfactory.studio/v1/modules/stripe" + params.path; + let urlpath = "https://api." + applicationManager.config.api.json.url + "" + params.path; + // let urlpath = "/portal/admin/core/api/php/includes/services/payments/stripe/stripe_payments.php" + let http = new XMLHttpRequest(); + let urlEncodedData = "", urlEncodedDataPairs = [], name; + if(raw==false){ + for( name in params ) { + urlEncodedDataPairs.push(encodeURIComponent(name)+'='+encodeURIComponent(params[name])); + } + } + + const URL = urlpath; + http.open('POST', URL, true); + // http.setRequestHeader('Content-Type', 'application/json'); + http.setRequestHeader('Content-type', 'application/x-www-form-urlencoded'); + http.onreadystatechange = function() { + // if(http.readyState == 4 && http.status == 200) { + if ((http.readyState == 4) && (http.status >= 200 && http.status < 300)) { + // console.log(http); + cb(JSON.parse(http.responseText)); + } + } + if(raw==false){ + http.send(urlEncodedDataPairs.join("&")); + }else{ + http.send(JSON.stringify(params)); + } + + + + } function callStripe(params,cb,raw=true){ // const url = GetUrl('stripe'); // https://api.appfactory.studio/v1/modules/stripe/webhook @@ -3843,7 +3780,7 @@ } - function stripeApplyDiscount(code,cb){ + function stripeApplyDiscount(code, price_id, amount, cb){ let direct_payments_obj = sessionStorage.getItem('afs_direct_payment'); if(direct_payments_obj==undefined){ console.log("error - no direct payment"); @@ -3852,24 +3789,23 @@ let client_id = direct_payments_obj._processor.json.client_id; + // may not needed let price = sessionStorage.getItem('mystripe_price'); - if(price==undefined || price==null){ - return; - } - + if(price==undefined || price==null){ return; } price = JSON.parse(price); console.log(price); console.log(direct_payments_obj); - // AQGTB0WN callStripe({ path: "/apply_coupon", - apply_coupon: true, - code: code, - price_id: price.id, - direct_payment: JSON.stringify(direct_payments_obj) + data: { + code: code, + price_id: price_id, //price.id, + amount: amount, + direct_payment: JSON.stringify(direct_payments_obj) + } + },function(resp){ - // resp = JSON.parse(resp); // console.log(resp); if(resp.message!=undefined){ cb(resp); @@ -3878,9 +3814,6 @@ sessionStorage.setItem('mystripe_coupon_object',JSON.stringify(resp)); cb(resp); }); - - - } // rrrrr @@ -3896,8 +3829,6 @@ setupCb(stripeManager); RegisterStripeEvents(stripeManager); - - $(options.submit_id).on("click", async function(e){ e.preventDefault(); @@ -3910,9 +3841,10 @@ // elements,cardNumber,cardCvc,cardExpiry let coupon = sessionStorage.getItem('mystripe_coupon_object'); - console.log(coupon); + // console.log(coupon); if(coupon!=undefined && coupon!=null){ coupon = JSON.parse(coupon); + // TODO_1: Stripe taxes is not applied to coupon _stripeWithCoupon(coupon,cardNumber,elements,stripe,direct_payments_obj,action,errCb,successCb,stripeManager); }else{ _stripeWithoutCoupon(elements,cardNumber,stripe,direct_payments_obj,action,errCb,successCb,stripeManager); @@ -3928,22 +3860,21 @@ data.resultsCallback(); } }); - document.addEventListener("update:tax",function(e){ + document.addEventListener("update:tax",function(e){ + console.log(e.detail); _stripeEventUpdateTax(stripeManager,e.detail); }); } function _stripeEventUpdateTax(stripeManager,data){ - if(stripeManager._saved_postal_code.trim()==data.data.address.postal_code.trim()){ - return; - } - console.log(data); - + // if(stripeManager._saved_postal_code.trim()==data.data.address.postal_code.trim()){ + // return; + // } stripeManager._saved_postal_code = data.data.address.postal_code.trim(); - // console.log(data); - - const stripe = stripeManager.getStripe(); //Stripe(client_id); + stripeManager._card_elements = {}; + const stripe = stripeManager.getStripe(); + if(stripeManager._cardIsMounted==false){ const appearance = { rules: { '.Tab': { @@ -3967,7 +3898,7 @@ // See all supported class names and selector syntax below } }; - const stripeOptions = { + stripeManager._card_elements.stripeOptions = { // hidePostalCode: true, layout: { type: 'accordion', @@ -3980,7 +3911,7 @@ } } }; - const elements = stripe.elements({ + stripeManager._card_elements.elements = stripe.elements({ fonts: [ { cssSrc: 'https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap' @@ -3990,7 +3921,7 @@ // const elements = stripe.elements({appearance}); - const cardNumber = elements.create('cardNumber', { + stripeManager._card_elements.cardNumber = stripeManager._card_elements.elements.create('cardNumber', { // hidePostalCode: true, style: { base: { @@ -4000,7 +3931,7 @@ } }); - const cardExpiry = elements.create('cardExpiry', { + stripeManager._card_elements.cardExpiry = stripeManager._card_elements.elements.create('cardExpiry', { style: { base: { color: '#555', @@ -4009,7 +3940,7 @@ } }); - const cardCvc = elements.create('cardCvc', { + stripeManager._card_elements.cardCvc = stripeManager._card_elements.elements.create('cardCvc', { style: { base: { color: '#555', @@ -4018,7 +3949,7 @@ } }); - const addressElement = elements.create("address", { + stripeManager._card_elements.addressElement = stripeManager._card_elements.elements.create("address", { mode: "billing", // or "shipping" defaultValues:{ name: "James Mitchell",// data.data.name, @@ -4027,7 +3958,7 @@ }); - const cardZip = elements.create('postalCode', { + stripeManager._card_elements.cardZip = stripeManager._card_elements.elements.create('postalCode', { style: { base: { color: '#555', @@ -4036,25 +3967,41 @@ } }); - stripeManager.getTax(data.data,function(results){ - // console.log("mounting"); - // console.log(data.data); - // console.log(results); - + } - addressElement.mount("#address_no_mount"); - cardNumber.mount(stripeManager.getOptions().card.cardNumber); - cardExpiry.mount(stripeManager.getOptions().card.cardExpiry); - cardCvc.mount(stripeManager.getOptions().card.cardCVC); + stripeManager.getTax(data.data, function(results){ + console.log("mounting"); + console.log(data.data); + console.log(results); + + if(stripeManager._cardIsMounted==false){ + // TODO_1: Stripe change to user supplied id + stripeManager._card_elements.addressElement.mount("#address_no_mount"); + stripeManager._card_elements.cardNumber.mount(stripeManager.getOptions().card.cardNumber); + stripeManager._card_elements.cardExpiry.mount(stripeManager.getOptions().card.cardExpiry); + stripeManager._card_elements.cardCvc.mount(stripeManager.getOptions().card.cardCVC); + + stripeManager._card_elements.cardNumber.on('ready', function() { + // console.log('Stripe card element is ready and mounted.'); + // You can now safely interact with the element, e.g., card.focus(); + stripeManager._cardIsMounted = true; + }); + + stripeManager.elements = { + elements:stripeManager._card_elements.elements, + cardNumber:stripeManager._card_elements.cardNumber, + cardCvc:stripeManager._card_elements.cardCvc, + cardExpiry:stripeManager._card_elements.cardExpiry, + addressElement:stripeManager._card_elements.addressElement + }; + } if(data.resultsCallback!=undefined){ - data.resultsCallback(results); + data.resultsCallback(results, stripeManager._cardIsMounted); } - stripeManager.elements = { - elements,cardNumber,cardCvc,cardExpiry,addressElement - }; }); + } @@ -4208,7 +4155,7 @@ }); } else { - console.log('Address not complete or valid:'); + console.log('Address not complete or invalid:'); } }); } @@ -4222,8 +4169,8 @@ } class StripeEvents { - #customEvent_display_card; - #customEvent_update_tax; + #customEvent_display_card = null; + #customEvent_update_tax = null; constructor(){} trigger(event,data = {}){ @@ -4236,7 +4183,7 @@ // document.dispatchEvent(this.#customEvent); }else if(event=="update:tax"){ this.#customEvent_update_tax = new CustomEvent("update:tax",{ - detail:data + detail: data }); document.dispatchEvent(this.#customEvent_update_tax); } @@ -4258,6 +4205,7 @@ #tax_calculation_id; _is_initialized = false; _saved_postal_code = ""; + _cardIsMounted = false; #options; constructor(direct_payment,options){ this.events = new StripeEvents(); @@ -4318,12 +4266,13 @@ customer_created: isCustomerCreated, payment_intent_created: isPaymentIntentCreated, payment_method_created: isPaymentMethodCreated, + amount: opts.amount, customer_id: this.#customer_id, payment_intent_id: this.#payment_intent_id, payment_method_id: this.#payment_method_id, product_id: this.#product_id, - amount: this.#options.amount, + // amount: this.#options.amount, address: opts.address } callStripe({ @@ -4548,13 +4497,336 @@ } + + + ///////////////////////////////////////////////////////////////////////// + ///////////////////////////////////////////////////////////////////////// + ///////////////////////////////////////////////////////////////////////// + //////// CatalogSubscribers + + + + + // nnnnn + class Subscriber { + + constructor(email,name,phone){ + this.email = email; + this.name = name; + this.phone = phone; + this.catalogs = []; + this.reference_num = "s"+ Utils.numberId(21); + } + + setCatalogs(catalogs){ + this.catalogs = catalogs; + } + + buildSubscriber(){ + let self = this; + let catalogs = []; + for (let i = 0; i < self.catalogs.length; i++) { + const catalog = self.catalogs[i]; + catalogs.push({ + "reference_num": catalog.reference_num, + "active": true + }); + } + return { + email: self.email, + reference_num: self.reference_num, + json: { + phone: self.phone, + name: (self.name==undefined) ? "" : self.name, + catalogs: catalogs + }, + date: moment().format('LLL') + }; + } + + addCatalog(catalog){ + let self = this; + self.catalogs.push(catalog); + } + + getCatalogs(){ return this.catalogs; } + + } + + class AFSSubscriber { + constructor() { + const self = this; + // self.app = app; + // self.managed_domain = managed_domain; + self.catalogs = []; + self.subscriber = {}; + self._props_ = { + "has_been_updated": [] + }; + } + + + requestCatalogs(cb){ + const self = this; + callAPI({ + path: "/v1/modules/subscribers/get_catalogs", + },function(resp){ + // console.log(resp); + if(resp.message!=undefined && resp.message=="request_failure"){ + console.log("Error - no catalogs!"); + return; + } + self.catalogs = resp.catalogs; + if(cb!=undefined) cb(resp.catalogs); + }); + } + + /** + * + * app.extra.config.configurations.subscriber + * + * @returns array + */ + getCatalogs() { + return this.catalogs; + } + + + + /** + * Get catalog by reference_num or the index within the subscribers array. + * can return null. + * + * @param {string|number} index - The index or reference_num + * @returns object | null app.extra.config.configurations.subscriber[catalog].json + */ + getCatalog(index) { + const self = this; + let saveindex = -1; + if(typeof index === 'number'){ + if(self._exist_catalog(index)){ + return self.getCatalogs()[index]; + }else{ + return null; + } + } + if(typeof index === 'string'){ + for (let i = 0; i < self.getCatalogs().length; i++) { + if(self.getCatalogs().reference_num==index){ + saveindex = i; + break; + } + } + } + if(saveindex==-1){ + return null; + }else{ + return self.getCatalogs()[saveindex].json; + } + } + + initializeSubscriber(email,name,phone){ + return new Subscriber(email,name,phone); + } + + addCatalogSubscriber(catalog,subscriber){ + subscriber.addCatalog(catalog); + } + + createSubscriber(sub,mail_handlers,cb,sendresponse){ + let self = this; + if(sub.getCatalogs().length==0) return; + if(sendresponse==undefined) sendresponse = true; + + let subBuild = sub.buildSubscriber(); + console.log(subBuild); + const response_email = subBuild['email']; + + // nnnnn + mail_handlers = EmailHandlerAddResponseEmail(response_email,mail_handlers); + // console.log(mail_handlers); + + callAPI({ + path: "/v1/modules/subscribers/create_subscriber", + data: { + token: "token", + subscriber: subBuild, + mail_handlers: mail_handlers, + sendresponse: sendresponse + } + },function(resp){ + console.log(resp); + if(cb!=undefined) cb(); + }); + + // let email_response = structuredClone(self.app.extra.config.configurations.subscriber[1].json.mail_handlers.email_response); + + // const settings = self.app.extra.config.configurations.settings[0].json; + // let sysVars = self.app.extra.extras.SetupSystemVariables(self.app); + // let sysVars = []; + // sysVars.push({ + // name: "email", + // value: sub.email + // }); + // sysVars.push({ + // name: "manage_subscription_link", + // value: self.app.extra.config.managed_domain.Address + `/portal/pages/subscriber/manage.php?email=${sub.email}&reference_num=${sub.reference_num}` + // }); + + // email_response.emails = [sub.email]; + // email_response.variables.client = [structuredClone(email_response.variables.client)]; + // email_response.variables.schema = [structuredClone(email_response.variables.schema)]; + // email_response.variables.system = [structuredClone(self.app.extra.extras.SetupSystemVariables(self.app, email_response))]; + + // let subBuild = sub.buildSubscriber(); + // console.log(subBuild); + // $.post(self.app.extra.url,{ + // client_subscriber_add_subscriber: true, + // token: self.app.extra.token, + // subscriber: JSON.stringify(subBuild), + // response: JSON.stringify(email_response), + // sendresponse: sendresponse, + // },function(resp1){ + // resp1 = JSON.parse(resp1); + // if(cb!=undefined) cb(resp1); + // }); + } + + + + + + /** + * Check if catalog exist in array given index. + * + * @param {number} index + * @returns + */ + _exist_catalog(index){ + const self = this; + if(typeof self.catalogs[index] === 'undefined') { + return false; + } + else { + return true; + } + } + updateSubscriberConfiguration(provider,cb1){ + const self = this; + let updates = self._props_.has_been_updated; + let catalogs = []; + for (let i = 0; i < updates.length; i++) { + const element = updates[i]; + const catalog = self.getCatalog(element.catalog_reference_num); + if(catalog==null){ + console.log(`Catalog ${element.catalog_reference_num} does not exist`); + continue; + } + catalogs.push(catalog); + } + + let email_response = structuredClone(self.app.extra.config.configurations.subscriber[1].json.mail_handlers.email_response); + + // const settings = self.app.extra.config.configurations.settings[0].json; + // let sysVars = self.app.extra.extras.SetupSystemVariables(self.app); + let sysVars = []; + sysVars.push({ + name: "email", + value: provider.email + }); + sysVars.push({ + name: "subscription_manage_button_link", + value: self.app.extra.config.managed_domain.Address + `/portal/pages/subscriber/manage.php?email=${provider.email}&reference_num=${provider.reference_num}` + }); + + email_response.emails = [provider.email]; + email_response.variables.client = [structuredClone(email_response.variables.client)]; + email_response.variables.schema = [structuredClone(email_response.variables.schema)]; + email_response.variables.system = [structuredClone(email_response.variables.system)]; + + // console.log(sysVars); + // console.log(provider); + // console.log(catalogs); + + // if(catalogs.length==0) return; + // $.post(self.app.extra.url,{ + // add_subscriber: true, + // catalogs: JSON.stringify(catalogs), + // response: JSON.stringify(email_response) + // },function(resp1){ + // self.clear(); + // if(cb1!=undefined) cb1(catalogs,resp1); + // }); + } + + deleteAllSubscribers(){ + for (let i = 0; i < app.extra.config.configurations.subscriber.length; i++) { + app.extra.config.configurations.subscriber[i] = []; + + let senddata ={ + configurations_update:true, + mysql_id: app.extra.config.configurations.subscriber[i].json.mysql_id, + data: JSON.stringify(app.extra.config.configurations.subscriber[i].json) + } + $.post(app.extra.url,senddata,function(resp){ + console.log(resp) + }); + + } + } + + sendConfirmationEmail(email,cb){ + // const self = this; + // const list = []; + // const updates = self._props_.has_been_updated; + // for (let i = 0; i < updates.length; i++) { + // const catalog = self.getCatalog(updates[i].catalog_reference_num); + // if(catalog==null) continue; + // list.push(catalog.display_name); + // } + // const data = { + // subscriber_confirm_subscribed: true, + // catalog_display_names: JSON.stringify(list), + // email: email + // }; + // $.post(self.app.url,data,function(resp){ + // if(cb!=undefined) cb(resp); + // }); + } + + clear(){ + this._props_.has_been_updated = []; + } + + addCatalogSubscriber2(catalog,subscriber){ + const self = this; + const cfn = catalog.reference_num; + if(self.getCatalog(cfn)!=null){ + if(self.getCatalog(cfn)!=null){ + _addorupdateCatalogSubscriber(subscriber, cfn, self); + }else{ + console.log(`[]: catalog ${cfn} not found`); + } + }else{ + console.log(`[]: catalog ${cfn} not found`); + } + } + } + + + + + + + + return { InitializeClientSDK: InitializeClientSDK, DirectPayments: DirectPayments, EmailHandler: EmailHandler, PaymentsProcessor: PaymentsProcessor, Utils: Utils, - + AFSSubscriber:AFSSubscriber, GetMyUrl, diff --git a/portal/api/v1/modules/stripe/index.php b/portal/api/v1/modules/stripe/index.php index 84730821..22fab249 100644 --- a/portal/api/v1/modules/stripe/index.php +++ b/portal/api/v1/modules/stripe/index.php @@ -28,7 +28,6 @@ $router->post('/get_tax',[AppfactoryStudio\Plugins\StripeModule::class, 'get_tax - // Setup $router->get('/setup_stripe_register_plans',[AppfactoryStudio\Plugins\StripeModule::class, 'RegisterSubscriptionPlans']); diff --git a/portal/api/v1/modules/subscribers/.htaccess b/portal/api/v1/modules/subscribers/.htaccess new file mode 100644 index 00000000..2d3b07ba --- /dev/null +++ b/portal/api/v1/modules/subscribers/.htaccess @@ -0,0 +1,113 @@ +########## BEGIN RECOMMENDED RULES (COMMENT OUT OR UNCOMMENT AS NEEDED) ########## + +### htaccess (https://github.com/delight-im/htaccess) +### Copyright (c) delight.im (https://www.delight.im/) +### Licensed under the MIT License (https://opensource.org/licenses/MIT) + +Header set Access-Control-Allow-Origin "*" +Header set Access-Control-Allow-Headers "Origin, X-Requested-With, Content-Type, Accept, Authorization" +Header set Access-Control-Allow-Methods "GET, POST, PUT, DELETE, OPTIONS" + + + + # Turn off directory listings for folders without default documents + Options -Indexes + + + + + + # Disable 'MultiViews' implicit filename pattern matches + Options -MultiViews + + + +# Serve "text/plain" and "text/html" documents as UTF-8 by default +AddDefaultCharset utf-8 + +# Disable "ETag" headers so that browsers rely on the "Cache-Control" and "Expires" headers +FileETag None + + + + # Enable HTTP Strict Transport Security (HSTS) with a duration of six months (Uncomment 1 line below) + # Header set Strict-Transport-Security max-age=15778800 + + + + + + # Force 'www' (i.e. prefix the "bare" domain and all subdomains with 'www' through permanent redirects) (Uncomment 6 lines below) + # RewriteCond %{HTTP_HOST} !^$ + # RewriteCond %{HTTP_HOST} !^www\. [NC] + # RewriteCond %{HTTPS}s ^on(s)| + # # RewriteCond %{REQUEST_SCHEME} ^http(s)| + # # RewriteCond %{SERVER_PORT}s ^443(s)| + # RewriteRule ^ http%1://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L] + + # Force HTTPS (Uncomment 4 lines below) + # RewriteCond %{HTTPS} off + # # RewriteCond %{REQUEST_SCHEME} http + # # RewriteCond %{SERVER_PORT} !443 + # RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L] + + + +# Prevent access to non-minified CSS and JS (Uncomment 3 lines below) +# +# Require all denied +# + +# Show a custom error document for "404 Not Found" errors (Uncomment 1 line below) +# ErrorDocument 404 /notFound.html + +# Announce contact information for security issues (Uncomment 2 lines below) +# Header set X-Vulnerability-Disclosure "https://www.example.com/security" +# Header set X-Security-Contact "security@example.com" + +########## END RECOMMENDED RULES ########## + +########## BEGIN CUSTOM RULES (YOUR OWN RULES GO HERE) ########## + +# Add your rules here ... + +########## END CUSTOM RULES ########## + + + RewriteEngine On + RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] + RewriteBase / + RewriteRule ^index\.php$ - [L] + RewriteCond %{REQUEST_FILENAME} !-f + RewriteCond %{REQUEST_FILENAME} !-d + RewriteRule . /v1/modules/subscribers/index.php [L] + + + Header set Access-Control-Allow-Origin "*" + + + # Prevent clickjacking (forbids framing by third-party sites) + Header set X-Frame-Options sameorigin + + # Prevent content sniffing (MIME sniffing) + Header set X-Content-Type-Options nosniff + + # Attempt to enable XSS filters in browsers, if available, and block reflected XSS + Header set X-XSS-Protection "1; mode=block" + + # Cache media files for a month + + Header set Cache-Control max-age=2629800 + + + # Remove response headers that provide no value but leak information + Header always unset X-Powered-By + + Header unset Server + + # Disable "ETag" headers so that browsers rely on the "Cache-Control" and "Expires" headers + Header unset ETag + + + + diff --git a/portal/api/v1/modules/subscribers/index.php b/portal/api/v1/modules/subscribers/index.php new file mode 100644 index 00000000..4b023a9a --- /dev/null +++ b/portal/api/v1/modules/subscribers/index.php @@ -0,0 +1,21 @@ +post('/get_catalogs',[AppfactoryStudio\Plugins\Subscribers::class, 'get_catalogs']); +$router->get('/get_catalogs',[AppfactoryStudio\Plugins\Subscribers::class, 'get_catalogs']); +$router->post('/create_subscriber',[AppfactoryStudio\Plugins\Subscribers::class, 'create_subscriber']); + + + +echo $router->UrlResolve("/v1/modules/subscribers", $_SERVER['REQUEST_URI'], strtolower($_SERVER['REQUEST_METHOD'])); + +