- Создан API create_document_with_text.php для создания DOCX/XLSX/PPTX с текстом от AI - Поддержка Markdown форматирования (заголовки, жирный, курсив, списки, код) - Установлен PHPWord для красивого форматирования документов - Исправлены пути сохранения (crm2/CRM_Active_Files/... без /crm/ в начале) - Замена пробелов на подчеркивания в именах папок - Создана документация для AI и разработчиков - Добавлены API для работы с шаблонами Nextcloud
194 lines
10 KiB
PHP
194 lines
10 KiB
PHP
<?php /* Smarty version Smarty-3.1.7, created on 2025-11-10 22:07:46
|
|
compiled from "/var/www/fastuser/data/www/crm.clientright.ru/includes/runtime/../../layouts/v7/modules/Settings/Workflow2/taskforms/WfTaskStart.tpl" */ ?>
|
|
<?php /*%%SmartyHeaderCode:145883873469123802ddd8d3-59404016%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
|
|
$_valid = $_smarty_tpl->decodeProperties(array (
|
|
'file_dependency' =>
|
|
array (
|
|
'3520cc4c08aff3d5dd0a887fc61c00be04fca3d2' =>
|
|
array (
|
|
0 => '/var/www/fastuser/data/www/crm.clientright.ru/includes/runtime/../../layouts/v7/modules/Settings/Workflow2/taskforms/WfTaskStart.tpl',
|
|
1 => 1711810493,
|
|
2 => 'file',
|
|
),
|
|
),
|
|
'nocache_hash' => '145883873469123802ddd8d3-59404016',
|
|
'function' =>
|
|
array (
|
|
),
|
|
'variables' =>
|
|
array (
|
|
'MOD' => 0,
|
|
'task' => 0,
|
|
'trigger' => 0,
|
|
'keyLabel' => 0,
|
|
'triggerlist' => 0,
|
|
'triggerData' => 0,
|
|
'timezones' => 0,
|
|
'tzkey' => 0,
|
|
'label' => 0,
|
|
'formGenerator' => 0,
|
|
'conditionalContent' => 0,
|
|
),
|
|
'has_nocache_code' => false,
|
|
'version' => 'Smarty-3.1.7',
|
|
'unifunc' => 'content_69123802def54',
|
|
),false); /*/%%SmartyHeaderCode%%*/?>
|
|
<?php if ($_valid && !is_callable('content_69123802def54')) {function content_69123802def54($_smarty_tpl) {?><table border="0" cellpadding="5" cellspacing="0" width="100%" class="newTable small">
|
|
<tr>
|
|
<td class='dvtCellLabel' align="right" width=15% nowrap="nowrap"><?php echo $_smarty_tpl->tpl_vars['MOD']->value['LBL_RUNTIME_WORKFLOW'];?>
|
|
</td>
|
|
<td class='dvtCellInfo'>
|
|
<select name="task[start]" class="select2" style="width:350px;">
|
|
<option value="synchron" <?php if ($_smarty_tpl->tpl_vars['task']->value['start']=="synchron"){?>selected='selected'<?php }?>><?php echo $_smarty_tpl->tpl_vars['MOD']->value['LBL_SYNCHRONOUS'];?>
|
|
</option>
|
|
<option value="asynchron" <?php if ($_smarty_tpl->tpl_vars['task']->value['start']=="asynchron"){?>selected='selected'<?php }?>><?php echo $_smarty_tpl->tpl_vars['MOD']->value['LBL_ASYNCHRONOUS'];?>
|
|
</option>
|
|
</select>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class='dvtCellLabel' align="right" width=15% nowrap="nowrap"><?php echo $_smarty_tpl->tpl_vars['MOD']->value['LBL_START_CONDITION'];?>
|
|
</td>
|
|
<td class='dvtCellInfo'>
|
|
<select name="task[runtime]" id="runtimeSelection" class="select2" style="width:350px;float:left;margin-right:10px;">
|
|
<?php $_smarty_tpl->tpl_vars['triggerlist'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['triggerlist']->_loop = false;
|
|
$_smarty_tpl->tpl_vars['keyLabel'] = new Smarty_Variable;
|
|
$_from = $_smarty_tpl->tpl_vars['trigger']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
|
|
foreach ($_from as $_smarty_tpl->tpl_vars['triggerlist']->key => $_smarty_tpl->tpl_vars['triggerlist']->value){
|
|
$_smarty_tpl->tpl_vars['triggerlist']->_loop = true;
|
|
$_smarty_tpl->tpl_vars['keyLabel']->value = $_smarty_tpl->tpl_vars['triggerlist']->key;
|
|
?>
|
|
<optgroup label="<?php echo $_smarty_tpl->tpl_vars['keyLabel']->value;?>
|
|
">
|
|
<?php $_smarty_tpl->tpl_vars['triggerData'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['triggerData']->_loop = false;
|
|
$_smarty_tpl->tpl_vars['trigger'] = new Smarty_Variable;
|
|
$_from = $_smarty_tpl->tpl_vars['triggerlist']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
|
|
foreach ($_from as $_smarty_tpl->tpl_vars['triggerData']->key => $_smarty_tpl->tpl_vars['triggerData']->value){
|
|
$_smarty_tpl->tpl_vars['triggerData']->_loop = true;
|
|
$_smarty_tpl->tpl_vars['trigger']->value = $_smarty_tpl->tpl_vars['triggerData']->key;
|
|
?>
|
|
<option data-description="<?php echo $_smarty_tpl->tpl_vars['triggerData']->value['description'];?>
|
|
" value="<?php echo $_smarty_tpl->tpl_vars['trigger']->value;?>
|
|
" <?php if ($_smarty_tpl->tpl_vars['task']->value['runtime']==$_smarty_tpl->tpl_vars['trigger']->value){?>selected="selected"<?php }?>><?php echo $_smarty_tpl->tpl_vars['triggerData']->value['label'];?>
|
|
</option>
|
|
<?php } ?>
|
|
</optgroup>
|
|
<?php } ?>
|
|
|
|
</select>
|
|
<div id="triggerDescription"></div>
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class='dvtCellLabel' align="right" width=15% nowrap="nowrap"><?php echo $_smarty_tpl->tpl_vars['MOD']->value['LBL_PARALLEL_ALLOWED'];?>
|
|
</td>
|
|
<td class='dvtCellInfo'>
|
|
<select name="task[runtime2]" class="select2" style="width:350px;">
|
|
<option value="2" <?php if ($_smarty_tpl->tpl_vars['task']->value['runtime2']=="2"){?>selected='selected'<?php }?>><?php echo $_smarty_tpl->tpl_vars['MOD']->value['LBL_PARALLEL_NOT_ALLOW'];?>
|
|
</option>
|
|
<option value="1" <?php if ($_smarty_tpl->tpl_vars['task']->value['runtime2']=="1"){?>selected='selected'<?php }?>><?php echo $_smarty_tpl->tpl_vars['MOD']->value['LBL_PARALLEL_ALLOW'];?>
|
|
</option>
|
|
</select>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class='dvtCellLabel' align="right" width=15% nowrap="nowrap"><?php echo vtranslate('use this Timezone for workflow','Settings:Workflow2');?>
|
|
</td>
|
|
<td class='dvtCellInfo'>
|
|
<select name="task[timezone]" class="select2" style="width:350px;" placeholder="<?php echo vtranslate('Do not modify timezone','Settings:Workflow2');?>
|
|
">
|
|
<option value=""></option>
|
|
<?php $_smarty_tpl->tpl_vars['label'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['label']->_loop = false;
|
|
$_smarty_tpl->tpl_vars['tzkey'] = new Smarty_Variable;
|
|
$_from = $_smarty_tpl->tpl_vars['timezones']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
|
|
foreach ($_from as $_smarty_tpl->tpl_vars['label']->key => $_smarty_tpl->tpl_vars['label']->value){
|
|
$_smarty_tpl->tpl_vars['label']->_loop = true;
|
|
$_smarty_tpl->tpl_vars['tzkey']->value = $_smarty_tpl->tpl_vars['label']->key;
|
|
?>
|
|
<option value="<?php echo $_smarty_tpl->tpl_vars['tzkey']->value;?>
|
|
" <?php if ($_smarty_tpl->tpl_vars['task']->value['timezone']==$_smarty_tpl->tpl_vars['tzkey']->value){?>selected="selected"<?php }?>><?php echo vtranslate($_smarty_tpl->tpl_vars['label']->value,'Users');?>
|
|
</option>
|
|
<?php } ?>
|
|
</select>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class='dvtCellLabel' align="right" width=15% nowrap="nowrap"><input type="checkbox" name="task[execute_only_once_per_record]" value="1" <?php if ($_smarty_tpl->tpl_vars['task']->value['execute_only_once_per_record']==true){?>checked="checked"<?php }?> /></td>
|
|
<td class='dvtCellInfo'>
|
|
<?php echo vtranslate('LBL_EXECUTE_WORKFLOW_ONLY_ONCE_PER_RECORD','Settings:Workflow2');?>
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class='dvtCellLabel' align="right" width=15% nowrap="nowrap"><input type="checkbox" name="task[withoutrecord]" value="1" <?php if ($_smarty_tpl->tpl_vars['task']->value['withoutrecord']==true){?>checked="checked"<?php }?> /></td>
|
|
<td class='dvtCellInfo'>
|
|
<?php echo vtranslate('allow execution without a related record','Settings:Workflow2');?>
|
|
(<strong><?php echo vtranslate('read documentation for more information','Settings:Workflow2');?>
|
|
</strong>)
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class='dvtCellLabel' valign="top" align="right" width=15% nowrap="nowrap"><input type="checkbox" name="task[collection_process]" value="1" onclick="jQuery('#collection_variable_div').css('display', jQuery(this).prop('checked') ? 'block' : 'none');" <?php if ($_smarty_tpl->tpl_vars['task']->value['collection_process']==true){?>checked="checked"<?php }?> /></td>
|
|
<td class='dvtCellInfo'>
|
|
<?php echo vtranslate('execute process only once with all checked records in listview','Settings:Workflow2');?>
|
|
(<strong><?php echo vtranslate('read documentation for more information','Settings:Workflow2');?>
|
|
</strong>)
|
|
<div style="display:<?php if ($_smarty_tpl->tpl_vars['task']->value['collection_process']==true){?>block<?php }else{ ?>none<?php }?>" id="collection_variable_div">
|
|
<?php echo vtranslate('Inject all Record IDs within this $env Variable','Workflow2');?>
|
|
: <input type="text" name="task[collection_variable]" value="<?php echo $_smarty_tpl->tpl_vars['task']->value['collection_variable'];?>
|
|
" />
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class='dvtCellLabel' align="right" width=15% nowrap="nowrap"><input type="checkbox" name="task[nologging]" value="1" <?php if ($_smarty_tpl->tpl_vars['task']->value['nologging']==true){?>checked="checked"<?php }?> /></td>
|
|
<td class='dvtCellInfo'>
|
|
<?php echo vtranslate('Do not store execution log of this workflow in statistics.','Settings:Workflow2');?>
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
|
|
<!--
|
|
<tr>
|
|
<td class='dvtCellLabel' align="right" width=15% nowrap="nowrap"><?php echo $_smarty_tpl->tpl_vars['MOD']->value['LBL_USER_EXECUTE'];?>
|
|
</td>
|
|
<td class='dvtCellInfo'>
|
|
<select name="task[execution_user]">
|
|
<option value="0x0" <?php if ($_smarty_tpl->tpl_vars['task']->value['execution_user']=="0x0"){?>selected='selected'<?php }?>><?php echo $_smarty_tpl->tpl_vars['MOD']->value['LBL_START_USER'];?>
|
|
</option>
|
|
</select>
|
|
</td>
|
|
</tr>
|
|
-->
|
|
</table>
|
|
<?php if ($_smarty_tpl->tpl_vars['task']->value['runtime']!='WF2_FRONTENDTRIGGER'){?>
|
|
<h5 class="big" style="padding:5px;"><strong><?php echo $_smarty_tpl->tpl_vars['MOD']->value['HEAD_STARTVARIABLE_REQUEST'];?>
|
|
</strong></h5>
|
|
<p style="margin:5px;" class="small"><?php echo $_smarty_tpl->tpl_vars['MOD']->value['INFO_STARTVARIABLE'];?>
|
|
</p>
|
|
<div style='margin:2px;border:1px solid #ccc;padding:3px;'>
|
|
<?php echo $_smarty_tpl->tpl_vars['formGenerator']->value;?>
|
|
|
|
</div>
|
|
|
|
<?php }else{ ?>
|
|
<br/>
|
|
<p style="text-align:center;font-style: italic;">Request values is not yet supported in Frontend Worklfows.</p>
|
|
<?php }?>
|
|
|
|
<div class="big" style="padding:5px;line-height:30px;"><strong><?php echo $_smarty_tpl->tpl_vars['MOD']->value['HEAD_VISIBLE_CONDITION'];?>
|
|
</strong>
|
|
<label class="pull-right">
|
|
<input style="display:inline;" type="checkbox" class="rcSwitch doInit" name="task[view_condition_lv]" <?php if ($_smarty_tpl->tpl_vars['task']->value['view_condition_lv']=='1'){?>checked="checked"<?php }?> value="1"/>
|
|
<?php echo vtranslate('Apply this condition in any situation to prevent execution','Settings:Workflow2');?>
|
|
|
|
<a href="https://support.redoo-networks.com/documentation/tasks/start/" target="_blank">
|
|
<img src='modules/Workflow2/icons/question.png' border="0">
|
|
</a>
|
|
</label>
|
|
</div>
|
|
|
|
<?php echo $_smarty_tpl->tpl_vars['conditionalContent']->value;?>
|
|
<?php }} ?>
|