<?php /* Smarty version Smarty-3.1.7, created on 2025-02-27 21:22:27
         compiled from "/var/www/html/crm.fursysperu.com.pe/includes/runtime/../../layouts/vlayout2/modules/CTMobileSettings/CTMobileLicenseEdit.tpl" */ ?>
<?php /*%%SmartyHeaderCode:115953385467c0d793d54af8-05794382%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    'b3c20ae12bf3fd657a70a9997f8c468e29f4b1a3' => 
    array (
      0 => '/var/www/html/crm.fursysperu.com.pe/includes/runtime/../../layouts/vlayout2/modules/CTMobileSettings/CTMobileLicenseEdit.tpl',
      1 => 1740691107,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '115953385467c0d793d54af8-05794382',
  'function' => 
  array (
  ),
  'variables' => 
  array (
    'MODULE' => 0,
    'WIDTHTYPE' => 0,
    'LICENCE_KEY' => 0,
    'step' => 0,
  ),
  'has_nocache_code' => false,
  'version' => 'Smarty-3.1.7',
  'unifunc' => 'content_67c0d793dd498',
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_67c0d793dd498')) {function content_67c0d793dd498($_smarty_tpl) {?>

<style>
.imageHolder{
	background:white !important;
}

.containerCheck input[type="checkbox"]{
  margin: 8px 7px 0px 8px;
}
.containerCheck input[type="checkbox"]:checked::after {
  content:url('layouts/vlayout/skins/images/Enable.png');
}

.closebtn{
    position: absolute;
    float: right !important;
    background: transparent;
    border: transparent;
    /* color: #fff; */
    margin-left: 97%;
    font-size:18px;
}

#updateCRMTigerModal .modal.fade.in{
  left:40% !important;
  top:45% !important;
}
</style>


<link href="layouts/vlayout/modules/CTMobileSettings/popup.css" rel="stylesheet"><div class="container-fluid" id="EditConfigEditor"><div class="widget_header row-fluid"><div class="span6"><h3><?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['MODULE']->value;?>
<?php $_tmp1=ob_get_clean();?><?php echo vtranslate('CTMobile License Configuration',$_tmp1);?>
</h3></div><div class="span6"><button type="button" class="btn btn-info pull-right" style="background:#287DF2 !important;" onclick='window.location.href="<?php echo CTMobileSettings_Module_Model::$CTMOBILE_DETAILVIEW_URL;?>
"'><?php echo vtranslate('Go To CRMTiger Settings',$_smarty_tpl->tpl_vars['MODULE']->value);?>
</button></div></div><div class="contents"><table class="table table-bordered table-condensed themeTableColor"><tbody><tr><th colspan="2"><?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['MODULE']->value;?>
<?php $_tmp2=ob_get_clean();?><?php echo vtranslate('License Key Configuration',$_tmp2);?>
</th></tr><tr class="fieldLabel medium"><td width="30%" class="<?php echo $_smarty_tpl->tpl_vars['WIDTHTYPE']->value;?>
"><label class="muted pull-right marginRight10px"><span class="redColor">*</span><?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['MODULE']->value;?>
<?php $_tmp3=ob_get_clean();?><?php echo vtranslate('Enter License Key',$_tmp3);?>
</label></td><td  class="<?php echo $_smarty_tpl->tpl_vars['WIDTHTYPE']->value;?>
 fieldValue medium"><input class="inputElement" style="width:50%" type="text" name="License_Key" id="License_Key" value="<?php echo $_smarty_tpl->tpl_vars['LICENCE_KEY']->value;?>
"/></td></tr></tbody></table><br><div class="row-fluid"><div><strong><?php echo vtranslate('Note : If you\'re experience any problem in installation of CRMTiger Mobile Apps extensions.',$_smarty_tpl->tpl_vars['MODULE']->value);?>
</strong><br/><strong><a class="btn btn-success" href="https://kb.crmtiger.com/knowledge-base/crmtiger-mobileapps-extensions/" target="_blank"><?php echo vtranslate("Click here",$_smarty_tpl->tpl_vars['MODULE']->value);?>
</a> <?php echo vtranslate("to download and install manually one by one all updated extensions related to CRMTiger Mobile Apps for respected vTiger version.",$_smarty_tpl->tpl_vars['MODULE']->value);?>
</strong></div><div class="pull-right"><button type="button" class="btn btn-success saveButton" name="save_license_settings" id="save_license_settings"><strong><?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['MODULE']->value;?>
<?php $_tmp4=ob_get_clean();?><?php echo vtranslate('LBL_SAVE',$_tmp4);?>
</strong></button><a class="cancelLink" type="reset" onclick="javascript:window.history.back();"><?php echo vtranslate('Cancel',$_smarty_tpl->tpl_vars['MODULE']->value);?>
</a></div></div></div></div>


<!-- The Modal -->
  <div class="modal fade" id="updateCRMTigerModal" style="width: fit-content;
    max-height: fit-content;padding:0;">
    <div class="modal-dialog modal-dialog-centered">
      <div class="modal-content">
      
        <!-- Modal Header -->
        <!-- <div class="modal-header">
          <h4 class="modal-title">Modal Heading</h4>
          <button type="button" class="close" data-dismiss="modal">×</button>
        </div> -->
        
        <!-- Modal body -->
        <div class="modal-body">
        <button type="button" title="Close" class="closebtn" data-dismiss="modal">X</button>
          <div class="tabs">
            <form>
                <p class="tabWrapper">
                	  <label class="installHeadtext"><?php echo vtranslate('List of modules to install','CTMobileSetttings');?>
</label>
                    <label class="nextbtntxt"><?php echo vtranslate('Click Next >> button to install','CTMobileSetttings');?>
</label>
                    <input type="hidden" id="step" name="step" value="<?php echo $_smarty_tpl->tpl_vars['step']->value;?>
"/>
                    <label class="containerCheck"><?php echo vtranslate('Download Extension','CTMobileSetttings');?>

                        <input type="checkbox" name="step0" id="step0" <?php if ($_smarty_tpl->tpl_vars['step']->value-1>=0){?> checked <?php }?>>
                        <span class="checkmark"></span>
                      </label>
                    <label class="containerCheck"><?php echo vtranslate('CRMTiger Mobile Extension','CTMobileSetttings');?>

                        <input type="checkbox" name="step1" id="step1" <?php if ($_smarty_tpl->tpl_vars['step']->value-1>=1){?> checked <?php }?>>
                        <span class="checkmark"></span>
                      </label>
                      <label class="containerCheck"><?php echo vtranslate('Mobile Time Tracker','CTMobileSetttings');?>

                        <input type="checkbox" name="step2" id="step2" <?php if ($_smarty_tpl->tpl_vars['step']->value-1>=2){?> checked <?php }?>>
                        <span class="checkmark"></span>
                      </label>
                      <label class="containerCheck"><?php echo vtranslate('Time tracker report','CTMobileSetttings');?>

                        <input type="checkbox" name="step3" id="step3" <?php if ($_smarty_tpl->tpl_vars['step']->value-1>=3){?> checked <?php }?>>
                        <span class="checkmark"></span>
                      </label>
                      <label class="containerCheck"><?php echo vtranslate('Route Planner','CTMobileSetttings');?>

                        <input type="checkbox" name="step4" id="step4" <?php if ($_smarty_tpl->tpl_vars['step']->value-1>=4){?> checked <?php }?>>
                        <span class="checkmark"></span>
                      </label>
                      <label class="containerCheck"><?php echo vtranslate('Route Tracking','CTMobileSetttings');?>

                        <input type="checkbox" name="step5" id="step5" <?php if ($_smarty_tpl->tpl_vars['step']->value-1>=5){?> checked <?php }?>>
                        <span class="checkmark"></span>
                      </label>
                      <label class="containerCheck"><?php echo vtranslate('Mobile Attendance','CTMobileSetttings');?>

                        <input type="checkbox" name="step6" id="step6" <?php if ($_smarty_tpl->tpl_vars['step']->value-1>=6){?> checked <?php }?>>
                        <span class="checkmark"></span>
                      </label>
                      <label class="containerCheck"><?php echo vtranslate('Key Metrics','CTMobileSetttings');?>

                        <input type="checkbox" name="step7" id="step7" <?php if ($_smarty_tpl->tpl_vars['step']->value-1>=7){?> checked <?php }?>>
                        <span class="checkmark"></span>
                      </label>
                      <label class="containerCheck"><?php echo vtranslate('SMS/Email Templates','CTMobileSetttings');?>

                        <input type="checkbox" name="step8" id="step8" <?php if ($_smarty_tpl->tpl_vars['step']->value-1>=8){?> checked <?php }?>>
                        <span class="checkmark"></span>
                      </label>  
                      <label class="containerCheck"><?php echo vtranslate('Mobile Push Notification','CTMobileSetttings');?>

                        <input type="checkbox" name="step9" id="step9" <?php if ($_smarty_tpl->tpl_vars['step']->value-1>=9){?> checked <?php }?>>
                        <span class="checkmark"></span>
                      </label>  
                </p>
              </form>
          </div>
          <div class="progressContain">
            <div class="progressbar-container">
                <button type="button" class="close" data-dismiss="modal">×</button>
                <p><?php echo vtranslate('View Installation Progress','CTMobileSetttings');?>
</p>
                <div class="progressbar-bar"><div class="progressbar-label"></div></div>
                <p class="progressContent"></p>
              </div>
              <div class="btnWrapper">
                <!-- <button type="button" class="btn btn-secondary btn-sm"><?php echo vtranslate('Cancel','CTMobileSetttings');?>
</button> -->
                <button type="button" id="nextbtn" class="btn btn-primary btn-sm"><?php if ($_smarty_tpl->tpl_vars['step']->value>=10){?><?php echo vtranslate('Finish','CTMobileSetttings');?>
 <?php }else{ ?> <?php echo vtranslate('Next','CTMobileSetttings');?>
 <?php }?></button>
              </div>
              <div class="installationinsdiv">
                <center><p><?php echo vtranslate('Issue in installation ?','CTMobileSetttings');?>
 <a style="color:#15c;" href="https://kb.crmtiger.com/knowledge-base/crmtiger-mobileapps-extensions/" target="_blank"><?php echo vtranslate('Click here','CTMobileSetttings');?>
</a> <?php echo vtranslate('to download extension','CTMobileSetttings');?>
</p>
                <p><?php echo vtranslate('OR','CTMobileSetttings');?>
</p>
                <p><a href="#" id="createTickets" style="color:#15c;"><?php echo vtranslate('Click here','CTMobileSetttings');?>
</a> <?php echo vtranslate('to send error','CTMobileSetttings');?>
</p></center>
              </div>
          </div>
        </div>
        
      </div>
    </div>
  </div>


  <script>
    $(document).ready(function () {
  // get box count
  var count = 0;
  var checked = 0;
  function countBoxes() {
    count = $("input[type='checkbox']").length;
  }
  $("input[type='checkbox']").prop('disabled',true);
  countBoxes();
  $(":checkbox").click(countBoxes);

  // count checks

  function countChecked() {
    checked = $("input:checked").length;

    var percentage = parseInt((checked / count) * 100, 10);
    $(".progressbar-bar").progressbar({
      value: percentage
    });
    $(".progressbar-label").text(percentage + "%");
  }

  countChecked();
  $(":checkbox").click(countChecked);

  jQuery('#nextbtn').click(function(){

	  var step = parseInt(jQuery('#step').val());

	  if(step >= 10){
	  	 location.href="index.php?module=CTMobileSettings&parent=Settings&view=Details";
	  	 //location.reload();
	  }else{
		  var progressIndicatorElement = jQuery.progressIndicator({
			'position' : 'html',
			'blockInfo' : {
				'enabled' : true
			}
		  });
		  var postData = {
			"module": 'CTMobileSettings',
			"action": 'StepAjax',
			"step": step
			};
			AppConnector.request(postData).then(function(response) {
					progressIndicatorElement.progressIndicator({'mode' : 'hide'});
					var step = parseInt(jQuery('#step').val());
					jQuery('#step'+step).prop('checked',true);
					countChecked();
					if(step+1 >= 10){
             jQuery('#nextbtn').text(app.vtranslate('Finish'));
          }
					jQuery('#step').val(step+1);	
				},
				function(error,err){
					
				}
			);
	  }
  });

  jQuery('#createTickets').click(function(){
      var step = parseInt(jQuery('#step').val());
      var progressIndicatorElement = jQuery.progressIndicator({
      'position' : 'html',
      'blockInfo' : {
        'enabled' : true
      }
    });
    var postData = {
      "module": 'CTMobileSettings',
      "action": 'CreateTickets',
      "step": step
      };

    AppConnector.request(postData).then(function(response) {
      progressIndicatorElement.progressIndicator({'mode' : 'hide'});
      var params = {
        title : app.vtranslate('success'),
        text: app.vtranslate('Error Sent successfully'),
        animation: 'show',
        type: 'success'
      };
      Vtiger_Helper_Js.showPnotify(params);
    });
  });


});



</script>
 



<?php }} ?>