update 39839999
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
<?php
|
||||
require_once dirname( __DIR__, 6 ) . "/portal/admin/core/api/php/includes/init.php";
|
||||
require_once dirname( __DIR__, 6 ) . "/portal/admin/core/api/php/includes/functions.php";
|
||||
require_once dirname( __DIR__, 6 ) . "/portal/admin/core/api/php/includes/mylibs/email/email_manager.php";
|
||||
|
||||
|
||||
//portal\admin\core\api\php\includes\mylibs\email\email_manager.php
|
||||
|
||||
|
||||
if(Input::get("decode_string")){
|
||||
@@ -11,6 +12,20 @@ if(Input::get("decode_string")){
|
||||
EchoJsonObject(["data" => $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);
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
478
portal/admin/playground/client/subscribers/_index.php
Normal file
478
portal/admin/playground/client/subscribers/_index.php
Normal file
@@ -0,0 +1,478 @@
|
||||
<?php
|
||||
// require_once dirname( __DIR__, 2 ) . '/portal/admin/core/api/php/includes/indexcore.php';
|
||||
// require_once 'portal/admin/core/api/php/includes/indexcore.php';
|
||||
// require_once dirname(__DIR__, 2) . '/core/php/indexcore.php';
|
||||
// header_remove("X-Powered-By");
|
||||
// AFSIndexCoreTemplate("Cradle2Career - Events",
|
||||
// "events_content.html",
|
||||
// "events.css",
|
||||
// "events",
|
||||
// "../../",
|
||||
// true,
|
||||
// true,
|
||||
// "pages/events.js");
|
||||
?>
|
||||
|
||||
|
||||
<?php
|
||||
// require_once dirname( __DIR__, 2 ) . '/portal/admin/core/api/php/includes/indexcore.php';
|
||||
// require_once 'portal/admin/core/api/php/includes/indexcore.php';
|
||||
// require_once dirname(__DIR__, 2) . '/core/php/indexcore.php';
|
||||
// header_remove("X-Powered-By");
|
||||
// AFSIndexCoreTemplate("Cradle2Career - Events",
|
||||
// "events_content.html",
|
||||
// "events.css",
|
||||
// "events",
|
||||
// "../../",
|
||||
// true,
|
||||
// true,
|
||||
// "pages/events.js");
|
||||
?>
|
||||
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
||||
<title>Cradle2Career</title>
|
||||
|
||||
|
||||
<link rel="icon" type="image/x-icon" href="/assets/favicon.ico">
|
||||
<!-- <link rel="stylesheet" href="https://unpkg.com/boxicons@2.0.7/css/boxicons.min.css"> -->
|
||||
<!-- <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css"> -->
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/7.0.1/css/all.min.css" integrity="sha512-2SwdPD6INVrV/lHTZbO2nodKhrnDdJK9/kg2XD1r9uGqPo1cUbujc+IYdlYdEErWNu69gVcYgdxlmVmzTWnetw==" crossorigin="anonymous" referrerpolicy="no-referrer" />
|
||||
<link rel="stylesheet" href="/core/styles/bootstrap-5.3.8-dist/css/bootstrap.min.css">
|
||||
<!-- <link rel="stylesheet" href="/portal/admin/core/api/styles/tabler/tabler.min.css" /> -->
|
||||
<link rel="stylesheet" href="/core/styles/styles.css">
|
||||
<link rel="stylesheet" href="/core/styles/global.css">
|
||||
<link rel="stylesheet" href="/core/styles/events.css">
|
||||
|
||||
<script src="https://code.jquery.com/jquery-3.6.3.min.js" integrity="sha256-pvPw+upLPUjgMXY0G+8O0xUf+/Im1MZjXxxgOcBQBXU=" crossorigin="anonymous"></script>
|
||||
<script src="/portal/admin/core/api/js/appfactory/afsspinner.js"></script>
|
||||
<script src="/portal/admin/core/api/js/libs/analytics_0.8.14.min.js"></script>
|
||||
<script src="/portal/admin/core/api/js/libs/sameSize.js"></script>
|
||||
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.29.4/moment.min.js"></script>
|
||||
|
||||
<script src="/portal/admin/core/api/js/libs/fetch-jsonp.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/js/bootstrap.bundle.min.js" integrity="sha384-kenU1KFdBIe4zVF0s0G1M5b4hcpxyD9F7jL+jjXkk+Q2h455rYXK/7HAuoJl+0I4" crossorigin="anonymous"></script>
|
||||
|
||||
<script src="https://api.appfactory.studio/sdk/js/afssdk.js"></script>
|
||||
<script src="https://api.appfactory.studio/sdk/js/afssdk-internal.js"></script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<!-- Navigation -->
|
||||
<section class="navigation">
|
||||
<div class="nav-container">
|
||||
<div class="brand">
|
||||
<img id="brand_image_logo_btn" class="brand_logo" src="../../../assets/c2c_stckd_pos_PMS.svg" alt="" width="145">
|
||||
</div>
|
||||
<div class="mobile-donate-btn">
|
||||
<button class="nav-donate-btn button-34" data-bs-toggle="modal" data-bs-target="#modal_donation_dialog" role="button">
|
||||
<i style="font-size: 1.75rem;" class="fas fa-hand-holding-heart fa-1x"></i>
|
||||
</button>
|
||||
<div class="clear-right"></div>
|
||||
</div>
|
||||
<nav class="mymainnav">
|
||||
<div class="nav-mobile"><a id="nav-toggle" class="nav-toggle" href="#"><span></span></a></div>
|
||||
<ul class="nav-list" style="">
|
||||
|
||||
<li>
|
||||
<a href="#!" class="main_nav_link mnl_about">About Us</span></a>
|
||||
<ul class="nav-dropdown">
|
||||
<li><a class="mainnav_list_item main-nav-anchor" href="/pages/whatwedo">What We Do</a></li>
|
||||
<li><a class="mainnav_list_item" href="/pages/ourstory">Our Story</a></li>
|
||||
<li><a class="mainnav_list_item" href="/pages/meettheboard">Meet The Board</a></li>
|
||||
<li><a class="mainnav_list_item" href="/pages/financials">Financials</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#!" class="main_nav_link mnl_young">I'm a Young Parent</a>
|
||||
<ul class="nav-dropdown">
|
||||
<li><a class="mainnav_list_item" href="/pages/apply">I Need Support</a></li>
|
||||
<li><a class="mainnav_list_item" href="/pages/scholarships">Scholarships</a></li>
|
||||
<li><a class="mainnav_list_item" href="/pages/resources">Resources</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="#!" class="main_nav_link mnl_you">Give Forward</a>
|
||||
<ul class="nav-dropdown">
|
||||
<li><a class="mainnav_list_item" href="/pages/waystodonate">Donate</a></li>
|
||||
<li><a class="mainnav_list_item" href="/pages/volunteer">Volunteer</a></li>
|
||||
<li><a class="mainnav_list_item" href="/pages/sponsorships">Sponsorships</a></li>
|
||||
<li><a class="mainnav_list_item" href="/pages/partnerships">Partnerships </a></li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="/pages/initiatives" id="initiatives_header_link" class="main_nav_link mnl_ini">Initiatives</a>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
<a href="#!" class="main_nav_link mnl_news">News & Events</a>
|
||||
<ul class="nav-dropdown">
|
||||
<li><a class="mainnav_list_item" href="/pages/events">Events</a></li>
|
||||
<li><a class="mainnav_list_item" href="/pages/gallery">Gallery</a></li>
|
||||
<li><a class="mainnav_list_item" href="/pages/news">News</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="#!" class="main_nav_link mnl_contact">Contact</a>
|
||||
<ul class="nav-dropdown">
|
||||
<li><a class="mainnav_list_item" href="/pages/media_inquires">Media Inquiries</a></li>
|
||||
<li><a class="mainnav_list_item" href="/pages/need_a_speaker">Need A Speaker</a></li>
|
||||
<li><a class="mainnav_list_item" href="/pages/contact">Contact Us </a></li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
<div>
|
||||
<button style="background-color: #00B052;color: white;" class="nav-donate-btn button-33" id="main_modal_donation" role="button">
|
||||
<img src="../../../assets/logos/Bug/White/c2c_bug_wht_RGB.png"
|
||||
width="30"
|
||||
/>Donate</button>
|
||||
</div>
|
||||
</nav>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="container-fluid">
|
||||
<div class="row mt-5">
|
||||
<div class="col-12 mx-auto text-center">
|
||||
<h1 class="text3 quirk-font">NOVEMBER 1, 2025 - TEEN PARENT SUMMIT</h1>
|
||||
<a href="https://www.zeffy.com/en-US/ticketing/you-got-this-teen-parent-summit-2">
|
||||
<h3>Register Here</h3>
|
||||
</a>
|
||||
</div>
|
||||
<div class="col-12 mx-auto text-center">
|
||||
<p class="text3 fw-bold">
|
||||
🌟 You Got This! Teen Summit
|
||||
Empowering teen parents through education, support & community
|
||||
</p>
|
||||
</div>
|
||||
<div class="col-12 mx-auto text-center mb-3">
|
||||
<img id="instagram_event_img" style="cursor: pointer;" src="/assets/instagram_img.png" alt="" height="75px">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="row mb-5 justify-content-center">
|
||||
<div class="col-10 col-md-6 mx-auto justify-content-center">
|
||||
<img src="/assets/flyer003.png" alt="">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row d-flex justify-content-center">
|
||||
<div class="col-12 col-md-3 mb-5 p-0">
|
||||
<a class="text-center" href="https://www.zeffy.com/en-US/ticketing/you-got-this-teen-parent-summit-2">
|
||||
<h3>Register Here</h3>
|
||||
</a>
|
||||
<p class="m-0 p-0 text-center">Living Word Fellowshipp Church</p>
|
||||
<p class="m-0 p-0 text-center">7350 TC Jester BLVD.</p>
|
||||
<p class="m-0 p-0 text-center mb-3">Houston, TX 77088</p>
|
||||
|
||||
|
||||
|
||||
|
||||
<p class="m-0 p-0 text-center">(832) 987-2076 | info@cradle2careertx.org</p>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="row d-flex justify-content-center">
|
||||
<div class="col-md-3">
|
||||
|
||||
|
||||
|
||||
<div class="row row-cols-3 row-cols-md-3 row-cols-md-3 g-3">
|
||||
<div class="col">
|
||||
<a data-fslightbox="gallery" href="/assets/partners/sponsor_001.png">
|
||||
|
||||
<div class="img-responsive img-responsive-1x1 rounded" style="background-image: url(/assets/partners/sponsor_001.png)"></div>
|
||||
</a>
|
||||
</div>
|
||||
<div class="col">
|
||||
<a data-fslightbox="gallery" href="/assets/partners/sponsor_002.png">
|
||||
|
||||
<div class="img-responsive img-responsive-1x1 rounded" style="background-image: url(/assets/partners/sponsor_002.png)"></div>
|
||||
</a>
|
||||
</div>
|
||||
<div class="col">
|
||||
<a data-fslightbox="gallery" href="/assets/partners/sponsor_003.png">
|
||||
|
||||
<div class="img-responsive img-responsive-1x1 rounded" style="background-image: url(/assets/partners/sponsor_003.jpg)"></div>
|
||||
</a>
|
||||
</div>
|
||||
<div class="col">
|
||||
<a data-fslightbox="gallery" href="/assets/partners/sponsor_004.png">
|
||||
|
||||
<div class="img-responsive img-responsive-1x1 rounded" style="background-image: url(/assets/partners/sponsor_004.jpg)"></div>
|
||||
</a>
|
||||
</div>
|
||||
<div class="col">
|
||||
<a data-fslightbox="gallery" href="/assets/partners/sponsor_005.png">
|
||||
|
||||
<div class="img-responsive img-responsive-1x1 rounded" style="background-image: url(/assets/partners/sponsor_005.jpg)"></div>
|
||||
</a>
|
||||
</div>
|
||||
<div class="col">
|
||||
<a data-fslightbox="gallery" href="/assets/partners/sponsor_006.png">
|
||||
|
||||
<div class="img-responsive img-responsive-3x1 rounded" style="background-image: url(/assets/partners/sponsor_006.png)"></div>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<style>
|
||||
#spacer {
|
||||
width: 100%;
|
||||
height:600px;
|
||||
}
|
||||
.events-header-element {
|
||||
width: 100%;
|
||||
height: 50px;
|
||||
/* background-color: #393e46; */
|
||||
}
|
||||
.events-header-element2{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin-top: 45px;
|
||||
}
|
||||
.events-header-element2-h4 {
|
||||
|
||||
}
|
||||
.text56{
|
||||
color: #00adb5;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
.hero {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
/* background: linear-gradient(45deg, #83B8D7, #BAA6FD); */
|
||||
display: grid;
|
||||
}
|
||||
|
||||
#calendar {
|
||||
width: 100%;
|
||||
/* margin: 40px auto; */
|
||||
}
|
||||
|
||||
|
||||
.text3 {
|
||||
color: #00B052;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</style>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="sponsor-container mb-5">
|
||||
<div class="sponsor-logo">
|
||||
<img src="/assets/partners/sponsor_001.png" alt="" srcset="">
|
||||
</div>
|
||||
<div class="sponsor-logo">
|
||||
<img src="/assets/partners/sponsor_006.png" alt="" srcset="">
|
||||
</div>
|
||||
<div class="sponsor-logo">
|
||||
<img src="/assets/partners/sick_sensor_500x200.png" alt="" srcset="">
|
||||
</div>
|
||||
<div class="sponsor-logo">
|
||||
<img src="/assets/partners/sponsor_002.png" alt="" srcset="">
|
||||
</div>
|
||||
<div class="sponsor-logo">
|
||||
<img src="/assets/partners/sponsor_003.jpg" alt="" srcset="">
|
||||
</div>
|
||||
<div class="sponsor-logo">
|
||||
<img src="/assets/partners/sponsor_004.jpg" alt="" srcset="">
|
||||
</div>
|
||||
<div class="sponsor-logo">
|
||||
<img src="/assets/partners/sponsor_005.jpg" alt="" srcset="">
|
||||
</div>
|
||||
<div class="sponsor-logo">
|
||||
<img src="/assets/partners/sponsor_004.jpg" alt="" srcset="">
|
||||
</div>
|
||||
<!-- <div class="sponsor-logo">
|
||||
<img src="/assets/partners/khou11.jpg" alt="" srcset="">
|
||||
</div> -->
|
||||
<!-- <div class="sponsor-logo">
|
||||
<img src="/assets/partners/kendra_scott.png" alt="" srcset="">
|
||||
</div> -->
|
||||
<div class="sponsor-logo">
|
||||
<img src="/assets/partners/jblack_logo.png" alt="" srcset="">
|
||||
</div>
|
||||
<div class="sponsor-logo">
|
||||
<img src="/assets/partners/Outlook-aubybrlz.png" alt="" srcset="">
|
||||
</div>
|
||||
<div class="sponsor-logo">
|
||||
<img src="/assets/partners/Walmart_word_logo.png" alt="" srcset="">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- Start of footer -->
|
||||
<footer class="footer_body">
|
||||
<div class="footer_row primary">
|
||||
|
||||
<div class="column-footer-3">
|
||||
<div class="row d-flex justify-content-center">
|
||||
<div class="col-12 d-flex justify-content-center">
|
||||
<img class="footer_logo_img" src="../../../assets/logos/Stacked-Bug/White/c2c_stckd-bg_wht_RGB.png" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="footer_column subscribe">
|
||||
<h3 class="footer_h3 footer-text-1">Newsletter</h3>
|
||||
<div>
|
||||
<form>
|
||||
<input id="footer-sub-input" class="subscribe-email-input" type="email" placeholder="Enter email" />
|
||||
<a href="#" id="start_new_subscriber_signup" class="btn footer-btn" data-bs-target="#modal_target_new_subscriber">Subscribe</a>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="footer_column footer_links">
|
||||
<h3 class="footer_h3 footer_h3_2"></h3>
|
||||
<ul class="footer_ul mb-5">
|
||||
<li class="footer_li">
|
||||
<img class="mobile-seal-img-footer" width="100px" height="75px" style="" src="/assets/other/seal.png" alt="">
|
||||
</li>
|
||||
<li class="footer_li">
|
||||
<a href="#" id="footer-apply-link" class="footer-text-1 i-want-to-apply-footer">I want to Apply</a>
|
||||
</li>
|
||||
<li class="footer_li">
|
||||
<a href="#" id="footer-volunteer-link" class="footer-text-1 volunteer-opportunities-footer">Volunteer Opportunities</a>
|
||||
</li class="footer_li">
|
||||
<li class="footer_li">
|
||||
<a href="terms_of_service.html" id="footer-terms-link" class="footer-text-1">Terms Of Service</a>
|
||||
</li class="footer_li">
|
||||
<li class="footer_li">
|
||||
<a href="privacy-policy.html" id="footer-policy-link" class="footer-text-1">Privacy Policy</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="footer_column footer_about">
|
||||
<h3 class="footer_h3 footer-text-1">Cradle2Career</h3>
|
||||
<p class="footer_address footer-text-1">24301 Brazos Town Crossing #500, </p>
|
||||
<p class="footer_address footer-text-1">PMB #318</p>
|
||||
<p class="footer_address footer-text-1">Rosenberg, TX 77471</p>
|
||||
<p class="footer_address footer-text-1">Phone Number: 832-987-2076</p>
|
||||
<div class="social">
|
||||
<i class="fa-brands fa-facebook-square facebook-click"></i>
|
||||
<i class="fa-brands fa-instagram-square instagram-click"></i>
|
||||
<i class="fa-brands fa-twitter-square twitter-click"></i>
|
||||
<!-- <i class="fa-brands fa-youtube-square"></i>
|
||||
<i class="fa-brands fa-whatsapp-square"></i> -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="footer_row copyright">
|
||||
<!--
|
||||
<div class="footer-menu">
|
||||
|
||||
<a href="">Home</a>
|
||||
<a href="">About</a>
|
||||
<a href="">Contact</a>
|
||||
<a href="">Blog</a>
|
||||
<a href="">Social</a>
|
||||
|
||||
</div>
|
||||
-->
|
||||
<p style="text-align: center;">Copyright © Cradle2Career is a 501(c)(3) non-profit organization. Our Federal Tax ID number is 83-3875479</p>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
<script>
|
||||
var mypage = "events";
|
||||
</script>
|
||||
<script data-main="/core/js/main" src="/portal/admin/core/api/js/libs/require.js"></script>
|
||||
<body>
|
||||
</html>
|
||||
3017
portal/admin/playground/client/subscribers/default_schema.js
Normal file
3017
portal/admin/playground/client/subscribers/default_schema.js
Normal file
File diff suppressed because it is too large
Load Diff
276
portal/admin/playground/client/subscribers/index.php
Normal file
276
portal/admin/playground/client/subscribers/index.php
Normal file
@@ -0,0 +1,276 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
||||
<title>AFS Playground</title>
|
||||
|
||||
|
||||
<link rel="icon" type="image/x-icon" href="/assets/favicon.ico">
|
||||
<!-- <link rel="stylesheet" href="https://unpkg.com/boxicons@2.0.7/css/boxicons.min.css"> -->
|
||||
<!-- <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css"> -->
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/7.0.1/css/all.min.css" integrity="sha512-2SwdPD6INVrV/lHTZbO2nodKhrnDdJK9/kg2XD1r9uGqPo1cUbujc+IYdlYdEErWNu69gVcYgdxlmVmzTWnetw==" crossorigin="anonymous" referrerpolicy="no-referrer" />
|
||||
<!-- <link rel="stylesheet" href="/core/styles/bootstrap-5.3.8-dist/css/bootstrap.min.css"> -->
|
||||
<!-- <link rel="stylesheet" href="/portal/admin/core/api/styles/tabler/tabler.min.css" /> -->
|
||||
|
||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.8/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-sRIl4kxILFvY47J16cr9ZwB07vP4J8+LH7qKQnuqkuIAvNWLzeN8tE5YBujZqJLB" crossorigin="anonymous">
|
||||
<link rel="stylesheet" href="./styles.css">
|
||||
|
||||
<script src="https://code.jquery.com/jquery-3.6.3.min.js" integrity="sha256-pvPw+upLPUjgMXY0G+8O0xUf+/Im1MZjXxxgOcBQBXU=" crossorigin="anonymous"></script>
|
||||
<script src="/portal/admin/core/api/js/appfactory/afsspinner.js"></script>
|
||||
<script src="/portal/admin/core/api/js/libs/analytics_0.8.14.min.js"></script>
|
||||
<script src="/portal/admin/core/api/js/libs/sameSize.js"></script>
|
||||
|
||||
|
||||
<link rel="stylesheet" href="/portal/admin/core/libs/surveyjs/defaultV2.min.css">
|
||||
<script src="https://unpkg.com/survey-core/survey.core.min.js" type="text/javascript"></script>
|
||||
<script src="https://unpkg.com/survey-jquery/survey.jquery.min.js" type="text/javascript"></script>
|
||||
<script src="https://unpkg.com/survey-core/themes/layered-dark-panelless.min.js" type="text/javascript"></script>
|
||||
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.29.4/moment.min.js"></script>
|
||||
|
||||
<script src="/portal/admin/core/api/js/libs/fetch-jsonp.js"></script>
|
||||
<script src="/portal/admin/core/api/js/appfactory/appfactory3.js"></script>
|
||||
<script src="/portal/admin/core/api/js/appfactory/afsform.js"></script>
|
||||
<script src="/portal/admin/core/api/js/appfactory/afsextras.js"></script>
|
||||
<script src="/portal/admin/core/api/js/appfactory/afssubscriber.js"></script>
|
||||
<script src="./default_schema.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/js/bootstrap.bundle.min.js" integrity="sha384-kenU1KFdBIe4zVF0s0G1M5b4hcpxyD9F7jL+jjXkk+Q2h455rYXK/7HAuoJl+0I4" crossorigin="anonymous"></script>
|
||||
|
||||
|
||||
|
||||
|
||||
<script src="https://api.appfactory.studio/sdk/js/afssdk.js"></script>
|
||||
<script src="https://api.appfactory.studio/sdk/js/afssdk-internal.js"></script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<!-- Navigation -->
|
||||
<section class="navigation">
|
||||
<div class="nav-container">
|
||||
<div class="brand">
|
||||
<img id="brand_image_logo_btn" class="brand_logo" src="" alt="" width="145">
|
||||
</div>
|
||||
<div class="mobile-donate-btn">
|
||||
<button class="nav-donate-btn button-34" data-bs-toggle="modal" data-bs-target="#modal_donation_dialog" role="button">
|
||||
<i style="font-size: 1.75rem;" class="fas fa-hand-holding-heart fa-1x"></i>
|
||||
</button>
|
||||
<div class="clear-right"></div>
|
||||
</div>
|
||||
<nav class="mymainnav">
|
||||
<div class="nav-mobile"><a id="nav-toggle" class="nav-toggle" href="#"><span></span></a></div>
|
||||
<ul class="nav-list" style="">
|
||||
|
||||
<li>
|
||||
<a href="#!" class="main_nav_link mnl_about">About Us</span></a>
|
||||
<ul class="nav-dropdown">
|
||||
<li><a class="mainnav_list_item main-nav-anchor" href="/pages/whatwedo">What We Do</a></li>
|
||||
<li><a class="mainnav_list_item" href="/pages/ourstory">Our Story</a></li>
|
||||
<li><a class="mainnav_list_item" href="/pages/meettheboard">Meet The Board</a></li>
|
||||
<li><a class="mainnav_list_item" href="/pages/financials">Financials</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#!" class="main_nav_link mnl_young">I'm a Young Parent</a>
|
||||
<ul class="nav-dropdown">
|
||||
<li><a class="mainnav_list_item" href="/pages/apply">I Need Support</a></li>
|
||||
<li><a class="mainnav_list_item" href="/pages/scholarships">Scholarships</a></li>
|
||||
<li><a class="mainnav_list_item" href="/pages/resources">Resources</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="#!" class="main_nav_link mnl_you">Give Forward</a>
|
||||
<ul class="nav-dropdown">
|
||||
<li><a class="mainnav_list_item" href="/pages/waystodonate">Donate</a></li>
|
||||
<li><a class="mainnav_list_item" href="/pages/volunteer">Volunteer</a></li>
|
||||
<li><a class="mainnav_list_item" href="/pages/sponsorships">Sponsorships</a></li>
|
||||
<li><a class="mainnav_list_item" href="/pages/partnerships">Partnerships </a></li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="/pages/initiatives" id="initiatives_header_link" class="main_nav_link mnl_ini">Initiatives</a>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
<a href="#!" class="main_nav_link mnl_news">News & Events</a>
|
||||
<ul class="nav-dropdown">
|
||||
<li><a class="mainnav_list_item" href="/pages/events">Events</a></li>
|
||||
<li><a class="mainnav_list_item" href="/pages/gallery">Gallery</a></li>
|
||||
<li><a class="mainnav_list_item" href="/pages/news">News</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="#!" class="main_nav_link mnl_contact">Contact</a>
|
||||
<ul class="nav-dropdown">
|
||||
<li><a class="mainnav_list_item" href="/pages/media_inquires">Media Inquiries</a></li>
|
||||
<li><a class="mainnav_list_item" href="/pages/need_a_speaker">Need A Speaker</a></li>
|
||||
<li><a class="mainnav_list_item" href="/pages/contact">Contact Us </a></li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
<div>
|
||||
<button style="background-color: #00B052;color: white;" class="nav-donate-btn button-33" id="main_modal_donation" role="button">
|
||||
<img src=""
|
||||
width="30"
|
||||
/>Donate</button>
|
||||
</div>
|
||||
</nav>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="container-fluid">
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- form container -->
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-12 col-lg-12 d-flex justify-content-center">
|
||||
<h2 class="quirk-font" style="color: var(--style-blue);">BECOME A BOARD MEMBER</h2>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row d-flex justify-content-center">
|
||||
<div class="col-12 col-lg-8">
|
||||
<div id="surveyContainer" class="border border-success"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- Start of footer -->
|
||||
<footer class="footer_body">
|
||||
<div class="footer_row primary">
|
||||
|
||||
<div class="column-footer-3">
|
||||
<div class="row d-flex justify-content-center">
|
||||
<div class="col-12 d-flex justify-content-center">
|
||||
<img class="footer_logo_img" src="" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="footer_column subscribe">
|
||||
<h3 class="footer_h3 footer-text-1">Newsletter</h3>
|
||||
<div>
|
||||
<form>
|
||||
<input id="footer-sub-input" class="subscribe-email-input" type="email" placeholder="Enter email" />
|
||||
<a href="#" id="start_new_subscriber_signup" class="btn footer-btn" data-bs-target="#modal_target_new_subscriber">Subscribe</a>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="footer_column footer_links">
|
||||
<h3 class="footer_h3 footer_h3_2"></h3>
|
||||
<ul class="footer_ul mb-5">
|
||||
<li class="footer_li">
|
||||
<img class="" width="100px" height="75px" style="" src="" alt="">
|
||||
</li>
|
||||
<li class="footer_li">
|
||||
<a href="#" id="footer-apply-link" class="footer-text-1 i-want-to-apply-footer">I want to Apply</a>
|
||||
</li>
|
||||
<li class="footer_li">
|
||||
<a href="#" id="footer-volunteer-link" class="footer-text-1 volunteer-opportunities-footer">Volunteer Opportunities</a>
|
||||
</li class="footer_li">
|
||||
<li class="footer_li">
|
||||
<a href="terms_of_service.html" id="footer-terms-link" class="footer-text-1">Terms Of Service</a>
|
||||
</li class="footer_li">
|
||||
<li class="footer_li">
|
||||
<a href="privacy-policy.html" id="footer-policy-link" class="footer-text-1">Privacy Policy</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="footer_column footer_about">
|
||||
<h3 class="footer_h3 footer-text-1">Cradle2Career</h3>
|
||||
<p class="footer_address footer-text-1">24301 Brazos Town Crossing #500, </p>
|
||||
<p class="footer_address footer-text-1">PMB #318</p>
|
||||
<p class="footer_address footer-text-1">Rosenberg, TX 77471</p>
|
||||
<p class="footer_address footer-text-1">Phone Number: 832-987-2076</p>
|
||||
<div class="social">
|
||||
<i class="fa-brands fa-facebook-square facebook-click"></i>
|
||||
<i class="fa-brands fa-instagram-square instagram-click"></i>
|
||||
<i class="fa-brands fa-twitter-square twitter-click"></i>
|
||||
<!-- <i class="fa-brands fa-youtube-square"></i>
|
||||
<i class="fa-brands fa-whatsapp-square"></i> -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="footer_row copyright">
|
||||
<!--
|
||||
<div class="footer-menu">
|
||||
|
||||
<a href="">Home</a>
|
||||
<a href="">About</a>
|
||||
<a href="">Contact</a>
|
||||
<a href="">Blog</a>
|
||||
<a href="">Social</a>
|
||||
|
||||
</div>
|
||||
-->
|
||||
<p style="text-align: center;">Copyright © Cradle2Career is a 501(c)(3) non-profit organization. Our Federal Tax ID number is 83-3875479</p>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
<script>
|
||||
var mypage = "events";
|
||||
</script>
|
||||
<script src="./script.js"></script>
|
||||
<body>
|
||||
</html>
|
||||
149
portal/admin/playground/client/subscribers/index_include.php
Normal file
149
portal/admin/playground/client/subscribers/index_include.php
Normal file
@@ -0,0 +1,149 @@
|
||||
|
||||
|
||||
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-12 col-lg-12 d-flex justify-content-center">
|
||||
<h2 class="quirk-font" style="color: var(--style-blue);">BECOME A BOARD MEMBER</h2>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row d-flex justify-content-center">
|
||||
<div class="col-12 col-lg-8">
|
||||
<div id="surveyContainer" class="border border-success"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="spacer"></div>
|
||||
|
||||
|
||||
<script>
|
||||
// setTimeout(function(){
|
||||
// $('.img-auto-sizer').fitImage({
|
||||
// resizeDelayTime: '1',
|
||||
// horizontalAlign: 'center'
|
||||
// });
|
||||
// },1000);
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<style>
|
||||
|
||||
|
||||
|
||||
</style>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- Start of footer -->
|
||||
<footer class="footer_body">
|
||||
<div class="footer_row primary">
|
||||
|
||||
<div class="column-footer-3">
|
||||
<div class="row d-flex justify-content-center">
|
||||
<div class="col-12 d-flex justify-content-center">
|
||||
<img class="footer_logo_img" src="../../../assets/logos/Stacked-Bug/White/c2c_stckd-bg_wht_RGB.png" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="footer_column subscribe">
|
||||
<h3 class="footer_h3 footer-text-1">Newsletter</h3>
|
||||
<div>
|
||||
<form>
|
||||
<input id="footer-sub-input" class="subscribe-email-input" type="email" placeholder="Enter email" />
|
||||
<a href="#" id="start_new_subscriber_signup" class="btn footer-btn" data-bs-target="#modal_target_new_subscriber">Subscribe</a>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="footer_column footer_links">
|
||||
<h3 class="footer_h3 footer_h3_2"></h3>
|
||||
<ul class="footer_ul mb-5">
|
||||
<li class="footer_li">
|
||||
<img class="mobile-seal-img-footer" width="100px" height="75px" style="" src="/assets/other/seal.png" alt="">
|
||||
</li>
|
||||
<li class="footer_li">
|
||||
<a href="#" id="footer-apply-link" class="footer-text-1 i-want-to-apply-footer">I want to Apply</a>
|
||||
</li>
|
||||
<li class="footer_li">
|
||||
<a href="#" id="footer-volunteer-link" class="footer-text-1 volunteer-opportunities-footer">Volunteer Opportunities</a>
|
||||
</li class="footer_li">
|
||||
<li class="footer_li">
|
||||
<a href="terms_of_service.html" id="footer-terms-link" class="footer-text-1">Terms Of Service</a>
|
||||
</li class="footer_li">
|
||||
<li class="footer_li">
|
||||
<a href="privacy-policy.html" id="footer-policy-link" class="footer-text-1">Privacy Policy</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="footer_column footer_about">
|
||||
<h3 class="footer_h3 footer-text-1">Cradle2Career</h3>
|
||||
<p class="footer_address footer-text-1">24301 Brazos Town Crossing #500, </p>
|
||||
<p class="footer_address footer-text-1">PMB #318</p>
|
||||
<p class="footer_address footer-text-1">Rosenberg, TX 77471</p>
|
||||
<p class="footer_address footer-text-1">Phone Number: 832-987-2076</p>
|
||||
<div class="social">
|
||||
<i class="fa-brands fa-facebook-square facebook-click"></i>
|
||||
<i class="fa-brands fa-instagram-square instagram-click"></i>
|
||||
<i class="fa-brands fa-twitter-square twitter-click"></i>
|
||||
<!-- <i class="fa-brands fa-youtube-square"></i>
|
||||
<i class="fa-brands fa-whatsapp-square"></i> -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="footer_row copyright">
|
||||
<!--
|
||||
<div class="footer-menu">
|
||||
|
||||
<a href="">Home</a>
|
||||
<a href="">About</a>
|
||||
<a href="">Contact</a>
|
||||
<a href="">Blog</a>
|
||||
<a href="">Social</a>
|
||||
|
||||
</div>
|
||||
-->
|
||||
<p style="text-align: center;">Copyright © Cradle2Career is a 501(c)(3) non-profit organization. Our Federal Tax ID number is 83-3875479</p>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
788
portal/admin/playground/client/subscribers/script.js
Normal file
788
portal/admin/playground/client/subscribers/script.js
Normal file
@@ -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: `
|
||||
<div class="email-container">
|
||||
<div class="email-body">
|
||||
<div class="banner">
|
||||
<h2>Subscription Successful!</h2>
|
||||
<!-- <h1>We Feel <span>the Love</span></h1> -->
|
||||
</div>
|
||||
<div class="email-content">
|
||||
<p>Hi there!</p>
|
||||
<p>Thank you for subscribing. We're so excited to share the latest news and updates with you. If you'd like to learn more, follow us on social media!</p>
|
||||
<a class="facebook-click" href="#"><i class="fab fa-facebook-square"></i> Check us out on Facebook</a><br>
|
||||
<a class="twitter-click" href="#"><i class="fab fa-twitter-square"></i> Follow Us on Twitter</a>
|
||||
<hr>
|
||||
<p>Sincerely,</p>
|
||||
<p class="sig">Us at Cradle 2 Career</p>
|
||||
<!-- <p><em>Melissa A.</em>
|
||||
<br>Customer Success Manager
|
||||
</p> -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
`,
|
||||
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: `
|
||||
<h4 style="margin-bottom:75px;">Thank for your interest, you should be receiving a follow up email.</h4>
|
||||
`,
|
||||
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(`<input class="modal-subscribe-input modal-subscribe-custom" type="checkbox" id="modal-subscribe-check1" checked>`);
|
||||
// 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 `
|
||||
|
||||
<div class="modal modal-blur fade" id="modal_target_new_subscriber" tabindex="-1" style="display: none; padding-left: 0px;" aria-modal="true" role="dialog">
|
||||
<div class="modal-dialog modal-lg modal-dialog-centered" role="document">
|
||||
<div style="min-height:400px;" class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 id="footer_modal_title" class="modal-title">Subscribe to Cradle2Career <span id="title_modal_new_subscriber_section"></span></h5>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
</div>
|
||||
<div id="footer_modal_body" class="modal-body">
|
||||
|
||||
<div class="container-fluid" style="">
|
||||
<div class="row">
|
||||
<div class="row" id="row_one"></div>
|
||||
<div class="row" id="row_two"></div>
|
||||
</div>
|
||||
</div><!-- end container-fluid -->
|
||||
|
||||
|
||||
</div><!-- end modal-body -->
|
||||
|
||||
<div id="footer_modal_footer" class="modal-footer">
|
||||
<button type="button" class="btn me-auto" data-bs-dismiss="modal">Cancel</button>
|
||||
<button id="submit_new_subscriber" type="button" class="btn btn-primary mycolorbtn">Submit</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
`;
|
||||
}
|
||||
function func_subscribeModal3(app){
|
||||
return `
|
||||
|
||||
<div class="modal modal-blur fade" id="modal_target_subscriber_thank_you" tabindex="-1" style="display: none; padding-left: 0px;" aria-modal="true" role="dialog">
|
||||
<div class="modal-dialog modal-lg modal-dialog-centered" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<!-- <h5 class="modal-title">Modal title</h5> -->
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
|
||||
<div class="email-container">
|
||||
<div class="email-body">
|
||||
<div class="banner">
|
||||
<h2>Subscription Successful!</h2>
|
||||
<!-- <h1>We Feel <span>the Love</span></h1> -->
|
||||
</div>
|
||||
<div class="email-content">
|
||||
<p>Hi there!</p>
|
||||
<p>Thank you for subscribing. We're so excited to share the latest news and updates with you. If you'd like to learn more, follow us on social media!</p>
|
||||
<a class="facebook-click" href="#"><i class="fab fa-facebook-square"></i> Check us out on Facebook</a><br>
|
||||
<a class="twitter-click" href="#"><i class="fab fa-twitter-square"></i> Follow Us on Twitter</a>
|
||||
<hr>
|
||||
<p>Sincerely,</p>
|
||||
<p class="sig">Us at Cradle2Career</p>
|
||||
<!-- <p><em>Melissa A.</em>
|
||||
<br>Customer Success Manager
|
||||
</p> -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn me-auto" data-bs-dismiss="modal">Close</button>
|
||||
<!-- <button type="button" class="btn btn-primary" data-bs-dismiss="modal">Save changes</button> -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
`;
|
||||
}
|
||||
function func_subscriberInput(app){
|
||||
return `
|
||||
<div class="col-12 col-lg-4">
|
||||
<div class="row" style="height: 115px;width: 100%;">
|
||||
<div class="col-2">
|
||||
<!-- checkbox -->
|
||||
<input id="\${input_id}" data-reference_num="\${reference_num}" class="\${input_classes}" type="checkbox" checked/>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-10">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<!-- header -->
|
||||
<h3 class="\${title_classes}">\${title}</h3>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<!-- description -->
|
||||
<p class="\${desc_classes}">\${desc}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
`;
|
||||
}
|
||||
|
||||
|
||||
// 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`);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
})();
|
||||
2026
portal/admin/playground/client/subscribers/styles.css
Normal file
2026
portal/admin/playground/client/subscribers/styles.css
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user