File manager - Edit - /home/autoph/public_html/tasks/resources/views/settings/notification.php
Back
<?php if(!isset($session_access['1']) || !in_array('1_4', $session_access['1'])){ include $error_404; exit; } ?> <div class="tab-container bg-light"> <ul class="nav nav-tabs hide-sm"> <?php if(in_array('1_1', $session_access['1'])){ ?> <li class=""> <a class="" href="#settings-system">System</a> </li> <?php } ?> <?php if(in_array('1_5', $session_access['1'])){ ?> <li class=""> <a class="" href="#settings-users">Users</a> </li> <?php } ?> <?php if(in_array('1_2', $session_access['1'])){ ?> <li class=""> <a class="" href="#settings-role">Roles</a> </li> <?php } ?> <?php if(in_array('1_3', $session_access['1'])){ ?> <li class=""> <a class="" href="#settings-sms">SMS</a> </li> <?php } ?> <?php if(in_array('1_4', $session_access['1'])){ ?> <li class="active"> <a class="" href="#settings-notification">Notification</a> </li> <?php } ?> </ul> <div class="tab-content bg-white m-0 p-3"> <div class="tab-pane active cont min-height-400"> <span for="txt_role_name" class="col-form-label font-weight-normal">Templates:</span> <div class="card collapsed-card mb-2"> <div class="card-header bg-light pl-2 pt-1 pb-1"> <h3 class="card-title text-md pt-1" id="ttitle_1" json-cnf-notification="true">Create Ticket Expert SMS</h3> <div class="card-tools"> <button type="button" class="btn btn-tool role-toggle" data-card-widget="collapse"> <i class="fas fa-plus"></i> </button> </div> </div> <!-- /.card-header pl-2 pt-1 pb-1 --> <div class="card-body p-0"> <div class="col-12 px-3 pt-2"> <div class="row"> <div class="col-sm-12"> <div class="col-12"> <div class="form-group row mb-1"> <label for="txt_lead_call_description" class="col-sm-12 pb-0 pl-0 pt-0 col-form-label font-weight-normal"> Available Parameters: <i class=" cursor-pointer tooltip-me pt-1 pl-1 fas fa-question-circle text-primary " title="" data-original-title="Click the desire parameter to insert in template editor."></i> </label> <div class="form-group m-0" id=""> <div class="col-12 p-0"> <label style="width:95px;" class="text-black font-weight-bold cursor-pointer m-0">Status</label> <input type="checkbox" name="my-checkbox" id="status_1" json-cnf-notification="true" data-notification-status data-bootstrap-switch data-off-color="danger" data-on-color="success"> </div> <div class="col-12 p-0"> <label style="width:95px;" lead-t1-parameter="" class="text-danger font-weight-bold cursor-pointer m-0"><user></label> <label class="font-italic m-0 font-weight-normal">- Display the owner of ticket.</label> </div> <div class="col-12 p-0"> <label style="width:95px;" lead-t1-parameter="" class="text-danger font-weight-bold cursor-pointer m-0"><ref_no></label> <label class="font-italic m-0 font-weight-normal">- Display the reference number of ticket.</label> </div> <div class="col-12 p-0"> <label style="width:95px;" lead-t1-parameter="" class="text-danger font-weight-bold cursor-pointer m-0"><title></label> <label class="font-italic m-0 font-weight-normal">- Display the title of ticket.</label> </div> <div class="col-12 p-0" hidden> <label style="width:95px;" lead-t1-parameter="" class="text-danger font-weight-bold cursor-pointer m-0"><description></label> <label class="font-italic m-0 font-weight-normal">- Display the description of ticket.</label> </div> <div class="col-12 p-0"> <label style="width:95px;" lead-t1-parameter="" class="text-danger font-weight-bold cursor-pointer m-0"><category></label> <label class="font-italic m-0 font-weight-normal">- Display the category of ticket.</label> </div> <div class="col-12 p-0"> <label style="width:95px;" lead-t1-parameter="" class="text-danger font-weight-bold cursor-pointer m-0"><priority></label> <label class="font-italic m-0 font-weight-normal">- Display the priority level of ticket.</label> </div> <div class="col-12 p-0"> <label style="width:95px;" lead-t1-parameter="" class="text-danger font-weight-bold cursor-pointer m-0"><brand></label> <label class="font-italic m-0 font-weight-normal">- Display the selected brand of ticket.</label> </div> <div class="col-12 p-0"> <label style="width:95px;" lead-t1-parameter="" class="text-danger font-weight-bold cursor-pointer m-0"><model></label> <label class="font-italic m-0 font-weight-normal">- Display the selected model of ticket.</label> </div> <div class="col-12 p-0"> <label style="width:95px;" lead-t1-parameter="" class="text-danger font-weight-bold cursor-pointer m-0"><variant></label> <label class="font-italic m-0 font-weight-normal">- Display the selected model variant of ticket.</label> </div> </div> </div> </div> </div> <div class="col-sm-6"> </div> </div> </div> <div class="form-group px-3"> <input type="hidden" value="Test" /> <textarea style="height: 150px;" type="text" id="t_1" json-cnf-notification="true" placeholder="Enter your template here..." class="form-control form-control-md"></textarea> </div> </div> <!-- /.card-body --> </div> <div class="card collapsed-card mb-2"> <div class="card-header bg-light pl-2 pt-1 pb-1"> <h3 class="card-title text-md pt-1" id="ttitle_3" json-cnf-notification="true">Create Ticket Expert System</h3> <div class="card-tools"> <button type="button" class="btn btn-tool role-toggle" data-card-widget="collapse"> <i class="fas fa-plus"></i> </button> </div> </div> <!-- /.card-header pl-2 pt-1 pb-1 --> <div class="card-body p-0"> <div class="col-12 px-3 pt-2"> <div class="row"> <div class="col-sm-12"> <div class="col-12"> <div class="form-group row mb-1"> <label for="txt_lead_call_description" class="col-sm-12 pb-0 pl-0 pt-0 col-form-label font-weight-normal"> Available Parameters: <i class=" cursor-pointer tooltip-me pt-1 pl-1 fas fa-question-circle text-primary " title="" data-original-title="Click the desire parameter to insert in template editor."></i> </label> <div class="form-group m-0" id=""> <div class="col-12 p-0"> <label style="width:95px;" class="text-black font-weight-bold cursor-pointer m-0">Status</label> <input type="checkbox" name="my-checkbox" id="status_3" json-cnf-notification="true" data-notification-status data-bootstrap-switch data-off-color="danger" data-on-color="success"> </div> <div class="col-12 p-0"> <label style="width:95px;" lead-t3-parameter="" class="text-danger font-weight-bold cursor-pointer m-0"><user></label> <label class="font-italic m-0 font-weight-normal">- Display the owner of ticket.</label> </div> <div class="col-12 p-0"> <label style="width:95px;" lead-t3-parameter="" class="text-danger font-weight-bold cursor-pointer m-0"><ref_no></label> <label class="font-italic m-0 font-weight-normal">- Display the reference number of ticket.</label> </div> <div class="col-12 p-0"> <label style="width:95px;" lead-t3-parameter="" class="text-danger font-weight-bold cursor-pointer m-0"><title></label> <label class="font-italic m-0 font-weight-normal">- Display the title of ticket.</label> </div> <div class="col-12 p-0" hidden> <label style="width:95px;" lead-t3-parameter="" class="text-danger font-weight-bold cursor-pointer m-0"><description></label> <label class="font-italic m-0 font-weight-normal">- Display the description of ticket.</label> </div> <div class="col-12 p-0"> <label style="width:95px;" lead-t3-parameter="" class="text-danger font-weight-bold cursor-pointer m-0"><category></label> <label class="font-italic m-0 font-weight-normal">- Display the category of ticket.</label> </div> <div class="col-12 p-0"> <label style="width:95px;" lead-t3-parameter="" class="text-danger font-weight-bold cursor-pointer m-0"><priority></label> <label class="font-italic m-0 font-weight-normal">- Display the priority level of ticket.</label> </div> <div class="col-12 p-0"> <label style="width:95px;" lead-t3-parameter="" class="text-danger font-weight-bold cursor-pointer m-0"><brand></label> <label class="font-italic m-0 font-weight-normal">- Display the selected brand of ticket.</label> </div> <div class="col-12 p-0"> <label style="width:95px;" lead-t3-parameter="" class="text-danger font-weight-bold cursor-pointer m-0"><model></label> <label class="font-italic m-0 font-weight-normal">- Display the selected model of ticket.</label> </div> <div class="col-12 p-0"> <label style="width:95px;" lead-t3-parameter="" class="text-danger font-weight-bold cursor-pointer m-0"><variant></label> <label class="font-italic m-0 font-weight-normal">- Display the selected model variant of ticket.</label> </div> </div> </div> </div> </div> <div class="col-sm-6"> </div> </div> </div> <div class="form-group px-3"> <textarea style="height: 150px;" type="text" id="t_3" json-cnf-notification="true" placeholder="Enter your template here..." class="form-control form-control-md"></textarea> </div> </div> <!-- /.card-body --> </div> <div class="card collapsed-card mb-2"> <div class="card-header bg-light pl-2 pt-1 pb-1"> <h3 class="card-title text-md pt-1" id="ttitle_2" json-cnf-notification="true">Reply Ticket SMS</h3> <div class="card-tools"> <button type="button" class="btn btn-tool role-toggle" data-card-widget="collapse"> <i class="fas fa-plus"></i> </button> </div> </div> <!-- /.card-header pl-2 pt-1 pb-1 --> <div class="card-body p-0"> <div class="col-12 px-3 pt-2"> <div class="row"> <div class="col-sm-12"> <div class="col-12"> <div class="form-group row mb-1"> <label for="txt_lead_call_description" class="col-sm-12 pb-0 pl-0 pt-0 col-form-label font-weight-normal"> Available Parameters: <i class=" cursor-pointer tooltip-me pt-1 pl-1 fas fa-question-circle text-primary " title="" data-original-title="Click the desire parameter to insert in template editor."></i> </label> <div class="form-group m-0" id=""> <div class="col-12 p-0"> <label style="width:95px;" class="text-black font-weight-bold cursor-pointer m-0">Status</label> <input type="checkbox" name="my-checkbox" id="status_2" json-cnf-notification="true" data-notification-status data-bootstrap-switch data-off-color="danger" data-on-color="success"> </div> <div class="col-12 p-0"> <label style="width:95px;" lead-t2-parameter="" class="text-danger font-weight-bold cursor-pointer m-0"><user></label> <label class="font-italic m-0 font-weight-normal">- Display the user who reply to the ticket.</label> </div> <div class="col-12 p-0"> <label style="width:95px;" lead-t2-parameter="" class="text-danger font-weight-bold cursor-pointer m-0"><ref_no></label> <label class="font-italic m-0 font-weight-normal">- Display the reference number of ticket.</label> </div> <div class="col-12 p-0"> <label style="width:95px;" lead-t2-parameter="" class="text-danger font-weight-bold cursor-pointer m-0"><title></label> <label class="font-italic m-0 font-weight-normal">- Display the title of ticket.</label> </div> <div class="col-12 p-0" hidden> <label style="width:95px;" lead-t2-parameter="" class="text-danger font-weight-bold cursor-pointer m-0"><description></label> <label class="font-italic m-0 font-weight-normal">- Display the description of ticket.</label> </div> <div class="col-12 p-0"> <label style="width:95px;" lead-t2-parameter="" class="text-danger font-weight-bold cursor-pointer m-0"><category></label> <label class="font-italic m-0 font-weight-normal">- Display the category of ticket.</label> </div> <div class="col-12 p-0"> <label style="width:95px;" lead-t2-parameter="" class="text-danger font-weight-bold cursor-pointer m-0"><priority></label> <label class="font-italic m-0 font-weight-normal">- Display the priority level of ticket.</label> </div> <div class="col-12 p-0"> <label style="width:95px;" lead-t2-parameter="" class="text-danger font-weight-bold cursor-pointer m-0"><brand></label> <label class="font-italic m-0 font-weight-normal">- Display the selected brand of ticket.</label> </div> <div class="col-12 p-0"> <label style="width:95px;" lead-t2-parameter="" class="text-danger font-weight-bold cursor-pointer m-0"><model></label> <label class="font-italic m-0 font-weight-normal">- Display the selected model of ticket.</label> </div> <div class="col-12 p-0"> <label style="width:95px;" lead-t2-parameter="" class="text-danger font-weight-bold cursor-pointer m-0"><variant></label> <label class="font-italic m-0 font-weight-normal">- Display the selected model variant of ticket.</label> </div> </div> </div> </div> </div> <div class="col-sm-6"> </div> </div> </div> <div class="form-group px-3"> <textarea style="height: 150px;" type="text" id="t_2" json-cnf-notification="true" placeholder="Enter your template here..." class="form-control form-control-md"></textarea> </div> </div> <!-- /.card-body --> </div> <div class="card collapsed-card mb-2"> <div class="card-header bg-light pl-2 pt-1 pb-1"> <h3 class="card-title text-md pt-1" id="ttitle_4" json-cnf-notification="true">Reply Ticket System</h3> <div class="card-tools"> <button type="button" class="btn btn-tool role-toggle" data-card-widget="collapse"> <i class="fas fa-plus"></i> </button> </div> </div> <!-- /.card-header pl-2 pt-1 pb-1 --> <div class="card-body p-0"> <div class="col-12 px-3 pt-2"> <div class="row"> <div class="col-sm-12"> <div class="col-12"> <div class="form-group row mb-1"> <label for="txt_lead_call_description" class="col-sm-12 pb-0 pl-0 pt-0 col-form-label font-weight-normal"> Available Parameters: <i class=" cursor-pointer tooltip-me pt-1 pl-1 fas fa-question-circle text-primary " title="" data-original-title="Click the desire parameter to insert in template editor."></i> </label> <div class="form-group m-0" id=""> <div class="col-12 p-0"> <label style="width:95px;" class="text-black font-weight-bold cursor-pointer m-0">Status</label> <input type="checkbox" name="my-checkbox" id="status_4" json-cnf-notification="true" data-notification-status data-bootstrap-switch data-off-color="danger" data-on-color="success"> </div> <div class="col-12 p-0"> <label style="width:95px;" lead-t4-parameter="" class="text-danger font-weight-bold cursor-pointer m-0"><user></label> <label class="font-italic m-0 font-weight-normal">- Display the user who reply to the ticket.</label> </div> <div class="col-12 p-0"> <label style="width:95px;" lead-t4-parameter="" class="text-danger font-weight-bold cursor-pointer m-0"><ref_no></label> <label class="font-italic m-0 font-weight-normal">- Display the reference number of ticket.</label> </div> <div class="col-12 p-0"> <label style="width:95px;" lead-t4-parameter="" class="text-danger font-weight-bold cursor-pointer m-0"><title></label> <label class="font-italic m-0 font-weight-normal">- Display the title of ticket.</label> </div> <div class="col-12 p-0" hidden> <label style="width:95px;" lead-t4-parameter="" class="text-danger font-weight-bold cursor-pointer m-0"><description></label> <label class="font-italic m-0 font-weight-normal">- Display the description of ticket.</label> </div> <div class="col-12 p-0"> <label style="width:95px;" lead-t4-parameter="" class="text-danger font-weight-bold cursor-pointer m-0"><category></label> <label class="font-italic m-0 font-weight-normal">- Display the category of ticket.</label> </div> <div class="col-12 p-0"> <label style="width:95px;" lead-t4-parameter="" class="text-danger font-weight-bold cursor-pointer m-0"><priority></label> <label class="font-italic m-0 font-weight-normal">- Display the priority level of ticket.</label> </div> <div class="col-12 p-0"> <label style="width:95px;" lead-t4-parameter="" class="text-danger font-weight-bold cursor-pointer m-0"><brand></label> <label class="font-italic m-0 font-weight-normal">- Display the selected brand of ticket.</label> </div> <div class="col-12 p-0"> <label style="width:95px;" lead-t4-parameter="" class="text-danger font-weight-bold cursor-pointer m-0"><model></label> <label class="font-italic m-0 font-weight-normal">- Display the selected model of ticket.</label> </div> <div class="col-12 p-0"> <label style="width:95px;" lead-t4-parameter="" class="text-danger font-weight-bold cursor-pointer m-0"><variant></label> <label class="font-italic m-0 font-weight-normal">- Display the selected model variant of ticket.</label> </div> </div> </div> </div> </div> <div class="col-sm-6"> </div> </div> </div> <div class="form-group px-3"> <textarea style="height: 150px;" type="text" id="t_4" json-cnf-notification="true" placeholder="Enter your template here..." class="form-control form-control-md"></textarea> </div> </div> <!-- /.card-body --> </div> <div class="card collapsed-card mb-2"> <div class="card-header bg-light pl-2 pt-1 pb-1"> <h3 class="card-title text-md pt-1" id="ttitle_5" json-cnf-notification="true">Expert Open Ticket Reminder</h3> <div class="card-tools"> <button type="button" class="btn btn-tool role-toggle" data-card-widget="collapse"> <i class="fas fa-plus"></i> </button> </div> </div> <!-- /.card-header pl-2 pt-1 pb-1 --> <div class="card-body p-0"> <div class="col-12 px-3 pt-2"> <div class="row"> <div class="col-sm-12"> <div class="col-12"> <div class="form-group row mb-1"> <label for="txt_lead_call_description" class="col-sm-12 pb-0 pl-0 pt-0 col-form-label font-weight-normal"> Available Parameters: <i class=" cursor-pointer tooltip-me pt-1 pl-1 fas fa-question-circle text-primary " title="" data-original-title="Click the desire parameter to insert in template editor."></i> </label> <div class="form-group m-0" id=""> <div class="col-12 p-0"> <label style="width:95px;" class="text-black font-weight-bold cursor-pointer m-0">Status</label> <input type="checkbox" name="my-checkbox" id="status_5" json-cnf-notification="true" data-notification-status data-bootstrap-switch data-off-color="danger" data-on-color="success"> </div> <div class="col-12 py-2"> <div class="row"> <label style="width:95px;" class="text-black font-weight-bold cursor-pointer m-0">Send every</label> <input type="number" class="hideEl" placeholder="Minutes" id="reminder_5" json-cnf-notification-rem="parent"> <div class="col-sm-3"> <input type="number" class="form-control form-control-sm" placeholder="Minutes" id="reminder_min_5" json-cnf-notification-rem="true"> </div> <div class="col-sm-3"> <input type="number" class="form-control form-control-sm" placeholder="Hours" id="reminder_hr_5" json-cnf-notification-rem="true"> </div> <div class="col-sm-3"> <input type="number" class="form-control form-control-sm" placeholder="Days" id="reminder_day_5" json-cnf-notification-rem="true"> </div> </div> </div> <div class="col-12 p-0"> <label style="width:95px;" lead-t5-parameter="" class="text-danger font-weight-bold cursor-pointer m-0"><user></label> <label class="font-italic m-0 font-weight-normal">- Display the owner of ticket.</label> </div> <div class="col-12 p-0"> <label style="width:95px;" lead-t5-parameter="" class="text-danger font-weight-bold cursor-pointer m-0"><ref_no></label> <label class="font-italic m-0 font-weight-normal">- Display the reference number of ticket.</label> </div> <div class="col-12 p-0"> <label style="width:95px;" lead-t5-parameter="" class="text-danger font-weight-bold cursor-pointer m-0"><title></label> <label class="font-italic m-0 font-weight-normal">- Display the title of ticket.</label> </div> <div class="col-12 p-0" hidden> <label style="width:95px;" lead-t5-parameter="" class="text-danger font-weight-bold cursor-pointer m-0"><description></label> <label class="font-italic m-0 font-weight-normal">- Display the description of ticket.</label> </div> <div class="col-12 p-0"> <label style="width:95px;" lead-t5-parameter="" class="text-danger font-weight-bold cursor-pointer m-0"><category></label> <label class="font-italic m-0 font-weight-normal">- Display the category of ticket.</label> </div> <div class="col-12 p-0"> <label style="width:95px;" lead-t5-parameter="" class="text-danger font-weight-bold cursor-pointer m-0"><priority></label> <label class="font-italic m-0 font-weight-normal">- Display the priority level of ticket.</label> </div> <div class="col-12 p-0"> <label style="width:95px;" lead-t5-parameter="" class="text-danger font-weight-bold cursor-pointer m-0"><brand></label> <label class="font-italic m-0 font-weight-normal">- Display the selected brand of ticket.</label> </div> <div class="col-12 p-0"> <label style="width:95px;" lead-t5-parameter="" class="text-danger font-weight-bold cursor-pointer m-0"><model></label> <label class="font-italic m-0 font-weight-normal">- Display the selected model of ticket.</label> </div> <div class="col-12 p-0"> <label style="width:95px;" lead-t5-parameter="" class="text-danger font-weight-bold cursor-pointer m-0"><variant></label> <label class="font-italic m-0 font-weight-normal">- Display the selected model variant of ticket.</label> </div> </div> </div> </div> </div> <div class="col-sm-6"> </div> </div> </div> <div class="form-group px-3"> <textarea style="height: 150px;" type="text" id="t_5" json-cnf-notification="true" placeholder="Enter your template here..." class="form-control form-control-md"></textarea> </div> </div> <!-- /.card-body --> </div> <div class="col p-0 mt-3 text-right"> <button type="button" class="btn btn-sm btn-primary " id="btn_cnf_sms_save">Save Notification</button> </div> </div> </div> </div> <!-- Toastr --> <script src="plugins/toastr/toastr.min.js"></script> <!-- Bootstrap Switch --> <script src="plugins/bootstrap-switch/js/bootstrap-switch.min.js"></script> <?php include('resources/views/common/script/function.php'); ?> <script> function readNotifTemplates() { return $.ajax({ url: "app/models/user.php", data: { model: 'read_notification_template', }, type: "POST", dataType: 'json', beforeSend: function() {}, success: function(result) { // console.log(result); $.each(result, function(i, n) { $("#t_" + n.id).text(n.description); $("#t_" + n.id).val(n.description); $("#t_" + n.id).trigger('change') // manage switch $("#status_" + n.id).bootstrapSwitch('state', parseInt(n.is_active)); }); }, error: function() {} }); } function readNotifReminder() { return $.ajax({ url: "app/models/user.php", data: { model: 'read_notification_reminder', }, type: "POST", dataType: 'json', beforeSend: function() {}, success: function(result) { // console.log(result); $.each(result, function(i, n) { // console.log(n); if(parseInt(n.minutes)){ $("#reminder_min_" + n.type).val(n.minutes); } if(parseInt(n.hours)){ $("#reminder_hr_" + n.type).val(n.hours); } if(parseInt(n.days)){ $("#reminder_day_" + n.type).val(n.days); } }); }, error: function() {} }); } function generate_json_notif(attribute, $element) { var /* Create an object. */ obj = {}, /* Create a variable that references the current object (default → obj). */ ref = obj; /* Iterate over every input. */ $element.each(function() { /* Cache the id of the input. */ var id = this.id; /* Check whether the nodetype attribute is set to 'parent'. */ if (this.getAttribute(attribute) == "parent") { /* Set a new object to the property and set ref to refer to it. */ ref = obj[id] = {}; } else { /* Set the value of the input to the referred object. */ if (this.getAttribute(attribute) == "true") { if (isEmpty($(this).val()) && isEmpty($(this).text())) { ref[id] = ''; } else { ref[id] = isEmpty($(this).val().trim()) ? $(this).text().trim() : $(this).val().trim(); } } } }); /* Stringify the object and return it. */ return JSON.stringify(obj); } $(function() { $("[data-notification-status]").each(function() { $(this).on('switchChange.bootstrapSwitch', function(event, state) { $(this).val(state ? 1 : 0); }); }); readNotifTemplates(); readNotifReminder(); for (var i = 1; i <= 5; i++) { // alert("[lead-t"+i+"-parameter]"); $("[lead-t" + i + "-parameter]").each(function() { var cur_index = i; $(this).on('click', function() { // alert('#t_'+cur_index); $('#t_' + cur_index).insertAtCaret($(this).text()); $('#t_' + cur_index).trigger('focus'); }); }); } // $("[lead-t1-parameter]").each(function() { // $(this).on('click', function() { // $('#t_1').insertAtCaret($(this).text()); // $('#t_1').trigger('focus'); // }); // }); // $("[lead-t2-parameter]").each(function() { // $(this).on('click', function() { // $('#t_2').insertAtCaret($(this).text()); // $('#t_2').trigger('focus'); // }); // }); // $("[lead-t3-parameter]").each(function() { // $(this).on('click', function() { // $('#t_3').insertAtCaret($(this).text()); // $('#t_3').trigger('focus'); // }); // }); // $("[lead-t4-parameter]").each(function() { // $(this).on('click', function() { // $('#t_4').insertAtCaret($(this).text()); // $('#t_4').trigger('focus'); // }); // }); $('#btn_cnf_sms_save').on('click', function() { var $element = $("[json-cnf-notification]"); var json_data = generate_json_notif('json-cnf-notification', $element); var $element_reminder = $("[json-cnf-notification-rem]"); var json_data_reminder = generate_json('json-cnf-notification-rem', $element_reminder); // alert(json_data_reminder) // return false; return $.ajax({ url: "app/models/user.php", data: { model: 'update_notification_template', json_data: json_data, json_data_reminder:json_data_reminder }, type: "POST", dataType: 'json', beforeSend: function() { $('#btn_cnf_sms_save').prop( 'disabled', true); toastr.remove(); toastr.info("Saving..."); }, success: function(result) { if (parseInt(result.status) === 1) { toastr.remove(); toastr.success(result.message); $('#btn_cnf_sms_save').prop( 'disabled', false); } else { $('#btn_cnf_sms_save').prop( 'disabled', false); toastr.remove(); toastr.error(result.message); } }, error: function() { $('#btn_cnf_sms_save').prop( 'disabled', false); toastr.remove(); toastr.error( "Error has occurred. Try again." ) } }); }); $("input[data-bootstrap-switch]").each(function() { $(this).bootstrapSwitch('state', $(this).prop('checked')); }) }); </script>
| ver. 1.4 |
.
| PHP 7.3.33 | Generation time: 0 |
proxy
|
phpinfo
|
Settings