first commit
This commit is contained in:
@@ -0,0 +1,237 @@
|
||||
<form method="POST" action="?" id="frm_update_card">
|
||||
<?php if (isset($card_id) && $card_id > 0) { ?>
|
||||
<input type="hidden" name="id" value="<?= $card_id ?>" />
|
||||
<?php } ?>
|
||||
<input type="hidden" name="card_logic" value="" />
|
||||
<div class="row">
|
||||
<div class="col col-lg-4">
|
||||
|
||||
<div class="form-group">
|
||||
<label for="categoryLabel">Template</label>
|
||||
<?= $card_template ?>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="categoryLabel">Category <span class="required">*</span></label>
|
||||
<?= $card_category ?>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="categoryLabel">Category Type</label>
|
||||
<?= $card_type ?>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="categoryLabel">Card Time</label>
|
||||
<?= $card_time ?>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="cansaveLabel">Can user save ?</label>
|
||||
<?= $card_can_save ?>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="cardPictureslabel">Picture</label>
|
||||
<?= $card_pictures ?>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="cardName">Card Id <span class="required">*</span></label>
|
||||
<input type="text" class="form-control" id="cardName" name="card_name" maxlength="100" placeholder="Card Unique" value="<?= $card_name ?>" />
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="showTitleInput">Show Short Title</label>
|
||||
<?= $use_short_title_combo ?>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="cardShortTitle">Card Short Title</label>
|
||||
<input type="text" class="form-control" id="cardShortTitle" name="short_title" maxlength="35" placeholder="Card Short Title" value="<?= $short_title ?>" />
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="showTitleInput">Show Title</label>
|
||||
<?= $card_titleshow ?>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="showDynamicKeyInput">Dynamic Card key</label>
|
||||
<h3> <?= isset($dynamic_key)?$dynamic_key:'' ?></h3>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="activity_screen">Activity Screen</label>
|
||||
<?= $activity_screen??'' ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col col-lg-4">
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<label for="cardTitle">Card Title <span class="required">*</span></label>
|
||||
<input type="text" class="form-control" id="cardTitle" name="card_title" maxlength="100" placeholder="Card Title" value="<?= $card_title ?>" />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="categoryLabel">Can Expire</label>
|
||||
<?= $card_canexpire ?>
|
||||
<br>
|
||||
<label for="categoryLabel">Expiration date</label>
|
||||
<input type="text" class="form-control" name="card_expiration" value="<?= $card_expiration ?>" />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="cansaveLabel">Notification</label>
|
||||
<?= $card_notify ?>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="description" id="description_label">Description <strong class="required">*</strong> <span>[250]</span></label>
|
||||
<textarea class="form-control" name="description" id="description" rows="3" maxlength="250" placeholder="Description"><?= $description ?></textarea>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="long_description" id="long_description_label">Long Description <span>[400]</span></label>
|
||||
<textarea class="form-control" name="long_description" id="long_description" rows="6" maxlength="400" placeholder="Long Description"><?= $long_description ?></textarea>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="button1">1st Button <span class="required">*</span></label>
|
||||
<input type="text" class="form-control" name="button1" id="button1" maxlength="35" placeholder="Button 1" value="<?= $button1 ?>" />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="button1_text">1st Button Text <span class="required">*</span></label>
|
||||
<input type="text" class="form-control" name="button1_text" id="button1_text" maxlength="35" placeholder="Button 1 Text" value="<?= $button1_text ?>" />
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="behaveLabel">Blog Article Id <span class="required">*</span></label>
|
||||
<?= $card_blog_id ?>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="show_area">Show Area</label>
|
||||
<?= $show_area??'' ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col col-lg-4">
|
||||
|
||||
|
||||
|
||||
<div style="background-color: lightsteelblue; padding 3px;">
|
||||
|
||||
<div class="form-group">
|
||||
<label for="cansaveLabel">Card Target</label>
|
||||
<?= $target_key ?>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="cansaveLabel">Target Text[Used in pop up messages]</label>
|
||||
<textarea class="form-control" name="target_text" id="targetTextCardlab" rows="3" maxlength="250" placeholder="Target Text"><?= $target_text ?></textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="cansaveLabel">Status</label>
|
||||
<?= $card_status ?>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="behaveLabel">Behavior <span class="required">*</span></label>
|
||||
<?= $card_behavior ?>
|
||||
</div>
|
||||
<?php include("card_part_location.php"); ?>
|
||||
<?php include("card_part_points.php"); ?>
|
||||
<div class="form-group">
|
||||
<label for="exampleFormControlTextarea1">Card List Order</label>
|
||||
<input type="text" class="form-control" name="card_order" id="IDcard_order" maxlength="3" placeholder="List order 1-100" value="<?= $card_order ?>" />
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="exampleFormControlTextarea1">Card Background Color</label>
|
||||
<input type="text" class="form-control" name="background_color" id="IDbackground_color" maxlength="6" placeholder="Color Code no #" value="<?= $background_color ?>" />
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="expiration">Expiration</label>
|
||||
<?= $expiration??'' ?>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<button type="submit" name="go" class="btn btn-info btn-block btn-sm"><?= $form_button ?></button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="card" style="width: 100%; background-color:honeydew;">
|
||||
<div class="card-body">
|
||||
<?php if (isset($card_id) && $card_id > 0) { ?>
|
||||
|
||||
<button type="button" class="btn btn-danger btn-block btn-sm" data-toggle="modal" data-target="#exampleModalScrollable">More Setting</button>
|
||||
|
||||
<p class="card-text">We are ready to go on here.</p>
|
||||
|
||||
<?php } ?>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
|
||||
<script>
|
||||
window.TEMPLATE_ACTIVE_TIP = <?=$TEMPLATE_ACTIVE_TIP??-1?>;
|
||||
$(function () {
|
||||
const $frm_update_card = $("#frm_update_card");
|
||||
$frm_update_card.on('submit', function() {
|
||||
// check validation
|
||||
const template_selected_id = $("select[name=card_template]").val();
|
||||
const background_color = $("input[name=background_color]").val().trim();
|
||||
const picture_select_value = $("select[name=card_pictures]").val().trim();
|
||||
if(window.TEMPLATE_ACTIVE_TIP == template_selected_id){
|
||||
if(background_color.length === 0){
|
||||
alert('Invalid input - select Card Background Color for Active Tip template');
|
||||
return false;
|
||||
}
|
||||
}else if(background_color.length === 0 && picture_select_value.length === 0){
|
||||
alert('Invalid input - Please Select Card Background Picture');
|
||||
return false;
|
||||
}
|
||||
// validate for "Blog Card" category require title
|
||||
if($("#card_category").val() === "BLOGCARD" && $("#card_titleshow").val() != 1){
|
||||
alert('Invalid input - Please select Show Title for Blog Card!');
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
});
|
||||
$('input[name="card_expiration"]').daterangepicker({
|
||||
singleDatePicker: true,
|
||||
showDropdowns: true,
|
||||
minYear: <?= date("Y") ?>,
|
||||
maxYear: <?= date("Y") + 10 ?>, /*parseInt(moment().format('YYYY'),10),*/
|
||||
locale: {
|
||||
format: 'YYYY-MM-DD'
|
||||
}
|
||||
}, function (start, end, label) {
|
||||
var years = moment().diff(start, 'years');
|
||||
});
|
||||
|
||||
$("#long_description").keyup(function (){
|
||||
let cur_length = $(this).val().length;
|
||||
let max_length = $(this).attr("maxlength");
|
||||
$("#long_description_label").find("span").html("["+cur_length+"/"+max_length+"]");
|
||||
}).trigger('keyup');
|
||||
$("#description").keyup(function (){
|
||||
let cur_length = $(this).val().length;
|
||||
let max_length = $(this).attr("maxlength");
|
||||
$("#description_label").find("span").html("["+cur_length+"/"+max_length+"]");
|
||||
}).trigger('keyup');
|
||||
|
||||
//reset errors
|
||||
$frm_update_card.find('input').on('change', function(){
|
||||
$(this).removeClass('error');
|
||||
});
|
||||
$frm_update_card.find('select').on('change', function(){
|
||||
$(this).removeClass('error');
|
||||
});
|
||||
$frm_update_card.find('textarea').on('change', function(){
|
||||
$(this).removeClass('error');
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@@ -0,0 +1,9 @@
|
||||
<div class="form-group">
|
||||
<label for="card_country">Card Country</label>
|
||||
<?= $card_country ?>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="card_location">Card Location</label>
|
||||
<?=$card_location?>
|
||||
</div>
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
<div class="form-group">
|
||||
<label for="card_receipt">Card Reciept</label>
|
||||
<?= $card_reciept ?>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="categoryLabel">Card Points</label>
|
||||
<?=$card_points?>
|
||||
</div>
|
||||
|
||||
@@ -0,0 +1,173 @@
|
||||
<form method="POST" action="?">
|
||||
<?php if (isset($card_id) && $card_id>0) { ?>
|
||||
<input type="hidden" name="id" value="<?= $card_id ?>" />
|
||||
<input type="hidden" name="card_category" value="<?= $card_category_value ?>" />
|
||||
<input type="hidden" name="card_can_save" value="<?= $card_can_save_value?>" />
|
||||
<input type="hidden" name="long_description" value="<?= $long_description?>" />
|
||||
|
||||
|
||||
<?php } ?>
|
||||
|
||||
<div class="row">
|
||||
<div class="col col-lg-4">
|
||||
|
||||
<div class="form-group">
|
||||
<label for="categoryLabel">Template</label>
|
||||
<?= $card_template ?>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="categoryLabel">Category</label>
|
||||
<?= $card_category ?>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="categoryLabel">Category Type</label>
|
||||
<?= $card_type ?>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="cardName">Card Id</label>
|
||||
<input type="text" class="form-control" id="cardName" name="card_name" maxlength="100" placeholder="Card Unique" value="<?= $card_name ?>" />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="showTitleInput">Show Short Title</label>
|
||||
<?= $use_short_title_combo ?>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="cardShortTitle">Card Short Title</label>
|
||||
<input type="text" class="form-control" id="cardShortTitle" name="short_title" maxlength="35" placeholder="Card Short Title" value="<?= $short_title ?>" />
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="showTitleInput">Show Title</label>
|
||||
<?= $card_titleshow ?>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<label for="cardTitle">Card Title</label>
|
||||
<input type="text" class="form-control" id="cardTitle" name="card_title" maxlength="100" placeholder="Card Title" value="<?= $card_title ?>" />
|
||||
</div>
|
||||
|
||||
|
||||
<div clas s="form-group">
|
||||
<label for="categoryLabel">Card Time</label>
|
||||
<?= $card_time ?>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="cansaveLabel">Multiple Answer ?</label>
|
||||
<?= $multiple_answer ?>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<label for="surveyLogic">Survey Logic</label>
|
||||
<input type="text" class="form-control" id="surveyLogic" name="card_logic" maxlength="10" placeholder="Survey Logic" value="<?= $card_logic ?>" />
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="behaveLabel">Blog Article Id</label>
|
||||
<?= $card_blog_id ?>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="col col-lg-4">
|
||||
<div class="form-group">
|
||||
<label for="cardPictureslabel">Picture</label>
|
||||
<?= $card_pictures ?>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="exampleFormControlTextarea1">Card Background Color</label>
|
||||
<input type="text" class="form-control" name="background_color" id="IDbackground_color" maxlength="6" placeholder="Color Code no #" value="<?= $background_color ?>" />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="exampleFormControlTextarea1">1st Button </label>
|
||||
<input type="text" class="form-control" name="button1" id="exampleFormControlTextarea1" maxlength="35" placeholder="Button 1" value="<?= $button1 ?>" />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="exampleFormControlTextarea1">1st Button Text</label>
|
||||
<input type="text" class="form-control" name="button1_text" id="descriptionCardlab" maxlength="35" placeholder="Button 1 Text" value="<?= $button1_text ?>" />
|
||||
</div>
|
||||
|
||||
<?php include("card_part_location.php"); ?>
|
||||
<?php include("card_part_points.php"); ?>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="activity_screen">Activity Screen</label>
|
||||
<?= $activity_screen ?? '' ?>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="show_area">Show Area</label>
|
||||
<?= $show_area ?? '' ?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="col col-lg-4">
|
||||
|
||||
<div class="form-group">
|
||||
<label for="descriptionCardlab">Survey Answer Options [comma delimited]</label>
|
||||
<textarea class="form-control" name="description" id="descriptionCardlab" rows="5" maxlength="250" placeholder="Survey Options(s)"><?= $description ?></textarea>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="categoryLabel">Can Expire</label>
|
||||
<?= $card_canexpire ?>
|
||||
<br>
|
||||
<label for="categoryLabel">Expiration date</label>
|
||||
<input type="text" class="form-control" name="card_expiration" value="<?=$card_expiration?>" />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="cansaveLabel">Status</label>
|
||||
<?= $card_status ?>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="cansaveLabel">Notification</label>
|
||||
<?= $card_notify ?>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="behaveLabel">Behavior</label>
|
||||
<?= $card_behavior ?>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="exampleFormControlTextarea1">Card List Order</label>
|
||||
<input type="text" class="form-control" name="card_order" id="IDcard_order" maxlength="3" placeholder="List order 1-100" value="<?= $card_order ?>" />
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<button type="submit" name="go" class="btn btn-info btn-block btn-sm"><?= $form_button ?></button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</form>
|
||||
|
||||
|
||||
<?php /* http://www.daterangepicker.com/ */ ?>
|
||||
<script>
|
||||
$(function() {
|
||||
$('input[name="card_expiration"]').daterangepicker({
|
||||
singleDatePicker: true,
|
||||
showDropdowns: true,
|
||||
minYear: <?=date("Y")?>,
|
||||
maxYear: <?=date("Y")+10?>, /*parseInt(moment().format('YYYY'),10),*/
|
||||
locale: {
|
||||
format: 'YYYY-MM-DD'
|
||||
}
|
||||
}, function(start, end, label) {
|
||||
var years = moment().diff(start, 'years');
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@@ -0,0 +1,291 @@
|
||||
<link href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;600&display=swap" rel="stylesheet">
|
||||
<style>
|
||||
#wrapper {
|
||||
width:600px;
|
||||
margin:0 auto;
|
||||
border-radius:0 0 5px 5px;
|
||||
-moz-border-radius:0 0 5px 5px;
|
||||
-webkit-border-radius: 0 0 5px 5px;
|
||||
background:#fff;
|
||||
border:1px solid #ccc;
|
||||
padding:25px;
|
||||
border-top:none;
|
||||
box-shadow:0 0 5px #ccc;
|
||||
-moz-box-shadow:0 0 5px #ccc;
|
||||
-webkit-box-shadow:0 0 5px #ccc;
|
||||
text-align:left;
|
||||
}
|
||||
#lightbox {
|
||||
z-index: 3;
|
||||
position:fixed; /* keeps the lightbox window in the current viewport */
|
||||
top:0;
|
||||
left:0;
|
||||
width:100%;
|
||||
height:100%;
|
||||
background:url(/assets/images/overlay.png) repeat;
|
||||
text-align:center;
|
||||
}
|
||||
#lightbox p {
|
||||
text-align:right;
|
||||
color:#fff;
|
||||
margin-right:20px;
|
||||
font-size:12px;
|
||||
}
|
||||
#lightbox img {
|
||||
box-shadow:0 0 25px #111;
|
||||
-webkit-box-shadow:0 0 25px #111;
|
||||
-moz-box-shadow:0 0 25px #111;
|
||||
max-width:940px;
|
||||
}
|
||||
#lightbox_container {
|
||||
/* background:red; */
|
||||
position:fixed;
|
||||
top:45%;
|
||||
left:50%;
|
||||
/* bring your own prefixes */
|
||||
transform: translate(-50%, -50%);
|
||||
}
|
||||
|
||||
.card-bg {
|
||||
width: 600px;
|
||||
height: 600px;
|
||||
border-radius: 18px;
|
||||
background-size: cover;
|
||||
background-position: center;
|
||||
}
|
||||
|
||||
.card-bg-gradient-sub {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 18px;
|
||||
background: linear-gradient(159.4deg, rgba(0, 0, 0, 0.4) -3.74%, rgba(0, 0, 0, 0) 47.17%);
|
||||
}
|
||||
|
||||
.card-bg-gradient-main {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
padding: 40px;
|
||||
border-radius: 18px;
|
||||
background: linear-gradient(182.6deg, rgba(0, 0, 0, 0) 20.15%, rgba(0, 0, 0, 0.4) 97.96%);
|
||||
}
|
||||
|
||||
.card-header-wrapper {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
|
||||
.card-header-wrapper img {
|
||||
box-shadow: none !important;
|
||||
}
|
||||
|
||||
.nav-right-icon {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
}
|
||||
|
||||
.card-body-wrapper {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.card-body-wrapper img {
|
||||
box-shadow: none !important;
|
||||
}
|
||||
|
||||
.card-body-wrapper p {
|
||||
text-align: left !important;
|
||||
}
|
||||
|
||||
.card-body-wrapper .slogan {
|
||||
margin-bottom: 18px;
|
||||
font-family: 'Open Sans', sans-serif;
|
||||
font-style: normal;
|
||||
font-weight: 700;
|
||||
font-size: 35px !important;
|
||||
line-height: 110%;
|
||||
letter-spacing: 0.03em;
|
||||
color: #FFFFFF !important;
|
||||
}
|
||||
|
||||
.card-body-wrapper .description {
|
||||
margin-bottom: 0;
|
||||
font-family: 'Open Sans', sans-serif;
|
||||
font-style: normal;
|
||||
font-weight: normal;
|
||||
font-size: 25px !important;
|
||||
line-height: 34px;
|
||||
letter-spacing: 0.03em;
|
||||
color: #FFFFFF !important;
|
||||
}
|
||||
.card-body-wrapper .relative{
|
||||
position: relative;
|
||||
}
|
||||
/* for template: "upper title 600x600 text + image"*/
|
||||
.card-template-8 .card-body-wrapper{
|
||||
position: unset !important;
|
||||
}
|
||||
.card-template-8 .slogan{
|
||||
position: absolute;
|
||||
top: 30px;
|
||||
left: 30px;
|
||||
font-family: 'Open Sans', sans-serif;
|
||||
}
|
||||
.nav-right-icon-rocket{
|
||||
display: none;
|
||||
}
|
||||
/* active tip template */
|
||||
.card-template-7 .nav-right-icon-rocket{
|
||||
display: block;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
margin-top: -30px;
|
||||
right: -30px;
|
||||
}
|
||||
.card-template-7 .nav-right-icon{
|
||||
display: none;
|
||||
}
|
||||
.card-bg.card-template-7{
|
||||
height: auto;
|
||||
}
|
||||
.card-template-7 .card-header-wrapper{
|
||||
display: none;
|
||||
}
|
||||
/* Tall layout 600 x 750 = 9 */
|
||||
.card-template-wrap-9{
|
||||
width: 600px;
|
||||
height: auto;
|
||||
border-radius: 22px;
|
||||
background-color: white;
|
||||
}
|
||||
.card-template-wrap-9 .relative{
|
||||
display: none !important;
|
||||
}
|
||||
.card-template-wrap-9 .relative-bottom{
|
||||
position: absolute;
|
||||
padding: 10px 14px;
|
||||
display: block !important;
|
||||
margin-top: -18px;
|
||||
background-color: white;
|
||||
border-radius: 0 0 18px 18px;
|
||||
width: 100%;
|
||||
}
|
||||
.card-template-wrap-9 .card-body-wrapper .slogan{
|
||||
display: none !important;
|
||||
}
|
||||
.card-template-wrap-9 .relative-bottom .slogan{
|
||||
color: #000 !important;
|
||||
font-size: 1.8em !important;
|
||||
text-align: left !important;
|
||||
font-weight: bold !important;
|
||||
font-family: 'Open Sans', sans-serif;
|
||||
}
|
||||
.card-template-wrap-9 .relative-bottom p.description{
|
||||
font-size: 1.5em !important;
|
||||
color: #000 !important;
|
||||
width: 94% !important;
|
||||
text-align: justify !important;
|
||||
font-family: 'Open Sans', sans-serif;
|
||||
}
|
||||
.card-template-wrap-9 .relative-bottom .nav-right-icon{
|
||||
position: absolute;
|
||||
top: 30%;
|
||||
right: 14px;
|
||||
box-shadow: none !important;
|
||||
}
|
||||
/* Tall Layout upper title 600x800 text + image = 10 */
|
||||
.card-template-wrap-10{
|
||||
width: 600px;
|
||||
height: auto;
|
||||
border-radius: 22px;
|
||||
background-color: white;
|
||||
}
|
||||
.card-template-wrap-10 .relative{
|
||||
display: none !important;
|
||||
}
|
||||
.card-template-wrap-10 .relative-bottom{
|
||||
position: absolute;
|
||||
padding: 10px 14px;
|
||||
display: block !important;
|
||||
margin-top: -18px;
|
||||
background-color: white;
|
||||
border-radius: 0 0 18px 18px;
|
||||
width: 100%;
|
||||
}
|
||||
.card-template-wrap-10 .relative-bottom .slogan{
|
||||
display: none;
|
||||
}
|
||||
.card-template-wrap-10 .relative-bottom p.description{
|
||||
font-size: 1.5em !important;
|
||||
color: #000 !important;
|
||||
width: 94% !important;
|
||||
text-align: justify !important;
|
||||
font-family: 'Open Sans', sans-serif;
|
||||
}
|
||||
.card-template-wrap-10 .relative-bottom .nav-right-icon{
|
||||
position: absolute;
|
||||
top: 30px;
|
||||
right: 14px;
|
||||
box-shadow: none !important;
|
||||
}
|
||||
|
||||
/*1. short layout 600X300 text+image -> title top*/
|
||||
.card-template-wrap-1 .card-body-wrapper{
|
||||
position: unset !important;
|
||||
}
|
||||
.card-template-wrap-1 .slogan{
|
||||
position: absolute !important;
|
||||
top: 20px !important;
|
||||
}
|
||||
/*2. image only*/
|
||||
.card-template-wrap-2 .card-body-wrapper{
|
||||
visibility: hidden !important;
|
||||
}
|
||||
/*3. tall layout image only*/
|
||||
.card-template-wrap-3 .card-body-wrapper {
|
||||
visibility: hidden !important;
|
||||
}
|
||||
/*6. default layout image only*/
|
||||
.card-template-wrap-6 .card-body-wrapper {
|
||||
visibility: hidden !important;
|
||||
}
|
||||
/* Short Layout 600x300 Solid Color 1 */
|
||||
.card-template-wrap-4 .card-bg{
|
||||
width: 600px !important;
|
||||
height: 300px !important;
|
||||
}
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
function show_light_box(id) {
|
||||
/*
|
||||
If the lightbox window HTML already exists in document,
|
||||
change the img src to to match the href of whatever link was clicked
|
||||
If the lightbox window HTML doesn't exists, create it and insert it.
|
||||
(This will only happen the first time around)
|
||||
*/
|
||||
if ($('#lightbox').length > 0) { // #lightbox exists
|
||||
//place href as img src value
|
||||
$('#lightbox_container').html($('#'+id).html());
|
||||
//show lightbox window - you could use .show('fast') for a transition
|
||||
$('#lightbox').show();
|
||||
}
|
||||
else { //#lightbox does not exist - create and insert (runs 1st time only)
|
||||
//create HTML markup for lightbox window
|
||||
var lightbox =
|
||||
'<div id="lightbox">' +
|
||||
'<p>Click to close</p>' +
|
||||
'<div id="lightbox_container">' + //insert clicked link's href into img src
|
||||
$('#'+id).html()
|
||||
'</div>' +
|
||||
'</div>';
|
||||
//insert lightbox HTML into page
|
||||
$('body').append(lightbox);
|
||||
//Click anywhere on the page to get rid of lightbox window
|
||||
$('#lightbox').on('click', function(){ //must use live, as the lightbox element is inserted into the DOM
|
||||
$('#lightbox').hide();
|
||||
});
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,127 @@
|
||||
<!-- div class="container" -->
|
||||
<div class="row justify-content-md-center">
|
||||
|
||||
<div class="col col-lg-12">
|
||||
<!-- Media library -->
|
||||
<div class="panel panel-white">
|
||||
<div class="panel-heading">
|
||||
<div class="row">
|
||||
<div class="col-md-10">
|
||||
<form class="form-inline" method="GET" action="/cards/arcvcards/<?php echo $filterData['card_category'] ?? 0 ?>">
|
||||
<div class="form-group">
|
||||
<label for=""><b>Inactive or Archived Cards</b></label>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<?php echo $cart_filter_by_selectbox; ?>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input type="search" name="filter_value" class="form-control" placeholder="Filter value" value="<?=$filterData['filter_value'] ?? '' ?>"/>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary btn-sm">Search</button>
|
||||
</form>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<?= $card_category ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="m-y-sm"><? echo $links ?></div>
|
||||
<div class="table-responsive">
|
||||
<?= $card_table ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /media library -->
|
||||
</div>
|
||||
|
||||
<div id="card_detail" style="display:none;">
|
||||
Cards Preview
|
||||
</div>
|
||||
</div>
|
||||
<!-- Modal -->
|
||||
<div class="modal fade" id="exampleModalScrollable" tabindex="-1" role="dialog" aria-labelledby="exampleModalScrollableTitle" aria-hidden="true">
|
||||
<div class="modal-dialog modal-dialog-scrollable" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="exampleModalScrollableTitle">Card Settings: <?=$card_id?></h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
|
||||
<button type="button" class="btn btn-primary">Save changes</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
function activateCard(card_id){
|
||||
var result = confirm("Confirm Activating Card id="+card_id+"?");
|
||||
if (result) {
|
||||
//Logic to delete the item
|
||||
$.ajax({
|
||||
url: "/cards/cardactivate?proc=PROCESS&card_id=" + card_id
|
||||
}).done(function (data) {
|
||||
$('#del_form'+card_id).html(data);
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
function deleteCard(card_id){
|
||||
|
||||
$('#xd_form' +card_id).html('Processing...');
|
||||
$('#xd' + card_id).prop('disabled', true);
|
||||
$.ajax({
|
||||
url: "/cards/deletecard?proc=PROCESS&card_id=" + card_id
|
||||
}).done(function (data) {
|
||||
$('#xd_form' + card_id).html(data);
|
||||
$('#xd' + card_id).prop('disabled', false);
|
||||
});
|
||||
return false;
|
||||
}
|
||||
|
||||
function viewCard(card_id) {
|
||||
|
||||
$('#card_detail').html('Processing...');
|
||||
$('#acc' + card_id).prop('disabled', true);
|
||||
$.ajax({
|
||||
url: "/cards/viewcard?proc=PROCESS&card_id=" + card_id
|
||||
}).done(function (data) {
|
||||
$('#card_detail').html(data);
|
||||
$('#acc' + card_id).prop('disabled', false);
|
||||
show_light_box('card_detail');
|
||||
});
|
||||
return false;
|
||||
}
|
||||
|
||||
function editCard(card_id) {
|
||||
$('#card_form').html('Processing...');
|
||||
$('#edit' + card_id).prop('disabled', true);
|
||||
$.ajax({
|
||||
url: "/bkoadmin/editcard?proc=PROCESS&card_id=" + card_id
|
||||
}).done(function (data) {
|
||||
$('#card_form').html(data);
|
||||
$('#edit' + card_id).prop('disabled', false);
|
||||
});
|
||||
return false;
|
||||
}
|
||||
|
||||
$(function() {
|
||||
$('select[name=card_category]').change(function() {
|
||||
document.location = '/cards/arcvcards/'+(this.value==''?'0':this.value)+'/0';
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<?php
|
||||
$this->load->view('cards/common/lightbox.php');
|
||||
?>
|
||||
@@ -0,0 +1,120 @@
|
||||
<!-- div class="container" -->
|
||||
<div class="row justify-content-md-center">
|
||||
|
||||
|
||||
<div class="col col-lg-8">
|
||||
<!-- Media library -->
|
||||
<div class="panel panel-white">
|
||||
<div class="panel-heading">
|
||||
<div class="row">
|
||||
<div class="col-md-10">
|
||||
<form class="form-inline" method="GET" action="/cards/cardorder/<?php echo $filterData['card_category'] ?? 0 ?>">
|
||||
<div class="row">
|
||||
<div class="col-md-3">
|
||||
<div class="form-group p-y-sm">
|
||||
<label for=""><b>Configured Cards</b></label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<div class="form-group p-y-sm">
|
||||
<?php echo $cart_filter_by_selectbox; ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-7">
|
||||
<div class="form-group p-y-sm">
|
||||
<input type="search" name="filter_value" class="form-control" placeholder="Filter value" value="<?= $filterData['filter_value'] ?? '' ?>"/>
|
||||
<button type="submit" class="btn btn-primary btn-sm">Search</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<div class="form-group p-y-sm">
|
||||
<?= $card_category ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="m-y-sm"><? echo $links ?></div>
|
||||
<div class="table-responsive">
|
||||
<?= $card_table ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /media library -->
|
||||
</div>
|
||||
|
||||
<div class="col col-lg-4">
|
||||
<div class="card" style="width: 100%; background-color: #B3CDC9; padding: 5px;">
|
||||
<div class="card-body" id="card_form">
|
||||
<font color=red><?= $message ?> </font>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div id="card_detail" style="display:none;">
|
||||
Cards Preview
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Modal -->
|
||||
<div class="modal fade" id="exampleModalScrollable" tabindex="-1" role="dialog" aria-labelledby="exampleModalScrollableTitle" aria-hidden="true">
|
||||
<div class="modal-dialog modal-dialog-scrollable" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="exampleModalScrollableTitle">Card Settings: <?=$card_id?></h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
|
||||
<button type="button" class="btn btn-primary">Save changes</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
function viewCard(card_id) {
|
||||
|
||||
$('#card_detail').html('Processing...');
|
||||
$('#acc' + card_id).prop('disabled', true);
|
||||
$.ajax({
|
||||
url: "/cards/viewcard?proc=PROCESS&card_id=" + card_id
|
||||
}).done(function (data) {
|
||||
$('#card_detail').html(data);
|
||||
$('#acc' + card_id).prop('disabled', false);
|
||||
show_light_box('card_detail');
|
||||
});
|
||||
return false;
|
||||
}
|
||||
|
||||
function editCard(card_id) {
|
||||
$('#card_form').html('Processing...');
|
||||
$('#edit' + card_id).prop('disabled', true);
|
||||
$.ajax({
|
||||
url: "/cards/editcard?proc=PROCESS&card_id=" + card_id
|
||||
}).done(function (data) {
|
||||
$('#card_form').html(data);
|
||||
$('#edit' + card_id).prop('disabled', false);
|
||||
});
|
||||
return false;
|
||||
}
|
||||
|
||||
$(function() {
|
||||
$('select[name=card_category]').change(function() {
|
||||
document.location = '/cards/cardorder/'+(this.value==''?'0':this.value)+'/0';
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<?php
|
||||
$this->load->view('cards/common/lightbox.php');
|
||||
?>
|
||||
@@ -0,0 +1,215 @@
|
||||
<style type="text/css">
|
||||
.error{
|
||||
border-color: red;
|
||||
}
|
||||
.error:focus{
|
||||
border-color: red !important;
|
||||
}
|
||||
span.required, strong.required{
|
||||
color:red;
|
||||
font-weight: bold;
|
||||
}
|
||||
</style>
|
||||
<!-- div class="container" -->
|
||||
<div class="row justify-content-md-center">
|
||||
<div class="col col-lg-6">
|
||||
<div class="card" style="width: 100%; background-color: #B3CDC9; padding: 5px;">
|
||||
<div class="card-body" id="card_form">
|
||||
<font color=red><?= $message ?> </font>
|
||||
<?php
|
||||
include 'common/card_form.php';
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
HELP :<a href="https://wiki.float.sg/backoffice/offercards/offercards">https://wiki.float.sg/backoffice/offercards/offercards</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col col-lg-6">
|
||||
<!-- Media library -->
|
||||
<div class="panel panel-white">
|
||||
<div class="panel-heading">
|
||||
<div class="row">
|
||||
<div class="col-md-10">
|
||||
<form class="form-inline" method="GET" action="/cards/cardspage/<?php echo $filterData['card_category'] ?? 0 ?>">
|
||||
<div class="row">
|
||||
<div class="col-md-3">
|
||||
<div class="form-group p-y-sm">
|
||||
<label for=""><b>Configured Cards</b></label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<div class="form-group p-y-sm">
|
||||
<?php echo $cart_filter_by_selectbox; ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-7">
|
||||
<div class="form-group p-y-sm">
|
||||
<input type="search" name="filter_value" class="form-control" placeholder="Filter value" value="<?= $filterData['filter_value'] ?? '' ?>" />
|
||||
<button type="submit" class="btn btn-primary btn-sm">Search</button>
|
||||
<button type="button" class="btn btn-secondary btn-sm clearSearchText">Clear</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<div class="form-group p-y-sm">
|
||||
<?= $card_category ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="m-y-sm"><? echo $links ?></div>
|
||||
<div class="table-responsive">
|
||||
<?= $card_table ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /media library -->
|
||||
</div>
|
||||
|
||||
<div id="card_detail" style="display:none;">
|
||||
Cards Preview
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Modal -->
|
||||
<div class="modal fade" id="exampleModalScrollable" tabindex="-1" role="dialog" aria-labelledby="exampleModalScrollableTitle" aria-hidden="true">
|
||||
<div class="modal-dialog modal-dialog-scrollable" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="exampleModalScrollableTitle">Card Settings: <?=$card_id?></h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
|
||||
<button type="button" class="btn btn-primary">Save changes</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
function deleteCard(card_id){
|
||||
|
||||
// alert(card_id);
|
||||
var result = confirm("Confirm archive card id="+card_id+"?");
|
||||
if (result) {
|
||||
//Logic to delete the item
|
||||
$.ajax({
|
||||
url: "/bkoadmin/cardarchive?proc=PROCESS&card_id=" + card_id
|
||||
}).done(function (data) {
|
||||
$('#del_form'+card_id).html(data);
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
function viewCard(card_id) {
|
||||
|
||||
$('#card_detail').html('Processing...');
|
||||
$('#acc' + card_id).prop('disabled', true);
|
||||
$.ajax({
|
||||
url: "/cards/viewcard?proc=PROCESS&card_id=" + card_id
|
||||
}).done(function (data) {
|
||||
$('#card_detail').html(data);
|
||||
$('#acc' + card_id).prop('disabled', false);
|
||||
show_light_box('card_detail');
|
||||
});
|
||||
return false;
|
||||
}
|
||||
|
||||
function editCard(card_id) {
|
||||
$('#card_form').html('Processing...');
|
||||
$('#edit' + card_id).prop('disabled', true);
|
||||
$.ajax({
|
||||
url: "/cards/editcard?proc=PROCESS&card_id=" + card_id
|
||||
}).done(function (data) {
|
||||
$('#card_form').html(data);
|
||||
$('#edit' + card_id).prop('disabled', false);
|
||||
});
|
||||
return false;
|
||||
}
|
||||
|
||||
$(function() {
|
||||
$('select[name=card_category]').change(function() {
|
||||
document.location = '/cards/cardspage/'+(this.value==''?'0':this.value)+'/0';
|
||||
});
|
||||
});
|
||||
// update card
|
||||
var customizer = {
|
||||
locker: false,
|
||||
init: function() {
|
||||
this.handleCardUpdate();
|
||||
this.clearSearchText();
|
||||
},
|
||||
handleCardUpdate: function() {
|
||||
$(document.body).find('#card_form').on('submit', 'form', function(event) {
|
||||
event.preventDefault();
|
||||
if ( customizer.locker ) {return;}
|
||||
customizer.locker = true;
|
||||
|
||||
var _this = $(this),
|
||||
button = _this.find('button[type="submit"]'),
|
||||
button_text = button.text(),
|
||||
formdata = _this.serialize();
|
||||
$.ajax({
|
||||
url: '/cards/cardspage',
|
||||
type: 'POST',
|
||||
data: formdata,
|
||||
beforeSend: function() {
|
||||
$('#frm_update_card').find('.error').removeClass('error');
|
||||
button.text('loading...');
|
||||
}
|
||||
})
|
||||
.done(function( res ) {
|
||||
if ( !res.success ) {
|
||||
res.message = button_text + " card get errors: " + res.message.replace(/(?:\<br\/>)/gm, '\n');
|
||||
if(typeof res.error_ids !== 'undefined' && res.error_ids.length>0){
|
||||
res.error_ids.forEach(function(err_id, ierr_id){
|
||||
$('#'+err_id).addClass('error');
|
||||
if(ierr_id === 0){
|
||||
$('#'+err_id).focus();
|
||||
}
|
||||
});
|
||||
}
|
||||
} else {
|
||||
var cardSection = $(document.body).find('#acc'+res.fragments.id);
|
||||
var parentElement = cardSection.closest('td');
|
||||
parentElement.next().html( res.fragments.html );
|
||||
}
|
||||
alert( res.message );
|
||||
})
|
||||
.fail(function( throwErr ) {
|
||||
console.log( throwErr );
|
||||
})
|
||||
.always(function() {
|
||||
customizer.locker = false;
|
||||
button.text( button_text );
|
||||
});
|
||||
});
|
||||
},
|
||||
clearSearchText: function() {
|
||||
$(document.body).find('.clearSearchText').on('click', function(event) {
|
||||
event.preventDefault();
|
||||
var _this = $(this),
|
||||
searchTextarea = _this.closest('.form-group').find('textarea');
|
||||
if ( searchTextarea.val() == '' ) return;
|
||||
searchTextarea.val('');
|
||||
window.location.replace('/cards/cardspage/');
|
||||
});
|
||||
}
|
||||
};
|
||||
customizer.init();
|
||||
</script>
|
||||
|
||||
<?php
|
||||
$this->load->view('cards/common/lightbox.php');
|
||||
?>
|
||||
@@ -0,0 +1,115 @@
|
||||
<!-- div class="container" -->
|
||||
<div class="row justify-content-md-center">
|
||||
|
||||
<div class="col col-lg-12">
|
||||
<!-- Media library -->
|
||||
<div class="panel panel-white">
|
||||
<div class="panel-heading">
|
||||
<div class="row">
|
||||
<div class="col-md-10">
|
||||
<form class="form-inline" method="GET" action="/cards/deletedcards/<?php echo $filterData['card_category'] ?? 0 ?>">
|
||||
<div class="form-group p-y-sm">
|
||||
<label for=""><b>Deleted Cards</b></label>
|
||||
</div>
|
||||
<div class="form-group p-y-sm">
|
||||
<?php echo $cart_filter_by_selectbox; ?>
|
||||
</div>
|
||||
<div class="form-group p-y-sm">
|
||||
<input type="search" name="filter_value" class="form-control" placeholder="Filter value" value="<?= $filterData['filter_value'] ?? '' ?>"/>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary btn-sm">Search</button>
|
||||
</form>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<?= $card_category ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="m-y-sm"><? echo $links ?></div>
|
||||
<div class="table-responsive">
|
||||
<?= $card_table ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /media library -->
|
||||
</div>
|
||||
|
||||
<div id="card_detail" style="display:none;">
|
||||
Cards Preview
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<!-- Modal -->
|
||||
<div class="modal fade" id="exampleModalScrollable" tabindex="-1" role="dialog" aria-labelledby="exampleModalScrollableTitle" aria-hidden="true">
|
||||
<div class="modal-dialog modal-dialog-scrollable" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="exampleModalScrollableTitle">Card Settings: <?=$card_id?></h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
|
||||
<button type="button" class="btn btn-primary">Save changes</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
function activateCard(card_id){
|
||||
var result = confirm("Confirm Activating Card id="+card_id+"?");
|
||||
if (result) {
|
||||
//Logic to delete the item
|
||||
$.ajax({
|
||||
url: "/bkoadmin/cardactivate?proc=PROCESS&card_id=" + card_id
|
||||
}).done(function (data) {
|
||||
$('#del_form'+card_id).html(data);
|
||||
});
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
function viewCard(card_id) {
|
||||
$('#card_detail').html('Processing...');
|
||||
$('#acc' + card_id).prop('disabled', true);
|
||||
$.ajax({
|
||||
url: "/cards/viewcard?proc=PROCESS&card_id=" + card_id
|
||||
}).done(function (data) {
|
||||
$('#card_detail').html(data);
|
||||
$('#acc' + card_id).prop('disabled', false);
|
||||
show_light_box('card_detail');
|
||||
});
|
||||
return false;
|
||||
}
|
||||
|
||||
function returnCard(card_id) {
|
||||
$('#card_form').html('Processing...');
|
||||
$('#edit' + card_id).prop('disabled', true);
|
||||
$.ajax({
|
||||
url: "/bkoadmin/deletetoinactive?proc=PROCESS&card_id=" + card_id
|
||||
}).done(function (data) {
|
||||
$('#card_form').html(data);
|
||||
$('#edit' + card_id).prop('disabled', false);
|
||||
});
|
||||
return false;
|
||||
}
|
||||
|
||||
$(function() {
|
||||
$('select[name=card_category]').change(function() {
|
||||
|
||||
document.location = '/cards/deletedcards/'+(this.value==''?'0':this.value)+'/0';
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<?php
|
||||
$this->load->view('cards/common/lightbox.php');
|
||||
?>
|
||||
@@ -0,0 +1,75 @@
|
||||
<!-- div class="container" -->
|
||||
<div class="row justify-content-md-center">
|
||||
|
||||
<div class="col col-lg-8">
|
||||
<!-- Media library -->
|
||||
<div class="panel panel-white">
|
||||
<div class="panel-heading">
|
||||
<div class="row">
|
||||
<div class="col-md-10">
|
||||
<div class="row">
|
||||
<div class="col-md-3">
|
||||
<div class="form-group p-y-sm">
|
||||
<label for=""><b>Dynamic Assigned Cards</b></label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<div class="form-group p-y-sm">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-7">
|
||||
<div class="form-group p-y-sm">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<div class="form-group p-y-sm">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="m-y-sm"><? ?></div>
|
||||
<div class="table-responsive">
|
||||
<?= $dynamic_card_table ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /media library -->
|
||||
</div>
|
||||
|
||||
<div class="col col-lg-4">
|
||||
<div class="card" style="width: 100%; background-color: #a2a0c7; padding: 5px;">
|
||||
<div class="card-body" id="card_form">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="card_detail" style="display:none;">
|
||||
Cards Preview
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Modal -->
|
||||
<div class="modal fade" id="exampleModalScrollable" tabindex="-1" role="dialog" aria-labelledby="exampleModalScrollableTitle" aria-hidden="true">
|
||||
<div class="modal-dialog modal-dialog-scrollable" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="exampleModalScrollableTitle">Card Settings: <?= $card_id ?></h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
|
||||
<button type="button" class="btn btn-primary">Save changes</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -0,0 +1,127 @@
|
||||
<!-- div class="container" -->
|
||||
<div class="row justify-content-md-center">
|
||||
|
||||
<div class="col col-lg-12">
|
||||
<!-- Media library -->
|
||||
<div class="panel panel-white">
|
||||
<div class="panel-heading">
|
||||
<div class="row">
|
||||
<div class="col-md-10">
|
||||
<form class="form-inline" method="GET" action="/cards/expiredcards/<?php echo $filterData['card_category'] ?? 0 ?>">
|
||||
<div class="form-group">
|
||||
<label for=""><b><?php echo $page_title; ?></b></label>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<?php echo $cart_filter_by_selectbox; ?>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input type="search" name="filter_value" class="form-control" placeholder="Filter value" value="<?=$filterData['filter_value'] ?? '' ?>"/>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary btn-sm">Search</button>
|
||||
</form>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<?= $card_category ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="m-y-sm"><? echo $links ?></div>
|
||||
<div class="table-responsive">
|
||||
<?= $card_table ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /media library -->
|
||||
</div>
|
||||
|
||||
<div id="card_detail" style="display:none;">
|
||||
Cards Preview
|
||||
</div>
|
||||
</div>
|
||||
<!-- Modal -->
|
||||
<div class="modal fade" id="exampleModalScrollable" tabindex="-1" role="dialog" aria-labelledby="exampleModalScrollableTitle" aria-hidden="true">
|
||||
<div class="modal-dialog modal-dialog-scrollable" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="exampleModalScrollableTitle">Card Settings: <?=$card_id?></h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
|
||||
<button type="button" class="btn btn-primary">Save changes</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
function activateCard(card_id){
|
||||
var result = confirm("Confirm Activating Card id="+card_id+"?");
|
||||
if (result) {
|
||||
//Logic to delete the item
|
||||
$.ajax({
|
||||
url: "/cards/cardactivate?proc=PROCESS&card_id=" + card_id
|
||||
}).done(function (data) {
|
||||
$('#del_form'+card_id).html(data);
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
function deleteCard(card_id){
|
||||
|
||||
$('#xd_form' +card_id).html('Processing...');
|
||||
$('#xd' + card_id).prop('disabled', true);
|
||||
$.ajax({
|
||||
url: "/cards/deletecard?proc=PROCESS&card_id=" + card_id
|
||||
}).done(function (data) {
|
||||
$('#xd_form' + card_id).html(data);
|
||||
$('#xd' + card_id).prop('disabled', false);
|
||||
});
|
||||
return false;
|
||||
}
|
||||
|
||||
function viewCard(card_id) {
|
||||
|
||||
$('#card_detail').html('Processing...');
|
||||
$('#acc' + card_id).prop('disabled', true);
|
||||
$.ajax({
|
||||
url: "/cards/viewcard?proc=PROCESS&card_id=" + card_id
|
||||
}).done(function (data) {
|
||||
$('#card_detail').html(data);
|
||||
$('#acc' + card_id).prop('disabled', false);
|
||||
show_light_box('card_detail');
|
||||
});
|
||||
return false;
|
||||
}
|
||||
|
||||
function editCard(card_id) {
|
||||
$('#card_form').html('Processing...');
|
||||
$('#edit' + card_id).prop('disabled', true);
|
||||
$.ajax({
|
||||
url: "/bkoadmin/editcard?proc=PROCESS&card_id=" + card_id
|
||||
}).done(function (data) {
|
||||
$('#card_form').html(data);
|
||||
$('#edit' + card_id).prop('disabled', false);
|
||||
});
|
||||
return false;
|
||||
}
|
||||
|
||||
$(function() {
|
||||
$('select[name=card_category]').change(function() {
|
||||
document.location = '/cards/expiredcards/'+(this.value==''?'0':this.value)+'/0';
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<?php
|
||||
$this->load->view('cards/common/lightbox.php');
|
||||
?>
|
||||
@@ -0,0 +1,135 @@
|
||||
<!-- div class="container" -->
|
||||
<div class="row justify-content-md-center">
|
||||
<div class="col col-lg-6">
|
||||
<div class="card" style="width: 100%; background-color: #a2a0c7; padding: 5px;">
|
||||
<div class="card-body" id="card_form">
|
||||
<font color=red><?= $message ?> </font>
|
||||
<?php
|
||||
include 'common/card_surveyform.php';
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col col-lg-6">
|
||||
<!-- Media library -->
|
||||
<div class="panel panel-white">
|
||||
<div class="panel-heading">
|
||||
<div class="row">
|
||||
<div class="col-md-10">
|
||||
<form id="frm_search_surveycards" class="form-inline" method="GET" action="/cards/surveycards/<?php echo $filterData['card_category'] ?? 0 ?>">
|
||||
<div class="row">
|
||||
<div class="col-md-3">
|
||||
<div class="form-group p-y-sm">
|
||||
<label for=""><b>Configured Cards</b></label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<div class="form-group p-y-sm">
|
||||
<?php echo $cart_filter_by_selectbox; ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-7">
|
||||
<div class="form-group p-y-sm">
|
||||
<input type="search" name="filter_value" class="form-control" placeholder="Filter value" value="<?= $filterData['filter_value'] ?? '' ?>" />
|
||||
<button id="btn_search" type="submit" class="btn btn-primary btn-sm">Search</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<div class="form-group p-y-sm">
|
||||
<?= $card_category ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="m-y-sm"><? echo $links ?></div>
|
||||
<div class="table-responsive">
|
||||
<?= $card_table ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /media library -->
|
||||
</div>
|
||||
<div id="card_detail" style="display:none;">
|
||||
Cards Preview
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<!-- Modal -->
|
||||
<div class="modal fade" id="exampleModalScrollable" tabindex="-1" role="dialog" aria-labelledby="exampleModalScrollableTitle" aria-hidden="true">
|
||||
<div class="modal-dialog modal-dialog-scrollable" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="exampleModalScrollableTitle">Card Settings: <?=$card_id?></h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
|
||||
<button type="button" class="btn btn-primary">Save changes</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
function deleteCard(card_id){
|
||||
|
||||
var result = confirm("Confirm archive card id="+card_id+"?");
|
||||
if (result) {
|
||||
//Logic to delete the item
|
||||
$.ajax({
|
||||
url: "/bkoadmin/cardarchive?proc=PROCESS&card_id=" + card_id
|
||||
}).done(function (data) {
|
||||
$('#del_form'+card_id).html(data);
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
function viewCard(card_id) {
|
||||
$('#card_detail').html('Processing...');
|
||||
$('#acc' + card_id).prop('disabled', true);
|
||||
$.ajax({
|
||||
url: "/cards/viewcard?proc=PROCESS&card_id=" + card_id
|
||||
}).done(function (data) {
|
||||
$('#card_detail').html(data);
|
||||
$('#acc' + card_id).prop('disabled', false);
|
||||
show_light_box('card_detail');
|
||||
});
|
||||
return false;
|
||||
}
|
||||
|
||||
function editCard(card_id) {
|
||||
$('#card_form').html('Processing...');
|
||||
$('#edit' + card_id).prop('disabled', true);
|
||||
$.ajax({
|
||||
url: "/cards/editSurveycard?proc=PROCESS&card_id=" + card_id
|
||||
}).done(function (data) {
|
||||
$('#card_form').html(data);
|
||||
$('#edit' + card_id).prop('disabled', false);
|
||||
});
|
||||
return false;
|
||||
}
|
||||
|
||||
$(function() {
|
||||
$('select[name=card_category]').change(function() {
|
||||
document.location = '/cards/surveycards/'+(this.value==''?'0':this.value)+'/0';
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<?php
|
||||
$this->load->view('cards/common/lightbox.php');
|
||||
?>
|
||||
Reference in New Issue
Block a user