234 lines
14 KiB
PHP
234 lines
14 KiB
PHP
|
|
<?php /* Smarty version Smarty-3.1.7, created on 2025-09-29 13:38:43
|
||
|
|
compiled from "/var/www/fastuser/data/www/crm.clientright.ru/includes/runtime/../../layouts/v7/modules/Settings/Workflow2/VT7/SettingsScheduler.tpl" */ ?>
|
||
|
|
<?php /*%%SmartyHeaderCode:93267492968da61b36d7f64-22556629%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
|
||
|
|
$_valid = $_smarty_tpl->decodeProperties(array (
|
||
|
|
'file_dependency' =>
|
||
|
|
array (
|
||
|
|
'0cc4304e31280ae75b39da5a7e3c4f29e461ccb1' =>
|
||
|
|
array (
|
||
|
|
0 => '/var/www/fastuser/data/www/crm.clientright.ru/includes/runtime/../../layouts/v7/modules/Settings/Workflow2/VT7/SettingsScheduler.tpl',
|
||
|
|
1 => 1711810493,
|
||
|
|
2 => 'file',
|
||
|
|
),
|
||
|
|
),
|
||
|
|
'nocache_hash' => '93267492968da61b36d7f64-22556629',
|
||
|
|
'function' =>
|
||
|
|
array (
|
||
|
|
),
|
||
|
|
'variables' =>
|
||
|
|
array (
|
||
|
|
'SHOW_CRON_NOTICE' => 0,
|
||
|
|
'schedules' => 0,
|
||
|
|
'modulename' => 0,
|
||
|
|
'crons' => 0,
|
||
|
|
'cron' => 0,
|
||
|
|
'workflow_id' => 0,
|
||
|
|
'workflows' => 0,
|
||
|
|
'module_name' => 0,
|
||
|
|
'module' => 0,
|
||
|
|
'workflow' => 0,
|
||
|
|
'currentUTCTime' => 0,
|
||
|
|
'CURRENT_VERSION' => 0,
|
||
|
|
),
|
||
|
|
'has_nocache_code' => false,
|
||
|
|
'version' => 'Smarty-3.1.7',
|
||
|
|
'unifunc' => 'content_68da61b373a9a',
|
||
|
|
),false); /*/%%SmartyHeaderCode%%*/?>
|
||
|
|
<?php if ($_valid && !is_callable('content_68da61b373a9a')) {function content_68da61b373a9a($_smarty_tpl) {?><div class="container-fluid WorkflowSchedulerContainer" id="moduleManagerContents">
|
||
|
|
<div class="editViewHeader">
|
||
|
|
<h4>
|
||
|
|
<a href="index.php?module=Workflow2&view=Index&parent=Settings"><?php echo vtranslate('Workflow Designer','Workflow2');?>
|
||
|
|
</a> »
|
||
|
|
<?php echo vtranslate('LBL_SETTINGS_SCHEDULER','Workflow2');?>
|
||
|
|
|
||
|
|
</h4>
|
||
|
|
</div>
|
||
|
|
<hr/>
|
||
|
|
|
||
|
|
<div class="listViewActionsDiv">
|
||
|
|
<div class="alert alert-info">
|
||
|
|
<?php echo sprintf(vtranslate('To give you the most power, scheduled Workflows are configured like a cronjob in Unix based systems. You found a generator and information here: %s','Settings:Workflow2'),'<a href="http://www.openjs.com/scripts/jslibrary/demos/crontab.php" target="_blank"><strong>http://www.openjs.com/scripts/jslibrary/demos/crontab.php</strong></a>');?>
|
||
|
|
|
||
|
|
</div>
|
||
|
|
<?php if ($_smarty_tpl->tpl_vars['SHOW_CRON_NOTICE']->value==true){?>
|
||
|
|
<div class="alert alert-danger">
|
||
|
|
<strong><?php echo vtranslate('Unless you configure Cronjobs of VtigerCRM this feature will NOT work.','Settings:Workflow2');?>
|
||
|
|
</strong> <a class="btn btn-primary" href="https://wiki.vtiger.com/index.php/Cron" target="_blank"><?php echo ucfirst(vtranslate('open','Settings:Workflow2'));?>
|
||
|
|
<?php echo vtranslate('Information','Settings:Workflow2');?>
|
||
|
|
</strong></a>
|
||
|
|
</div>
|
||
|
|
<?php }?>
|
||
|
|
|
||
|
|
<?php if (count($_smarty_tpl->tpl_vars['schedules']->value)==0){?>
|
||
|
|
No Schedules configured
|
||
|
|
<?php }else{ ?>
|
||
|
|
<table cellspacing="0" class='table'>
|
||
|
|
<tr class="listViewHeaders">
|
||
|
|
<th></th>
|
||
|
|
<th><?php echo vtranslate('Workflow','Settings:Workflow2');?>
|
||
|
|
</th>
|
||
|
|
<th style="width:140px;"></th>
|
||
|
|
<th style="width:100px;"><?php echo vtranslate('Load Preset','Settings:Workflow2');?>
|
||
|
|
</th>
|
||
|
|
<th style="width:100px;"><?php echo vtranslate('LBL_MINUTES','Settings:Workflow2');?>
|
||
|
|
</th>
|
||
|
|
<th style="width:100px;"><?php echo vtranslate('LBL_HOURS','Settings:Workflow2');?>
|
||
|
|
</th>
|
||
|
|
<th style="width:100px;"><?php echo vtranslate('Day of Month','Settings:Workflow2');?>
|
||
|
|
</th>
|
||
|
|
<th style="width:100px;"><?php echo vtranslate('Month','Settings:Workflow2');?>
|
||
|
|
</th>
|
||
|
|
<th style="width:100px;"><?php echo vtranslate('Day of Week','Settings:Workflow2');?>
|
||
|
|
</th>
|
||
|
|
<th style="width:100px;"><?php echo vtranslate('Year','Settings:Workflow2');?>
|
||
|
|
</th>
|
||
|
|
<th style="width:100px;"><?php echo vtranslate('Timezone','Settings:Workflow2');?>
|
||
|
|
</th>
|
||
|
|
<th></th>
|
||
|
|
</tr>
|
||
|
|
|
||
|
|
<?php $_smarty_tpl->tpl_vars['crons'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['crons']->_loop = false;
|
||
|
|
$_smarty_tpl->tpl_vars['modulename'] = new Smarty_Variable;
|
||
|
|
$_from = $_smarty_tpl->tpl_vars['schedules']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
|
||
|
|
foreach ($_from as $_smarty_tpl->tpl_vars['crons']->key => $_smarty_tpl->tpl_vars['crons']->value){
|
||
|
|
$_smarty_tpl->tpl_vars['crons']->_loop = true;
|
||
|
|
$_smarty_tpl->tpl_vars['modulename']->value = $_smarty_tpl->tpl_vars['crons']->key;
|
||
|
|
?>
|
||
|
|
<tr>
|
||
|
|
<th colspan="12"><?php echo vtranslate($_smarty_tpl->tpl_vars['modulename']->value,$_smarty_tpl->tpl_vars['modulename']->value);?>
|
||
|
|
</th>
|
||
|
|
</tr>
|
||
|
|
<?php $_smarty_tpl->tpl_vars['cron'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['cron']->_loop = false;
|
||
|
|
$_from = $_smarty_tpl->tpl_vars['crons']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
|
||
|
|
foreach ($_from as $_smarty_tpl->tpl_vars['cron']->key => $_smarty_tpl->tpl_vars['cron']->value){
|
||
|
|
$_smarty_tpl->tpl_vars['cron']->_loop = true;
|
||
|
|
?>
|
||
|
|
<tr class="cronRow cronRow_<?php echo $_smarty_tpl->tpl_vars['cron']->value['id'];?>
|
||
|
|
FirstSchedulerRow <?php if ($_smarty_tpl->tpl_vars['cron']->value['active']=='1'){?>active<?php }else{ ?>inactive<?php }?> <?php if (empty($_smarty_tpl->tpl_vars['cron']->value['workflow_id'])){?>noworkflow<?php }?>" data-id="<?php echo $_smarty_tpl->tpl_vars['cron']->value['id'];?>
|
||
|
|
">
|
||
|
|
<td style="width: 70px;vertical-align: middle;">
|
||
|
|
<select data-sid='<?php echo $_smarty_tpl->tpl_vars['cron']->value['id'];?>
|
||
|
|
' data-field='active' style="width: 70px;margin: 0;">
|
||
|
|
<option value='0' <?php if ($_smarty_tpl->tpl_vars['cron']->value['active']=='0'){?>selected="selected"<?php }?>><?php echo vtranslate('LBL_INACTIVE','Settings:Workflow2');?>
|
||
|
|
</option>
|
||
|
|
<option value='1' <?php if ($_smarty_tpl->tpl_vars['cron']->value['active']=='1'){?>selected="selected"<?php }?>><?php echo vtranslate('LBL_ACTIVE','Settings:Workflow2');?>
|
||
|
|
</option>
|
||
|
|
</select>
|
||
|
|
</td>
|
||
|
|
<td style="width: 230px;vertical-align: middle;">
|
||
|
|
<select data-sid='<?php echo $_smarty_tpl->tpl_vars['cron']->value['id'];?>
|
||
|
|
' data-field='workflow_id' class="select2" style="width: 230px;" id="workflowSelection_<?php echo $_smarty_tpl->tpl_vars['cron']->value['id'];?>
|
||
|
|
">
|
||
|
|
<option value='0' <?php if ($_smarty_tpl->tpl_vars['workflow_id']->value=='0'){?>selected="selected"<?php }?>><?php echo vtranslate('LBL_NO_WORKFLOW','Settings:Workflow2');?>
|
||
|
|
</option>
|
||
|
|
<?php $_smarty_tpl->tpl_vars['module'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['module']->_loop = false;
|
||
|
|
$_smarty_tpl->tpl_vars['module_name'] = new Smarty_Variable;
|
||
|
|
$_from = $_smarty_tpl->tpl_vars['workflows']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
|
||
|
|
foreach ($_from as $_smarty_tpl->tpl_vars['module']->key => $_smarty_tpl->tpl_vars['module']->value){
|
||
|
|
$_smarty_tpl->tpl_vars['module']->_loop = true;
|
||
|
|
$_smarty_tpl->tpl_vars['module_name']->value = $_smarty_tpl->tpl_vars['module']->key;
|
||
|
|
?>
|
||
|
|
<optgroup label='<?php echo $_smarty_tpl->tpl_vars['module_name']->value;?>
|
||
|
|
'>
|
||
|
|
<?php $_smarty_tpl->tpl_vars['workflow'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['workflow']->_loop = false;
|
||
|
|
$_smarty_tpl->tpl_vars['workflow_id'] = new Smarty_Variable;
|
||
|
|
$_from = $_smarty_tpl->tpl_vars['module']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
|
||
|
|
foreach ($_from as $_smarty_tpl->tpl_vars['workflow']->key => $_smarty_tpl->tpl_vars['workflow']->value){
|
||
|
|
$_smarty_tpl->tpl_vars['workflow']->_loop = true;
|
||
|
|
$_smarty_tpl->tpl_vars['workflow_id']->value = $_smarty_tpl->tpl_vars['workflow']->key;
|
||
|
|
?>
|
||
|
|
<option data-module="<?php echo $_smarty_tpl->tpl_vars['workflow']->value['module_name'];?>
|
||
|
|
" value='<?php echo $_smarty_tpl->tpl_vars['workflow_id']->value;?>
|
||
|
|
' <?php if ($_smarty_tpl->tpl_vars['workflow_id']->value==$_smarty_tpl->tpl_vars['cron']->value['workflow_id']){?>selected="selected"<?php }?>><?php echo $_smarty_tpl->tpl_vars['workflow']->value['title'];?>
|
||
|
|
</option>
|
||
|
|
<?php } ?>
|
||
|
|
</optgroup>
|
||
|
|
<?php } ?>
|
||
|
|
</select>
|
||
|
|
</td>
|
||
|
|
<td>
|
||
|
|
<input type="checkbox" data-sid='<?php echo $_smarty_tpl->tpl_vars['cron']->value['id'];?>
|
||
|
|
' data-field='enable_records' name="choose_records" value="1" <?php if ($_smarty_tpl->tpl_vars['cron']->value['enable_records']==1){?>checked="checked"<?php }?> />
|
||
|
|
<input type="hidden" class="configField" name="records_<?php echo $_smarty_tpl->tpl_vars['cron']->value['id'];?>
|
||
|
|
" id="records_<?php echo $_smarty_tpl->tpl_vars['cron']->value['id'];?>
|
||
|
|
" data-sid='<?php echo $_smarty_tpl->tpl_vars['cron']->value['id'];?>
|
||
|
|
' data-field='condition' value="<?php echo $_smarty_tpl->tpl_vars['cron']->value['condition'];?>
|
||
|
|
" />
|
||
|
|
<input type="button" class="btn btn-default RecordChooseBtn" data-sid='<?php echo $_smarty_tpl->tpl_vars['cron']->value['id'];?>
|
||
|
|
' onclick="" value="<?php echo vtranslate('select Records','Settings:Workflow2');?>
|
||
|
|
" />
|
||
|
|
</td>
|
||
|
|
<td style="vertical-align: middle;">
|
||
|
|
<select class="CronPreset select2" style="width:150px;">
|
||
|
|
<option value=""></option>
|
||
|
|
<option value="0;6;*;*;*;*"><?php echo vtranslate('Daily','Settings:Workflow2');?>
|
||
|
|
</option>
|
||
|
|
<option value="0;6;*;*;Mon-Fri;*"><?php echo vtranslate('Workdays once','Settings:Workflow2');?>
|
||
|
|
</option>
|
||
|
|
<option value="0;*;*;*;Mon-Fri;*"><?php echo vtranslate('Workdays hourly','Settings:Workflow2');?>
|
||
|
|
</option>
|
||
|
|
<option value="0;6;*;*;Mon;*"><?php echo vtranslate('Every Monday','Settings:Workflow2');?>
|
||
|
|
</option>
|
||
|
|
<option value="0;6;1;*;*;*"><?php echo vtranslate('Monthly first day','Settings:Workflow2');?>
|
||
|
|
</option>
|
||
|
|
</select>
|
||
|
|
</td>
|
||
|
|
<td style="vertical-align: middle;"><input type="text" class="defaultTextfield" style='width: 100%;margin: 0;' data-sid='<?php echo $_smarty_tpl->tpl_vars['cron']->value['id'];?>
|
||
|
|
' data-field='minute' value='<?php echo $_smarty_tpl->tpl_vars['cron']->value['minute'];?>
|
||
|
|
'></td>
|
||
|
|
<td style="vertical-align: middle;"><input type="text" class="defaultTextfield" style='width: 100%;margin: 0;' data-sid='<?php echo $_smarty_tpl->tpl_vars['cron']->value['id'];?>
|
||
|
|
' data-field='hour' value='<?php echo $_smarty_tpl->tpl_vars['cron']->value['hour'];?>
|
||
|
|
'></td>
|
||
|
|
<td style="vertical-align: middle;"><input type="text" class="defaultTextfield" style='width: 100%;margin: 0;' data-sid='<?php echo $_smarty_tpl->tpl_vars['cron']->value['id'];?>
|
||
|
|
' data-field='dom' value='<?php echo $_smarty_tpl->tpl_vars['cron']->value['dom'];?>
|
||
|
|
'></td>
|
||
|
|
<td style="vertical-align: middle;"><input type="text" class="defaultTextfield" style='width: 100%;margin: 0;' data-sid='<?php echo $_smarty_tpl->tpl_vars['cron']->value['id'];?>
|
||
|
|
' data-field='month' value='<?php echo $_smarty_tpl->tpl_vars['cron']->value['month'];?>
|
||
|
|
'></td>
|
||
|
|
<td style="vertical-align: middle;"><input type="text" class="defaultTextfield" style='width: 100%;margin: 0;' data-sid='<?php echo $_smarty_tpl->tpl_vars['cron']->value['id'];?>
|
||
|
|
' data-field='dow' value='<?php echo $_smarty_tpl->tpl_vars['cron']->value['dow'];?>
|
||
|
|
'></td>
|
||
|
|
<td style="vertical-align: middle;"><input type="text" class="defaultTextfield" style='width: 100%;margin: 0;' data-sid='<?php echo $_smarty_tpl->tpl_vars['cron']->value['id'];?>
|
||
|
|
' data-field='year' value='<?php echo $_smarty_tpl->tpl_vars['cron']->value['year'];?>
|
||
|
|
'></td>
|
||
|
|
<td style="vertical-align: middle;">
|
||
|
|
<select class="select2" style="width:160px"data-field='timezone' data-sid='<?php echo $_smarty_tpl->tpl_vars['cron']->value['id'];?>
|
||
|
|
'>
|
||
|
|
<option value="UTC">UTC</option>
|
||
|
|
<option value="default" <?php if ($_smarty_tpl->tpl_vars['cron']->value['timezone']=='default'){?>selected="selected"<?php }?>>CRM Default Timezone</option>
|
||
|
|
</select>
|
||
|
|
</td>
|
||
|
|
<td style="width: 60px;vertical-align: middle;"><a href="#" onclick='Scheduler.delScheduler(<?php echo $_smarty_tpl->tpl_vars['cron']->value['id'];?>
|
||
|
|
);return false;'><?php echo vtranslate('delete','Settings:Workflow2');?>
|
||
|
|
</a></td>
|
||
|
|
</tr>
|
||
|
|
<tr class="cronRow cronRow_<?php echo $_smarty_tpl->tpl_vars['cron']->value['id'];?>
|
||
|
|
SecondSchedulerRow <?php if ($_smarty_tpl->tpl_vars['cron']->value['active']=='1'){?>active<?php }else{ ?>inactive<?php }?> <?php if (empty($_smarty_tpl->tpl_vars['cron']->value['workflow_id'])){?>noworkflow<?php }?>">
|
||
|
|
<td colspan="3" style="border-top:none !important;"></td>
|
||
|
|
<td colspan="9" style="border-top:none !important;"><?php echo vtranslate('Next execution:','Settings:Workflow2');?>
|
||
|
|
<span class="NextExecutionTimer"><?php echo $_smarty_tpl->tpl_vars['cron']->value['next_execution'];?>
|
||
|
|
<?php echo $_smarty_tpl->tpl_vars['cron']->value['timezone_display'];?>
|
||
|
|
</span></td>
|
||
|
|
</tr>
|
||
|
|
<?php } ?>
|
||
|
|
<?php } ?>
|
||
|
|
</table>
|
||
|
|
<?php }?>
|
||
|
|
<strong><?php echo vtranslate('To enter specific hours, you need to use UTC timezone!','Settings:Workflow2');?>
|
||
|
|
(<?php echo vtranslate('Current time in UTC','Settings:Workflow2');?>
|
||
|
|
: <?php echo $_smarty_tpl->tpl_vars['currentUTCTime']->value;?>
|
||
|
|
)</strong>
|
||
|
|
<br/>
|
||
|
|
<br/>
|
||
|
|
<button class='btn btn-primary' type="button" onclick='Scheduler.newScheduler();'><strong><?php echo vtranslate('new Entry','Settings:Workflow2');?>
|
||
|
|
</strong></button>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
<script type="text/javascript">
|
||
|
|
var WFDTexts = {
|
||
|
|
'Choose Records' : '<?php echo vtranslate('Choose Records','Settings:Workflow2');?>
|
||
|
|
',
|
||
|
|
};
|
||
|
|
</script>
|
||
|
|
<script type="text/javascript" src="modules/Workflow2/views/resources/js/complexecondition.js?v=<?php echo $_smarty_tpl->tpl_vars['CURRENT_VERSION']->value;?>
|
||
|
|
"></script><?php }} ?>
|