<?php
/* Smarty version 4.3.2, created on 2024-09-09 07:17:52
  from 'C:\xampp7.4\htdocs\SuiteCRM8\public\legacy\modules\Reminders\tpls\reminders.tpl' */

/* @var Smarty_Internal_Template $_smarty_tpl */
if ($_smarty_tpl->_decodeProperties($_smarty_tpl, array (
  'version' => '4.3.2',
  'unifunc' => 'content_66de85003e38f2_63026267',
  'has_nocache_code' => false,
  'file_dependency' => 
  array (
    '60b4bac23fbfbf2a3a833fa1dd0eecd8a81b10ba' => 
    array (
      0 => 'C:\\xampp7.4\\htdocs\\SuiteCRM8\\public\\legacy\\modules\\Reminders\\tpls\\reminders.tpl',
      1 => 1723455800,
      2 => 'file',
    ),
  ),
  'includes' => 
  array (
  ),
),false)) {
function content_66de85003e38f2_63026267 (Smarty_Internal_Template $_smarty_tpl) {
$_smarty_tpl->_checkPlugins(array(0=>array('file'=>'C:\\xampp7.4\\htdocs\\SuiteCRM8\\public\\legacy\\include\\Smarty\\plugins\\function.html_options.php','function'=>'smarty_function_html_options',),));
?>

<?php if ($_smarty_tpl->tpl_vars['remindersDisabled']->value == 'false' || !$_smarty_tpl->tpl_vars['remindersDisabled']->value) {?>
	<?php $_smarty_tpl->_assignInScope('REMINDERS_DISABLED', false);
} else { ?>
	<?php $_smarty_tpl->_assignInScope('REMINDERS_DISABLED', true);
}?>



<style type="text/css">
#reminders #reminder_view .col {float: left; padding-right: 15px;}
#reminders #reminder_view .btns {float: left;}
</style>


<!-- Template for reminders  -->

<div style="display:none;">

	<?php if (!$_smarty_tpl->tpl_vars['REMINDERS_DISABLED']->value) {?>

	<div id="reminder_template">

		<span class="error-msg"></span>

		<div class="clear"></div>

		<div class="col">
			<label><?php if (!empty($_smarty_tpl->tpl_vars['MOD']->value['LBL_REMINDERS_ACTIONS'])) {
echo $_smarty_tpl->tpl_vars['MOD']->value['LBL_REMINDERS_ACTIONS'];
}?></label>&nbsp;
        </div>

        <div class="clear"></div>

        <div class="col">
			<input type="checkbox" class="popup_chkbox" onclick="Reminders.onPopupChkboxClick(this);"><label><?php echo $_smarty_tpl->tpl_vars['MOD']->value['LBL_REMINDERS_POPUP'];?>
</label>&nbsp;
			<!-- <label><?php echo $_smarty_tpl->tpl_vars['MOD']->value['LBL_REMINDERS_WHEN'];?>
</label> -->
			<select tabindex="0" class="timer_sel_popup" onchange="Reminders.onPopupTimerSelChange(this);">
				<?php echo smarty_function_html_options(array('options'=>$_smarty_tpl->tpl_vars['fields']->value['reminder_time']['options']),$_smarty_tpl);?>

			</select>
		</div>

        <div class="col">
			<input type="checkbox" class="email_chkbox" onclick="Reminders.onEmailChkboxClick(this);"><label><?php echo $_smarty_tpl->tpl_vars['MOD']->value['LBL_REMINDERS_EMAIL'];?>
</label>&nbsp;
			<!-- <label><?php echo $_smarty_tpl->tpl_vars['MOD']->value['LBL_REMINDERS_WHEN'];?>
</label> -->
			<select tabindex="0" class="timer_sel_email" onchange="Reminders.onEmailTimerSelChange(this);">
				<?php echo smarty_function_html_options(array('options'=>$_smarty_tpl->tpl_vars['fields']->value['reminder_time']['options']),$_smarty_tpl);?>

			</select>
		</div>

		<div class="clear"></div>

		<div class="col">
			<ul class="invitees_list"></ul>
		</div>

		<div class="clear"></div>

		<div class="btns">
			<button class="add-btn btn btn-info" type="button" onclick="Reminders.onAddAllClick(this); return false;">
				<span class="suitepicon suitepicon-action-plus"></span>
                <?php echo $_smarty_tpl->tpl_vars['MOD']->value['LBL_REMINDERS_ADD_ALL_INVITEES'];?>

			</button>
			<button class="remove-reminder-btn btn btn-danger" type="button" onclick="Reminders.onRemoveClick(this); return false;">
				<span class="suitepicon suitepicon-action-minus"></span>
                <?php echo $_smarty_tpl->tpl_vars['MOD']->value['LBL_REMINDERS_REMOVE_REMINDER'];?>

			</button>
		</div>

		<div class="clear"></div>
	</div>

	<?php } else { ?>

	<div id="reminder_template">

		<span class="error-msg"></span>

		<div class="clear"></div>

		<div class="col">
			<span><?php if (!empty($_smarty_tpl->tpl_vars['MOD']->value['LBL_REMINDERS_ACTIONS'])) {
echo $_smarty_tpl->tpl_vars['MOD']->value['LBL_REMINDERS_ACTIONS'];
}?></span>&nbsp;
        </div>

        <div class="clear"></div>

        <div class="col">
			<input type="checkbox" class="popup_chkbox" disabled="disabled"><span><?php if (!empty($_smarty_tpl->tpl_vars['MOD']->value['LBL_REMINDERS_POPUP'])) {
echo $_smarty_tpl->tpl_vars['MOD']->value['LBL_REMINDERS_POPUP'];
}?></span>&nbsp;
			<!-- <span><?php if (!empty($_smarty_tpl->tpl_vars['MOD']->value['LBL_REMINDERS_WHEN'])) {
echo $_smarty_tpl->tpl_vars['MOD']->value['LBL_REMINDERS_WHEN'];
}?></span> -->
			<span type="text" class="reminder_when_value" /></span>
			<select tabindex="0" class="timer_sel_popup" disabled="disabled" style="-webkit-appearance: none; -webkit-border-radius: 0px; border: none;">
				<?php echo smarty_function_html_options(array('options'=>$_smarty_tpl->tpl_vars['reminder_time_options']->value),$_smarty_tpl);?>

			</select>
		</div>

		<div class="col">
			<input type="checkbox" class="email_chkbox" disabled="disabled"><span><?php if (!empty($_smarty_tpl->tpl_vars['MOD']->value['LBL_REMINDERS_EMAIL'])) {
echo $_smarty_tpl->tpl_vars['MOD']->value['LBL_REMINDERS_EMAIL'];
}?></span>&nbsp;
			<!-- <span><?php if (!empty($_smarty_tpl->tpl_vars['MOD']->value['LBL_REMINDERS_WHEN'])) {
echo $_smarty_tpl->tpl_vars['MOD']->value['LBL_REMINDERS_WHEN'];
}?></span> -->
			<span type="text" class="reminder_when_value" /></span>
			<select tabindex="0" class="timer_sel_email" disabled="disabled" style="-webkit-appearance: none; -webkit-border-radius: 0px; border: none;">
				<?php echo smarty_function_html_options(array('options'=>$_smarty_tpl->tpl_vars['reminder_time_options']->value),$_smarty_tpl);?>

			</select>
		</div>

		<div class="clear"></div>

		<div class="col">
			<ul class="invitees_list disabled"></ul>
		</div>

		<div class="clear"></div>
	</div>

	<?php }?>

</div>
<!-- Reminders field in EditViews -->
<div id="reminders">
	<input type="hidden" id="reminders_data" name="reminders_data" />
	<ul id="reminder_view">
	<?php if ($_smarty_tpl->tpl_vars['REMINDERS_DISABLED']->value) {?>

        <?php
$_from = $_smarty_tpl->smarty->ext->_foreach->init($_smarty_tpl, $_smarty_tpl->tpl_vars['remindersData']->value, 'reminder');
$_smarty_tpl->tpl_vars['reminder']->do_else = true;
if ($_from !== null) foreach ($_from as $_smarty_tpl->tpl_vars['reminder']->value) {
$_smarty_tpl->tpl_vars['reminder']->do_else = false;
?>

            <ul class="reminder_item" data-reminder-id="<?php echo $_smarty_tpl->tpl_vars['reminder']->value['id'];?>
">

                <span class="error-msg"></span>

                <div class="clear"></div>

                <div class="col">
                    <span><?php echo $_smarty_tpl->tpl_vars['MOD']->value['LBL_REMINDERS_ACTIONS'];?>
</span>&nbsp;
                </div>

                <div class="clear"></div>

                <div class="col">
                    <input type="checkbox" class="popup_chkbox" disabled="disabled"<?php if ($_smarty_tpl->tpl_vars['reminder']->value['popup']) {?> checked="checked"<?php }?>><span><?php echo $_smarty_tpl->tpl_vars['MOD']->value['LBL_REMINDERS_POPUP'];?>
</span>&nbsp;
                    <!-- <span><?php echo $_smarty_tpl->tpl_vars['MOD']->value['LBL_REMINDERS_WHEN'];?>
</span> -->
                    <span type="text" class="reminder_when_value" /></span>
                    <select tabindex="0" class="timer_sel_popup" disabled="disabled" style="-webkit-appearance: none; -webkit-border-radius: 0px; border: none;">
                        <?php echo smarty_function_html_options(array('options'=>$_smarty_tpl->tpl_vars['reminder_time_options']->value,'selected'=>$_smarty_tpl->tpl_vars['reminder']->value['timer_popup']),$_smarty_tpl);?>

                    </select>
                </div>

                <div class="col">
                    <input type="checkbox" class="email_chkbox" disabled="disabled"<?php if ($_smarty_tpl->tpl_vars['reminder']->value['email']) {?> checked="checked"<?php }?>><span><?php echo $_smarty_tpl->tpl_vars['MOD']->value['LBL_REMINDERS_EMAIL'];?>
</span>&nbsp;
                    <!-- <span><?php echo $_smarty_tpl->tpl_vars['MOD']->value['LBL_REMINDERS_WHEN'];?>
</span> -->
                    <span type="text" class="reminder_when_value" /></span>
                    <select tabindex="0" class="timer_sel_email" disabled="disabled" style="-webkit-appearance: none; -webkit-border-radius: 0px; border: none;">
                        <?php echo smarty_function_html_options(array('options'=>$_smarty_tpl->tpl_vars['reminder_time_options']->value,'selected'=>$_smarty_tpl->tpl_vars['reminder']->value['timer_email']),$_smarty_tpl);?>

                    </select>
                </div>

                <div class="clear"></div>

                <div class="col">
                    <ul class="invitees_list disabled">
                    <?php
$_from = $_smarty_tpl->smarty->ext->_foreach->init($_smarty_tpl, $_smarty_tpl->tpl_vars['reminder']->value['invitees'], 'invitee');
$_smarty_tpl->tpl_vars['invitee']->do_else = true;
if ($_from !== null) foreach ($_from as $_smarty_tpl->tpl_vars['invitee']->value) {
$_smarty_tpl->tpl_vars['invitee']->do_else = false;
?>
                        <li class="invitees_item">
                            <button class="invitee_btn btn btn-danger" data-invitee-id="<?php echo $_smarty_tpl->tpl_vars['invitees']->value['id'];?>
" data-id="<?php echo $_smarty_tpl->tpl_vars['invitee']->value['module_id'];?>
" data-module="<?php echo $_smarty_tpl->tpl_vars['invitee']->value['module'];?>
" disabled="disabled">
								<span class="suitepicon suitepicon-module-users"></span>
                                <span class="related-value"> <?php echo $_smarty_tpl->tpl_vars['invitee']->value['value'];?>
</span>
                            </button>
                        </li>
                    <?php
}
$_smarty_tpl->smarty->ext->_foreach->restore($_smarty_tpl, 1);?>
                    </ul>
                </div>

                <div class="clear"></div>

            </ul>

        <?php
}
$_smarty_tpl->smarty->ext->_foreach->restore($_smarty_tpl, 1);?>

	<?php }?>
    </ul>
	<?php if (!$_smarty_tpl->tpl_vars['REMINDERS_DISABLED']->value) {?>
		<button id="reminder_add_btn" class="add-btn btn btn-info" type="button" onclick="Reminders.onAddClick(this);return false">
			<span class="suitepicon suitepicon-action-plus"></span>
            <?php echo $_smarty_tpl->tpl_vars['MOD']->value['LBL_REMINDERS_ADD_REMINDER'];?>

		</button>
	<?php }?>
</div>


<?php if ($_smarty_tpl->tpl_vars['remindersDataJson']->value && $_smarty_tpl->tpl_vars['remindersDefaultValuesDataJson']->value && $_smarty_tpl->tpl_vars['remindersDisabled']->value) {?>

	<?php if (!$_smarty_tpl->tpl_vars['REMINDERS_DISABLED']->value) {?>
	
	<?php echo '<script'; ?>
 type="text/javascript">

		$(function(){
			Reminders.loadDefaultsAndInit(<?php echo $_smarty_tpl->tpl_vars['remindersDataJson']->value;?>
, <?php echo $_smarty_tpl->tpl_vars['remindersDefaultValuesDataJson']->value;?>
, <?php echo $_smarty_tpl->tpl_vars['remindersDisabled']->value;?>
, '<?php echo $_smarty_tpl->tpl_vars['module']->value;?>
', [{'personModule':'<?php echo $_smarty_tpl->tpl_vars['returnModule']->value;?>
', 'personModuleId':'<?php echo $_smarty_tpl->tpl_vars['returnId']->value;?>
'}], '<?php echo $_smarty_tpl->tpl_vars['returnAction']->value;?>
');
		});

	<?php echo '</script'; ?>
>
	
	<?php }?>

<?php } else { ?>

	<?php if (!$_smarty_tpl->tpl_vars['REMINDERS_DISABLED']->value) {?>
	
	<?php echo '<script'; ?>
 type="text/javascript">

		$(function(){
			Reminders.loadDefaultsAndInit(null, null, null, '<?php echo $_smarty_tpl->tpl_vars['module']->value;?>
', [{'personModule': '<?php echo $_smarty_tpl->tpl_vars['current_user']->value->module_dir;?>
', 'personModuleId':'<?php echo $_smarty_tpl->tpl_vars['current_user']->value->id;?>
', 'personName':'<?php echo $_smarty_tpl->tpl_vars['current_user']->value->name;?>
'}, {'personModule':'<?php echo $_smarty_tpl->tpl_vars['returnModule']->value;?>
', 'personModuleId':'<?php echo $_smarty_tpl->tpl_vars['returnId']->value;?>
'}], '<?php echo $_smarty_tpl->tpl_vars['returnAction']->value;?>
');
		});

	<?php echo '</script'; ?>
>
	
	<?php }?>

<?php }
}
}
