function content_55ccf0f2456152_31564523($_smarty_tpl) { if (!is_callable('smarty_function_script')) { include '/home/coriolan/public_html/lead/app/functions/smarty_plugins/function.script.php'; } if (!is_callable('smarty_block_hook')) { include '/home/coriolan/public_html/lead/app/functions/smarty_plugins/block.hook.php'; } if (!is_callable('smarty_function_include_ext')) { include '/home/coriolan/public_html/lead/app/functions/smarty_plugins/function.include_ext.php'; } fn_preload_lang_vars(array('general', 'content', 'block_settings', 'status', 'name', 'template', 'settings', 'wrapper', 'user_class', 'dynamic_content', 'override_by_this', 'tt_views_block_manager_update_block_override_by_this', 'content_changed_for', 'global_status', 'active', 'disabled', 'disable_for', 'enable_for')); if ($_smarty_tpl->tpl_vars['block']->value) { ?> <?php $_smarty_tpl->tpl_vars["id"] = new Smarty_variable($_smarty_tpl->tpl_vars['block']->value['block_id'], null, 0); } else { ?> <?php $_smarty_tpl->tpl_vars["id"] = new Smarty_variable(0, null, 0); } ?> <?php $_smarty_tpl->tpl_vars["snapping_id"] = new Smarty_variable(($tmp = @$_smarty_tpl->tpl_vars['snapping_data']->value['snapping_id']) === null || $tmp === '' ? "0" : $tmp, null, 0); $_smarty_tpl->tpl_vars["html_id"] = new Smarty_variable((string) $_smarty_tpl->tpl_vars['id']->value . "_" . (string) $_smarty_tpl->tpl_vars['snapping_id']->value . "_" . (string) $_smarty_tpl->tpl_vars['block']->value['type'], null, 0); ?> <?php if ($_smarty_tpl->tpl_vars['id']->value == 0) { ?> <?php $_smarty_tpl->tpl_vars["hide_status"] = new Smarty_variable(true, null, 0); } ?> <?php if ($_REQUEST['active_tab']) { ?> <?php $_smarty_tpl->tpl_vars["active_tab"] = new Smarty_variable($_REQUEST['active_tab'], null, 0); } else { ?> <?php $_smarty_tpl->tpl_vars["active_tab"] = new Smarty_variable('block_general', null, 0); } ?> <?php echo smarty_function_script(array('src' => "js/tygh/tabs.js"), $_smarty_tpl); ?> <?php if ($_REQUEST['dynamic_object']['object_id'] > 0) { ?> <?php $_smarty_tpl->tpl_vars["dynamic_object"] = new Smarty_variable($_REQUEST['dynamic_object'], null, 0); } ?> <?php $_smarty_tpl->_capture_stack[0][] = array("block_content", null, null); ob_start(); ?> <?php if ($_smarty_tpl->tpl_vars['block_scheme']->value['content']) { ?> <?php echo $_smarty_tpl->getSubTemplate("views/block_manager/components/block_content.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('content_type' => $_smarty_tpl->tpl_vars['block']->value['properties']['content_type'], 'block_scheme' => $_smarty_tpl->tpl_vars['block_scheme']->value, 'block' => $_smarty_tpl->tpl_vars['block']->value, 'editable' => $_smarty_tpl->tpl_vars['editable_content']->value, 'tab_id' => (string) $_smarty_tpl->tpl_vars['html_id']->value), 0); ?> <?php } list($_capture_buffer, $_capture_assign, $_capture_append) = array_pop($_smarty_tpl->_capture_stack[0]); if (!empty($_capture_buffer)) { if (isset($_capture_assign)) { $_smarty_tpl->assign($_capture_assign, ob_get_contents()); } if (isset($_capture_append)) { $_smarty_tpl->append($_capture_append, ob_get_contents()); } Smarty::$_smarty_vars['capture'][$_capture_buffer] = ob_get_clean(); } else { $_smarty_tpl->capture_error(); } ?> <form action="<?php echo htmlspecialchars(fn_url(''), ENT_QUOTES, 'UTF-8'); ?> " method="post" class="form-horizontal form-edit cm-skip-check-items <?php if ($_smarty_tpl->tpl_vars['dynamic_object']->value) { ?> cm-hide-inputs<?php } ?> <?php if ($_REQUEST['ajax_update']) { ?> cm-ajax cm-form-dialog-closer<?php } ?> " name="block_<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8'); ?> _update_form"> <div id="block_properties_<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['html_id']->value, ENT_QUOTES, 'UTF-8'); ?> "> <?php if ($_REQUEST['dynamic_object']['object_id'] > 0) { ?> <input type="hidden" name="dynamic_object[object_id]" value="<?php echo htmlspecialchars($_REQUEST['dynamic_object']['object_id'], ENT_QUOTES, 'UTF-8'); ?> " class="cm-no-hide-input"/> <input type="hidden" name="dynamic_object[object_type]" value="<?php echo htmlspecialchars($_REQUEST['dynamic_object']['object_type'], ENT_QUOTES, 'UTF-8'); ?> " class="cm-no-hide-input"/> <?php } ?> <input type="hidden" name="block_data[type]" value="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['block']->value['type'], ENT_QUOTES, 'UTF-8'); ?> " class="cm-no-hide-input"/> <input type="hidden" name="block_data[block_id]" value="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8'); ?> " class="cm-no-hide-input"/> <input type="hidden" name="block_data[content_data][snapping_id]" value="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['snapping_data']->value['snapping_id'], ENT_QUOTES, 'UTF-8'); ?> " class="cm-no-hide-input"/> <?php if (!$_smarty_tpl->tpl_vars['block_scheme']->value['multilanguage']) { ?> <input type="hidden" name="block_data[apply_to_all_langs]" value="Y" /> <?php } ?> <input type="hidden" name="snapping_data[snapping_id]" value="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['snapping_data']->value['snapping_id'], ENT_QUOTES, 'UTF-8'); ?> " class="cm-no-hide-input"/> <input type="hidden" name="snapping_data[grid_id]" value="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['snapping_data']->value['grid_id'], ENT_QUOTES, 'UTF-8'); ?> " class="cm-no-hide-input"/> <input type="hidden" name="selected_location" value="<?php echo htmlspecialchars(($tmp = @$_REQUEST['selected_location']) === null || $tmp === '' ? 0 : $tmp, ENT_QUOTES, 'UTF-8'); ?> " class="cm-no-hide-input" /> <?php if ($_REQUEST['assign_to']) { ?> <input type="hidden" name="assign_to" value="<?php echo htmlspecialchars($_REQUEST['assign_to'], ENT_QUOTES, 'UTF-8'); ?> " class="cm-no-hide-input"/> <?php } ?> <input type="hidden" name="result_ids" value="block_properties_<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['html_id']->value, ENT_QUOTES, 'UTF-8'); ?> " class="cm-no-hide-input"/> <?php if ($_REQUEST['r_url']) { ?> <input type="hidden" name="r_url" value="<?php echo htmlspecialchars($_REQUEST['r_url'], ENT_QUOTES, 'UTF-8'); ?> " class="cm-no-hide-input"/> <?php } ?> <div class="tabs cm-j-tabs cm-track"> <ul class="nav nav-tabs"> <li id="block_general_<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['html_id']->value, ENT_QUOTES, 'UTF-8'); ?> " class="cm-js<?php if ($_smarty_tpl->tpl_vars['active_tab']->value == "block_general_" . (string) $_smarty_tpl->tpl_vars['html_id']->value) { ?> active<?php } ?> "><a><?php echo $_smarty_tpl->__("general"); ?> </a></li> <?php if (trim(Smarty::$_smarty_vars['capture']['block_content'])) { ?> <li id="block_contents_<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['html_id']->value, ENT_QUOTES, 'UTF-8'); ?> " class="cm-js<?php if ($_smarty_tpl->tpl_vars['active_tab']->value == "block_contents_" . (string) $_smarty_tpl->tpl_vars['html_id']->value) { ?> active<?php } ?> "><a><?php echo $_smarty_tpl->__("content"); ?> </a></li><?php } ?> <?php if ($_smarty_tpl->tpl_vars['block_scheme']->value['settings']) { ?> <li id="block_settings_<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['html_id']->value, ENT_QUOTES, 'UTF-8'); ?> " class="cm-js<?php if ($_smarty_tpl->tpl_vars['active_tab']->value == "block_settings_" . (string) $_smarty_tpl->tpl_vars['html_id']->value) { ?> active<?php } ?> "><a><?php echo $_smarty_tpl->__("block_settings"); ?> </a></li> <?php } ?> <?php if ($_smarty_tpl->tpl_vars['dynamic_object_scheme']->value && !$_smarty_tpl->tpl_vars['hide_status']->value) { ?> <li id="block_status_<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['html_id']->value, ENT_QUOTES, 'UTF-8'); ?> " class="cm-js<?php if ($_smarty_tpl->tpl_vars['active_tab']->value == "block_status_" . (string) $_smarty_tpl->tpl_vars['html_id']->value) { ?> active<?php } ?> "><a><?php echo $_smarty_tpl->__("status"); ?> </a></li> <?php } ?> </ul> </div> <div class="cm-tabs-content" id="tabs_content_block_<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['html_id']->value, ENT_QUOTES, 'UTF-8'); ?> "> <div id="content_block_general_<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['html_id']->value, ENT_QUOTES, 'UTF-8'); ?> "> <div class="control-group <?php if ($_smarty_tpl->tpl_vars['editable_template_name']->value) { ?> cm-no-hide-input<?php } ?> "> <label for="block_<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['html_id']->value, ENT_QUOTES, 'UTF-8'); ?> _name" class="control-label cm-required"><?php echo $_smarty_tpl->__("name"); ?> </label> <div class="controls"> <?php if ($_REQUEST['html_id'] && $_smarty_tpl->tpl_vars['id']->value > 0) { ?> <div class="text-type-value"><?php echo htmlspecialchars($_smarty_tpl->tpl_vars['block']->value['name'], ENT_QUOTES, 'UTF-8'); ?> </div> <?php } else { ?> <input type="text" name="block_data[description][name]" id="block_<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['html_id']->value, ENT_QUOTES, 'UTF-8'); ?> _name" class="span9" size="25" value="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['block']->value['name'], ENT_QUOTES, 'UTF-8'); ?> " /> <?php } ?> </div> </div> <?php if ($_smarty_tpl->tpl_vars['block_scheme']->value['templates']) { ?> <div class="control-group <?php if ($_smarty_tpl->tpl_vars['editable_template_name']->value) { ?> cm-no-hide-input<?php } ?> "> <label class="control-label" for="block_<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['html_id']->value, ENT_QUOTES, 'UTF-8'); ?> _template"><?php echo $_smarty_tpl->__("template"); ?> </label> <div class="controls"> <?php if (is_array($_smarty_tpl->tpl_vars['block_scheme']->value['templates'])) { ?> <select id="block_<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['html_id']->value, ENT_QUOTES, 'UTF-8'); ?> _template" name="block_data[properties][template]" class="cm-reload-form"> <?php $_smarty_tpl->tpl_vars['v'] = new Smarty_Variable(); $_smarty_tpl->tpl_vars['v']->_loop = false; $_smarty_tpl->tpl_vars['k'] = new Smarty_Variable(); $_from = $_smarty_tpl->tpl_vars['block_scheme']->value['templates']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); } foreach ($_from as $_smarty_tpl->tpl_vars['v']->key => $_smarty_tpl->tpl_vars['v']->value) { $_smarty_tpl->tpl_vars['v']->_loop = true; $_smarty_tpl->tpl_vars['k']->value = $_smarty_tpl->tpl_vars['v']->key; ?> <option value="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['k']->value, ENT_QUOTES, 'UTF-8'); ?> " <?php if ($_smarty_tpl->tpl_vars['block']->value['properties']['template'] == $_smarty_tpl->tpl_vars['k']->value) { ?> selected="selected"<?php } ?> ><?php if ($_smarty_tpl->tpl_vars['v']->value['name']) { echo htmlspecialchars($_smarty_tpl->tpl_vars['v']->value['name'], ENT_QUOTES, 'UTF-8'); } else { echo htmlspecialchars($_smarty_tpl->tpl_vars['k']->value, ENT_QUOTES, 'UTF-8'); } ?> </option> <?php } ?> </select> <?php } ?> <?php if ($_smarty_tpl->tpl_vars['dynamic_object']->value) { ?> <input type="hidden" name="block_data[properties][template]" value="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['block']->value['properties']['template'], ENT_QUOTES, 'UTF-8'); ?> " class="cm-no-hide-input" /> <?php } ?> <?php if (is_array($_smarty_tpl->tpl_vars['block_scheme']->value['templates'][$_smarty_tpl->tpl_vars['block']->value['properties']['template']]['settings'])) { ?> <a href="#" id="sw_case_settings_<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['html_id']->value, ENT_QUOTES, 'UTF-8'); ?> " class="open cm-combination" onclick="return false"> <?php echo $_smarty_tpl->__("settings"); ?> <span class="combo-arrow"></span> </a> <?php } ?> </div> </div> <?php } ?> <?php if (is_array($_smarty_tpl->tpl_vars['block_scheme']->value['templates'][$_smarty_tpl->tpl_vars['block']->value['properties']['template']]['settings'])) { ?> <div id="case_settings_<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['html_id']->value, ENT_QUOTES, 'UTF-8'); ?> " class="hidden"> <?php $_smarty_tpl->tpl_vars['setting_data'] = new Smarty_Variable(); $_smarty_tpl->tpl_vars['setting_data']->_loop = false; $_smarty_tpl->tpl_vars['name'] = new Smarty_Variable(); $_from = $_smarty_tpl->tpl_vars['block_scheme']->value['templates'][$_smarty_tpl->tpl_vars['block']->value['properties']['template']]['settings']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); } foreach ($_from as $_smarty_tpl->tpl_vars['setting_data']->key => $_smarty_tpl->tpl_vars['setting_data']->value) { $_smarty_tpl->tpl_vars['setting_data']->_loop = true; $_smarty_tpl->tpl_vars['name']->value = $_smarty_tpl->tpl_vars['setting_data']->key; ?> <?php echo $_smarty_tpl->getSubTemplate("views/block_manager/components/setting_element.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('option' => $_smarty_tpl->tpl_vars['setting_data']->value, 'name' => $_smarty_tpl->tpl_vars['name']->value, 'block' => $_smarty_tpl->tpl_vars['block']->value, 'html_id' => "block_" . (string) $_smarty_tpl->tpl_vars['html_id']->value . "_properties_" . (string) $_smarty_tpl->tpl_vars['name']->value, 'html_name' => "block_data[properties][" . (string) $_smarty_tpl->tpl_vars['name']->value . "]", 'editable' => $_smarty_tpl->tpl_vars['editable_template_name']->value, 'value' => $_smarty_tpl->tpl_vars['block']->value['properties'][$_smarty_tpl->tpl_vars['name']->value]), 0); ?> <?php } ?> </div> <?php } ?> <?php if ($_smarty_tpl->tpl_vars['editable_wrapper']->value) { ?> <div class="control-group"> <label class="control-label" for="block_<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['html_id']->value, ENT_QUOTES, 'UTF-8'); ?> _wrapper"><?php echo $_smarty_tpl->__("wrapper"); ?> </label> <div class="controls"> <select name="snapping_data[wrapper]" id="block_<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['html_id']->value, ENT_QUOTES, 'UTF-8'); ?> _wrapper"> <option value="">--</option> <?php $_smarty_tpl->tpl_vars['w'] = new Smarty_Variable(); $_smarty_tpl->tpl_vars['w']->_loop = false; $_smarty_tpl->tpl_vars['k'] = new Smarty_Variable(); $_from = $_smarty_tpl->tpl_vars['block_scheme']->value['wrappers']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); } foreach ($_from as $_smarty_tpl->tpl_vars['w']->key => $_smarty_tpl->tpl_vars['w']->value) { $_smarty_tpl->tpl_vars['w']->_loop = true; $_smarty_tpl->tpl_vars['k']->value = $_smarty_tpl->tpl_vars['w']->key; ?> <option value="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['k']->value, ENT_QUOTES, 'UTF-8'); ?> " <?php if ($_smarty_tpl->tpl_vars['block']->value['wrapper'] == $_smarty_tpl->tpl_vars['k']->value) { ?> selected="selected"<?php } ?> ><?php echo htmlspecialchars($_smarty_tpl->tpl_vars['w']->value['name'], ENT_QUOTES, 'UTF-8'); ?> </option> <?php } ?> </select> </div> </div> <div class="control-group"> <label class="control-label" for="block_<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['html_id']->value, ENT_QUOTES, 'UTF-8'); ?> _user_class"><?php echo $_smarty_tpl->__("user_class"); ?> </label> <div class="controls"> <input type="text" name="snapping_data[user_class]" id="block_<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['html_id']->value, ENT_QUOTES, 'UTF-8'); ?> _user_class" size="25" value="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['block']->value['user_class'], ENT_QUOTES, 'UTF-8'); ?> "/> </div> </div> <?php } ?> <?php $_smarty_tpl->smarty->_tag_stack[] = array('hook', array('name' => "block_manager:settings")); $_block_repeat = true; echo smarty_block_hook(array('name' => "block_manager:settings"), null, $_smarty_tpl, $_block_repeat); while ($_block_repeat) { ob_start(); ?> <?php $_block_content = ob_get_clean(); $_block_repeat = false; echo smarty_block_hook(array('name' => "block_manager:settings"), $_block_content, $_smarty_tpl, $_block_repeat); } array_pop($_smarty_tpl->smarty->_tag_stack); ?> </div> <?php if (Smarty::$_smarty_vars['capture']['block_content']) { ?> <div id="content_block_contents_<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['html_id']->value, ENT_QUOTES, 'UTF-8'); ?> " > <?php if ($_smarty_tpl->tpl_vars['dynamic_object']->value['object_id'] > 0) { ?> <input type="hidden" name="block_data[content_data][object_id]" value="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['dynamic_object']->value['object_id'], ENT_QUOTES, 'UTF-8'); ?> " class="cm-no-hide-input" /> <input type="hidden" name="block_data[content_data][object_type]" value="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['dynamic_object']->value['object_type'], ENT_QUOTES, 'UTF-8'); ?> " class="cm-no-hide-input" /> <?php } ?> <?php if ($_smarty_tpl->tpl_vars['block']->value['object_id'] > 0) { ?> <div class="text-tip"> <?php $_smarty_tpl->tpl_vars["url"] = new Smarty_variable(fn_url((string) $_smarty_tpl->tpl_vars['dynamic_object_scheme']->value['customer_dispatch'] . "&" . (string) $_smarty_tpl->tpl_vars['dynamic_object_scheme']->value['key'] . "=" . (string) $_smarty_tpl->tpl_vars['dynamic_object']->value['object_id'], 'C', 'http', @constant('DESCR_SL')), null, 0); ?> <?php echo $_smarty_tpl->__("dynamic_content", array("[url]" => $_smarty_tpl->tpl_vars['url']->value)); ?> </div> <?php } ?> <?php echo Smarty::$_smarty_vars['capture']['block_content']; ?> <?php $_smarty_tpl->_capture_stack[0][] = array("content_stat", null, null); ob_start(); $_smarty_tpl->tpl_vars['stat'] = new Smarty_Variable(); $_smarty_tpl->tpl_vars['stat']->_loop = false; $_from = $_smarty_tpl->tpl_vars['changed_content_stat']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); } foreach ($_from as $_smarty_tpl->tpl_vars['stat']->key => $_smarty_tpl->tpl_vars['stat']->value) { $_smarty_tpl->tpl_vars['stat']->_loop = true; if ($_smarty_tpl->tpl_vars['stat']->value['object_type'] != '') { ?> <div><?php echo $_smarty_tpl->getSubTemplate("common/popupbox.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('id' => "show_objects_" . (string) $_smarty_tpl->tpl_vars['block']->value['block_id'] . "_" . (string) $_smarty_tpl->tpl_vars['stat']->value['object_type'], 'text' => __($_smarty_tpl->tpl_vars['stat']->value['object_type']), 'link_text' => (string) $_smarty_tpl->tpl_vars['stat']->value['contents_count'], 'act' => "link", 'href' => "block_manager.show_objects?object_type=" . (string) $_smarty_tpl->tpl_vars['stat']->value['object_type'] . "&block_id=" . (string) $_smarty_tpl->tpl_vars['block']->value['block_id'], 'opener_ajax_class' => "cm-ajax", 'link_class' => "cm-ajax-force", 'content' => ''), 0); ?> <?php echo htmlspecialchars($_smarty_tpl->tpl_vars['stat']->value['object_type'], ENT_QUOTES, 'UTF-8'); ?> </div><?php } } list($_capture_buffer, $_capture_assign, $_capture_append) = array_pop($_smarty_tpl->_capture_stack[0]); if (!empty($_capture_buffer)) { if (isset($_capture_assign)) { $_smarty_tpl->assign($_capture_assign, ob_get_contents()); } if (isset($_capture_append)) { $_smarty_tpl->append($_capture_append, ob_get_contents()); } Smarty::$_smarty_vars['capture'][$_capture_buffer] = ob_get_clean(); } else { $_smarty_tpl->capture_error(); } ?> <?php if (Smarty::$_smarty_vars['capture']['content_stat']) { ?> <div class="control-group"> <label class="control-label" for="block_<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['html_id']->value, ENT_QUOTES, 'UTF-8'); ?> _override_by_this"><?php echo $_smarty_tpl->__("override_by_this"); echo $_smarty_tpl->getSubTemplate("common/tooltip.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('tooltip' => __("tt_views_block_manager_update_block_override_by_this")), 0); ?> </label> <div class="controls"> <input type="hidden" class="cm-no-hide-input" name="block_data[content_data][override_by_this]" value="N" /> <input id="block_<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['html_id']->value, ENT_QUOTES, 'UTF-8'); ?> _override_by_this" type="checkbox" class="cm-no-hide-input" name="block_data[content_data][override_by_this]" value="Y" /> </div> </div> <div class="statistics-box"> <div class="statistics-body"> <p class="strong"><?php echo $_smarty_tpl->__("content_changed_for"); ?> </p> <?php echo Smarty::$_smarty_vars['capture']['content_stat']; ?> </div> </div> <?php } ?> </div> <?php } ?> <?php if ($_smarty_tpl->tpl_vars['block_scheme']->value['settings']) { ?> <div id="content_block_settings_<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['html_id']->value, ENT_QUOTES, 'UTF-8'); ?> " > <?php $_smarty_tpl->tpl_vars['setting_data'] = new Smarty_Variable(); $_smarty_tpl->tpl_vars['setting_data']->_loop = false; $_smarty_tpl->tpl_vars['name'] = new Smarty_Variable(); $_from = $_smarty_tpl->tpl_vars['block_scheme']->value['settings']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); } foreach ($_from as $_smarty_tpl->tpl_vars['setting_data']->key => $_smarty_tpl->tpl_vars['setting_data']->value) { $_smarty_tpl->tpl_vars['setting_data']->_loop = true; $_smarty_tpl->tpl_vars['name']->value = $_smarty_tpl->tpl_vars['setting_data']->key; ?> <?php echo $_smarty_tpl->getSubTemplate("views/block_manager/components/setting_element.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('option' => $_smarty_tpl->tpl_vars['setting_data']->value, 'name' => $_smarty_tpl->tpl_vars['name']->value, 'block' => $_smarty_tpl->tpl_vars['block']->value, 'html_id' => "block_" . (string) $_smarty_tpl->tpl_vars['html_id']->value . "_properties_" . (string) $_smarty_tpl->tpl_vars['name']->value, 'html_name' => "block_data[properties][" . (string) $_smarty_tpl->tpl_vars['name']->value . "]", 'editable' => $_smarty_tpl->tpl_vars['editable_template_name']->value, 'value' => $_smarty_tpl->tpl_vars['block']->value['properties'][$_smarty_tpl->tpl_vars['name']->value]), 0); ?> <?php } ?> </div> <?php } ?> <?php if ($_smarty_tpl->tpl_vars['dynamic_object_scheme']->value && !$_smarty_tpl->tpl_vars['hide_status']->value) { ?> <div id="content_block_status_<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['html_id']->value, ENT_QUOTES, 'UTF-8'); ?> " > <div class="control-group"> <label class="control-label"><?php echo $_smarty_tpl->__("global_status"); ?> :</label> <div class="controls"> <p> <?php if ($_smarty_tpl->tpl_vars['block']->value['status'] == 'A') { echo $_smarty_tpl->__("active"); } else { echo $_smarty_tpl->__("disabled"); } ?> </p> </div> </div> <input type="hidden" class="cm-no-hide-input" name="snapping_data[object_type]" value="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['dynamic_object_scheme']->value['object_type'], ENT_QUOTES, 'UTF-8'); ?> " /> <div class="control-group cm-no-hide-input"> <label class="control-label"><?php if ($_smarty_tpl->tpl_vars['block']->value['status'] == 'A') { echo $_smarty_tpl->__("disable_for"); } else { echo $_smarty_tpl->__("enable_for"); } ?> </label> <div class="controls"> <?php echo smarty_function_include_ext(array('file' => $_smarty_tpl->tpl_vars['dynamic_object_scheme']->value['picker'], 'data_id' => "block_" . (string) $_smarty_tpl->tpl_vars['html_id']->value . "_object_ids_d", 'input_name' => "snapping_data[object_ids]", 'item_ids' => $_smarty_tpl->tpl_vars['block']->value['object_ids'], 'view_mode' => "links", 'params_array' => $_smarty_tpl->tpl_vars['dynamic_object_scheme']->value['picker_params'], 'start_pos' => $_smarty_tpl->tpl_vars['start_position']->value), $_smarty_tpl); ?> </div> </div> </div> <?php } ?> </div> <!--block_properties_<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['html_id']->value, ENT_QUOTES, 'UTF-8'); ?> --></div> <div class="buttons-container"> <?php if ($_REQUEST['force_close']) { ?> <?php echo $_smarty_tpl->getSubTemplate("buttons/save_cancel.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('but_name' => "dispatch[block_manager.update_block]", 'cancel_action' => "close", 'save' => $_smarty_tpl->tpl_vars['id']->value), 0); ?> <?php } else { ?> <?php echo $_smarty_tpl->getSubTemplate("buttons/save_cancel.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('but_name' => "dispatch[block_manager.update_block]", 'cancel_action' => "close", 'save' => $_smarty_tpl->tpl_vars['id']->value), 0); ?> <?php } ?> </div> </form> <?php }
function content_55ccf1b728aa17_68233506($_smarty_tpl) { if (!is_callable('smarty_function_html_checkboxes')) { include '/home/coriolan/public_html/lead/app/lib/other/smarty/plugins/function.html_checkboxes.php'; } if (!is_callable('smarty_function_include_ext')) { include '/home/coriolan/public_html/lead/app/functions/smarty_plugins/function.include_ext.php'; } fn_preload_lang_vars(array('filling')); if ($_smarty_tpl->tpl_vars['option']->value['force_open']) { ?> <script type="text/javascript"> Tygh.$(document).ready(function() { Tygh.$('#additional_<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['set_id']->value, ENT_QUOTES, 'UTF-8'); ?> ').show(); }); </script> <?php } ?> <?php if (!$_smarty_tpl->tpl_vars['option']->value['remove_indent']) { ?> <div class="control-group"> <?php if (!$_smarty_tpl->tpl_vars['option']->value['hide_label']) { ?> <label for="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['html_id']->value, ENT_QUOTES, 'UTF-8'); ?> " class="control-label <?php if ($_smarty_tpl->tpl_vars['option']->value['required']) { ?> cm-required<?php } ?> "><?php if ($_smarty_tpl->tpl_vars['option']->value['option_name']) { echo $_smarty_tpl->__($_smarty_tpl->tpl_vars['option']->value['option_name']); } else { echo $_smarty_tpl->__($_smarty_tpl->tpl_vars['name']->value); } if ($_smarty_tpl->tpl_vars['option']->value['tooltip']) { echo $_smarty_tpl->getSubTemplate("common/tooltip.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('tooltip' => $_smarty_tpl->tpl_vars['option']->value['tooltip']), 0); } ?> </label> <?php } ?> <div class="controls <?php if ($_smarty_tpl->tpl_vars['editable']->value) { ?> cm-no-hide-input<?php } ?> "> <?php } ?> <?php if ($_smarty_tpl->tpl_vars['option']->value['type'] == "checkbox") { ?> <input type="hidden" name="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['html_name']->value, ENT_QUOTES, 'UTF-8'); ?> " value="N" /> <input type="checkbox" name="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['html_name']->value, ENT_QUOTES, 'UTF-8'); ?> " value="Y" id="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['html_id']->value, ENT_QUOTES, 'UTF-8'); ?> " <?php if ($_smarty_tpl->tpl_vars['value']->value && $_smarty_tpl->tpl_vars['value']->value == "Y" || !$_smarty_tpl->tpl_vars['value']->value && $_smarty_tpl->tpl_vars['option']->value['default_value'] == "Y") { ?> checked="checked"<?php } ?> /> <?php } elseif ($_smarty_tpl->tpl_vars['option']->value['type'] == "selectbox") { ?> <?php $_smarty_tpl->tpl_vars["value"] = new Smarty_variable(($tmp = @$_smarty_tpl->tpl_vars['value']->value) === null || $tmp === '' ? $_smarty_tpl->tpl_vars['option']->value['default_value'] : $tmp, null, 0); ?> <select id="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['html_id']->value, ENT_QUOTES, 'UTF-8'); ?> " name="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['html_name']->value, ENT_QUOTES, 'UTF-8'); ?> " <?php if ($_smarty_tpl->tpl_vars['option']->value['values_settings']) { ?> class="cm-reload-form"<?php } ?> > <?php $_smarty_tpl->tpl_vars["v"] = new Smarty_Variable(); $_smarty_tpl->tpl_vars["v"]->_loop = false; $_smarty_tpl->tpl_vars["k"] = new Smarty_Variable(); $_from = $_smarty_tpl->tpl_vars['option']->value['values']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); } foreach ($_from as $_smarty_tpl->tpl_vars["v"]->key => $_smarty_tpl->tpl_vars["v"]->value) { $_smarty_tpl->tpl_vars["v"]->_loop = true; $_smarty_tpl->tpl_vars["k"]->value = $_smarty_tpl->tpl_vars["v"]->key; ?> <option value="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['k']->value, ENT_QUOTES, 'UTF-8'); ?> " <?php if ($_smarty_tpl->tpl_vars['value']->value == $_smarty_tpl->tpl_vars['k']->value) { ?> selected="selected"<?php } ?> ><?php if ($_smarty_tpl->tpl_vars['option']->value['no_lang']) { echo htmlspecialchars($_smarty_tpl->tpl_vars['v']->value, ENT_QUOTES, 'UTF-8'); } else { echo $_smarty_tpl->__($_smarty_tpl->tpl_vars['v']->value); } ?> </option> <?php } ?> </select> <?php $_smarty_tpl->tpl_vars["values_settings"] = new Smarty_variable($_smarty_tpl->tpl_vars['option']->value['values_settings'][$_smarty_tpl->tpl_vars['value']->value], null, 0); ?> <?php if ($_smarty_tpl->tpl_vars['values_settings']->value) { ?> <?php $_smarty_tpl->tpl_vars['setting_data'] = new Smarty_Variable(); $_smarty_tpl->tpl_vars['setting_data']->_loop = false; $_smarty_tpl->tpl_vars['setting_name'] = new Smarty_Variable(); $_from = $_smarty_tpl->tpl_vars['values_settings']->value['settings']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); } foreach ($_from as $_smarty_tpl->tpl_vars['setting_data']->key => $_smarty_tpl->tpl_vars['setting_data']->value) { $_smarty_tpl->tpl_vars['setting_data']->_loop = true; $_smarty_tpl->tpl_vars['setting_name']->value = $_smarty_tpl->tpl_vars['setting_data']->key; ?> <?php echo $_smarty_tpl->getSubTemplate("views/block_manager/components/setting_element.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('option' => $_smarty_tpl->tpl_vars['setting_data']->value, 'name' => $_smarty_tpl->tpl_vars['setting_name']->value, 'block' => $_smarty_tpl->tpl_vars['block']->value, 'html_id' => "block_" . (string) $_smarty_tpl->tpl_vars['html_id']->value . "_properties_" . (string) $_smarty_tpl->tpl_vars['name']->value . "_" . (string) $_smarty_tpl->tpl_vars['setting_name']->value, 'html_name' => "block_data[properties][" . (string) $_smarty_tpl->tpl_vars['name']->value . "][" . (string) $_smarty_tpl->tpl_vars['value']->value . "][" . (string) $_smarty_tpl->tpl_vars['setting_name']->value . "]", 'editable' => $_smarty_tpl->tpl_vars['editable']->value, 'value' => $_smarty_tpl->tpl_vars['block']->value['properties'][$_smarty_tpl->tpl_vars['name']->value][$_smarty_tpl->tpl_vars['value']->value][$_smarty_tpl->tpl_vars['setting_name']->value]), 0); ?> <?php } ?> <?php } } elseif ($_smarty_tpl->tpl_vars['option']->value['type'] == "input" || $_smarty_tpl->tpl_vars['option']->value['type'] == "input_long") { ?> <input type="text" id="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['html_id']->value, ENT_QUOTES, 'UTF-8'); ?> " class="input-medium" name="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['html_name']->value, ENT_QUOTES, 'UTF-8'); ?> " value="<?php if ($_smarty_tpl->tpl_vars['value']->value) { echo htmlspecialchars($_smarty_tpl->tpl_vars['value']->value, ENT_QUOTES, 'UTF-8'); } else { echo htmlspecialchars($_smarty_tpl->tpl_vars['option']->value['default_value'], ENT_QUOTES, 'UTF-8'); } ?> " /> <?php } elseif ($_smarty_tpl->tpl_vars['option']->value['type'] == "multiple_checkboxes") { ?> <?php echo smarty_function_html_checkboxes(array('name' => $_smarty_tpl->tpl_vars['html_name']->value, 'options' => $_smarty_tpl->tpl_vars['option']->value['values'], 'columns' => 4, 'selected' => $_smarty_tpl->tpl_vars['value']->value), $_smarty_tpl); ?> <?php } elseif ($_smarty_tpl->tpl_vars['option']->value['type'] == "text" || $_smarty_tpl->tpl_vars['option']->value['type'] == "simple_text") { ?> <textarea id="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['html_id']->value, ENT_QUOTES, 'UTF-8'); ?> " name="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['html_name']->value, ENT_QUOTES, 'UTF-8'); ?> " cols="55" rows="8" class="<?php if ($_smarty_tpl->tpl_vars['option']->value['type'] == "text") { ?> cm-wysiwyg<?php } ?> span9"><?php echo htmlspecialchars($_smarty_tpl->tpl_vars['value']->value, ENT_QUOTES, 'UTF-8'); ?> </textarea> <?php if ($_smarty_tpl->tpl_vars['option']->value['type'] == "text") { ?> <!--processForm--> <?php } } elseif ($_smarty_tpl->tpl_vars['option']->value['type'] == "picker") { ?> <?php $_smarty_tpl->tpl_vars["picker_param_value"] = new Smarty_Variable(); $_smarty_tpl->tpl_vars["picker_param_value"]->_loop = false; $_smarty_tpl->tpl_vars["picker_param_key"] = new Smarty_Variable(); $_from = $_smarty_tpl->tpl_vars['option']->value['picker_params']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); } foreach ($_from as $_smarty_tpl->tpl_vars["picker_param_value"]->key => $_smarty_tpl->tpl_vars["picker_param_value"]->value) { $_smarty_tpl->tpl_vars["picker_param_value"]->_loop = true; $_smarty_tpl->tpl_vars["picker_param_key"]->value = $_smarty_tpl->tpl_vars["picker_param_value"]->key; ?> <?php $_smarty_tpl->tpl_vars[$_smarty_tpl->tpl_vars['picker_param_key']->value] = new Smarty_variable($_smarty_tpl->tpl_vars['picker_param_value']->value, null, 0); ?> <?php } ?> <?php echo smarty_function_include_ext(array('file' => $_smarty_tpl->tpl_vars['option']->value['picker'], 'checkbox_name' => "block_items", 'data_id' => "objects_" . (string) $_smarty_tpl->tpl_vars['item']->value['chain_id'] . "_", 'input_name' => (string) $_smarty_tpl->tpl_vars['html_name']->value, 'item_ids' => $_smarty_tpl->tpl_vars['value']->value, 'params_array' => $_smarty_tpl->tpl_vars['option']->value['picker_params']), $_smarty_tpl); ?> <?php } elseif ($_smarty_tpl->tpl_vars['option']->value['type'] == "enum") { ?> <?php if ($_smarty_tpl->tpl_vars['option']->value['fillings']) { ?> <div class="control-group <?php if ($_smarty_tpl->tpl_vars['editable']->value) { ?> cm-no-hide-input<?php } ?> "> <label class="control-label" for="block_<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['html_id']->value, ENT_QUOTES, 'UTF-8'); ?> _filling"><?php echo $_smarty_tpl->__("filling"); ?> </label> <div class="controls"> <select id="block_<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['html_id']->value, ENT_QUOTES, 'UTF-8'); ?> _filling" name="block_data[content][<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['name']->value, ENT_QUOTES, 'UTF-8'); ?> ][filling]" class="cm-reload-form"> <?php $_smarty_tpl->tpl_vars['v'] = new Smarty_Variable(); $_smarty_tpl->tpl_vars['v']->_loop = false; $_smarty_tpl->tpl_vars['k'] = new Smarty_Variable(); $_from = $_smarty_tpl->tpl_vars['option']->value['fillings']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); } foreach ($_from as $_smarty_tpl->tpl_vars['v']->key => $_smarty_tpl->tpl_vars['v']->value) { $_smarty_tpl->tpl_vars['v']->_loop = true; $_smarty_tpl->tpl_vars['k']->value = $_smarty_tpl->tpl_vars['v']->key; ?> <option value="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['k']->value, ENT_QUOTES, 'UTF-8'); ?> " <?php if ($_smarty_tpl->tpl_vars['block']->value['content'][$_smarty_tpl->tpl_vars['name']->value]['filling'] == $_smarty_tpl->tpl_vars['k']->value) { ?> selected="selected"<?php } ?> ><?php echo $_smarty_tpl->__($_smarty_tpl->tpl_vars['k']->value); ?> </option> <?php } ?> </select> <?php $_smarty_tpl->tpl_vars["filling"] = new Smarty_variable($_smarty_tpl->tpl_vars['block']->value['content'][$_smarty_tpl->tpl_vars['name']->value]['filling'], null, 0); ?> </div> </div> <?php if ($_smarty_tpl->tpl_vars['filling']->value == 'manually') { ?> <div class="control-group <?php if ($_smarty_tpl->tpl_vars['editable']->value) { ?> cm-no-hide-input<?php } ?> "> <?php echo smarty_function_include_ext(array('file' => $_smarty_tpl->tpl_vars['option']->value['fillings']['manually']['picker'], 'checkbox_name' => "block_items", 'data_id' => "objects_" . (string) $_smarty_tpl->tpl_vars['item']->value['chain_id'] . "_", 'input_name' => (string) $_smarty_tpl->tpl_vars['html_name']->value . "[item_ids]", 'item_ids' => $_smarty_tpl->tpl_vars['block']->value['content'][$_smarty_tpl->tpl_vars['name']->value]['item_ids'], 'params_array' => $_smarty_tpl->tpl_vars['option']->value['fillings']['manually']['picker_params'], 'placement' => "right"), $_smarty_tpl); ?> </div> <?php } ?> <?php if (is_array($_smarty_tpl->tpl_vars['option']->value['fillings'][$_smarty_tpl->tpl_vars['filling']->value]['settings'])) { ?> <?php $_smarty_tpl->tpl_vars['setting_data'] = new Smarty_Variable(); $_smarty_tpl->tpl_vars['setting_data']->_loop = false; $_smarty_tpl->tpl_vars['setting_name'] = new Smarty_Variable(); $_from = $_smarty_tpl->tpl_vars['option']->value['fillings'][$_smarty_tpl->tpl_vars['filling']->value]['settings']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); } foreach ($_from as $_smarty_tpl->tpl_vars['setting_data']->key => $_smarty_tpl->tpl_vars['setting_data']->value) { $_smarty_tpl->tpl_vars['setting_data']->_loop = true; $_smarty_tpl->tpl_vars['setting_name']->value = $_smarty_tpl->tpl_vars['setting_data']->key; ?> <?php echo $_smarty_tpl->getSubTemplate("views/block_manager/components/setting_element.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('option' => $_smarty_tpl->tpl_vars['setting_data']->value, 'name' => $_smarty_tpl->tpl_vars['setting_name']->value, 'block' => $_smarty_tpl->tpl_vars['block']->value, 'html_id' => "block_" . (string) $_smarty_tpl->tpl_vars['html_id']->value . "_properties_" . (string) $_smarty_tpl->tpl_vars['name']->value . "_" . (string) $_smarty_tpl->tpl_vars['setting_name']->value, 'html_name' => "block_data[content][" . (string) $_smarty_tpl->tpl_vars['name']->value . "][" . (string) $_smarty_tpl->tpl_vars['setting_name']->value . "]", 'editable' => $_smarty_tpl->tpl_vars['editable']->value, 'value' => $_smarty_tpl->tpl_vars['block']->value['content'][$_smarty_tpl->tpl_vars['name']->value][$_smarty_tpl->tpl_vars['setting_name']->value]), 0); ?> <?php } ?> <?php } ?> <?php } } elseif ($_smarty_tpl->tpl_vars['option']->value['type'] == "template") { ?> <?php echo $_smarty_tpl->getSubTemplate($_smarty_tpl->tpl_vars['option']->value['template'], $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('value' => $_smarty_tpl->tpl_vars['value']->value), 0); ?> <?php } ?> <?php if (!$_smarty_tpl->tpl_vars['option']->value['remove_indent']) { ?> </div></div> <?php } }
function content_55ccef84663c03_45153615($_smarty_tpl) { if (!is_callable('smarty_function_script')) { include '/home/coriolan/public_html/lead/app/functions/smarty_plugins/function.script.php'; } if (!is_callable('smarty_function_include_ext')) { include '/home/coriolan/public_html/lead/app/functions/smarty_plugins/function.include_ext.php'; } fn_preload_lang_vars(array('general', 'status', 'name', 'show_tab_in_popup', 'block', 'select_block', 'select_block', 'global_status', 'active', 'disabled', 'disable_for', 'enable_for')); if ($_smarty_tpl->tpl_vars['tab_data']->value) { ?> <?php $_smarty_tpl->tpl_vars["id"] = new Smarty_variable($_smarty_tpl->tpl_vars['tab_data']->value['tab_id'], null, 0); } else { ?> <?php $_smarty_tpl->tpl_vars["id"] = new Smarty_variable(0, null, 0); } ?> <?php echo smarty_function_script(array('src' => "js/tygh/tabs.js"), $_smarty_tpl); ?> <?php $_smarty_tpl->tpl_vars['html_id'] = new Smarty_variable("tab_" . (string) $_smarty_tpl->tpl_vars['id']->value, null, 0); ?> <script type="text/javascript"> var html_id = "<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['html_id']->value, ENT_QUOTES, 'UTF-8'); ?> "; (function(_, $) { $(document).ready(function() { $(_.doc).on('click', '.cm-remove-block', function(e) { if (confirm(_.tr('text_are_you_sure_to_proceed')) != false) { var parent = $(this).parent(); var block_id = parent.find('input[name="block_id"]').val(); $.ceAjax('request', fn_url('block_manager.block.delete'), { data: {block_id: block_id}, callback: function() { parent.remove(); }, method: 'post' }); } return false; }); $(_.doc).on('click', '.cm-add-block', function(e) { /* Adding new block functionality */ var action = $(this).prop('class').match(/bm-action-([a-zA-Z0-9-_]+)/)[1]; if (action == 'new-block') { var block_type = $(this).find('input[name="block_data[type]"]').val(); var href = 'block_manager.update_block?'; href += 'block_data[type]=' + block_type; href += '&ajax_update=1'; href += '&html_id=' + html_id; href += '&force_close=' + 1; href += '&assign_to=' + 'ajax_update_block_' + html_id; var prop_container = 'new_block_' + block_type; // Remove properties container if it exist if ($('#' + prop_container).length != 0) { $('#' + prop_container).remove(); } // Create properties container var container = $('<div id="' + prop_container + '"></div>').appendTo(_.body); $('#' + prop_container).ceDialog('open', {href: fn_url(href), title: Tygh.tr('add_block') + ': ' + $(this).find('strong').text()}); } else if (action == 'existing-block') { var block_id = $(this).find('input[name="block_id"]').val(); var block_title = $(this).find('.select-block-title').text(); data = { block_data: { block_id: $(this).find('input[name="block_id"]').val() }, assign_to: 'ajax_update_block_' + html_id, force_close: '1' }; $.ceAjax('request', fn_url('block_manager.update_block'), { data: data, method: 'post' }); } $.ceDialog('get_last').ceDialog('close'); }); }); }(Tygh, Tygh.$)); </script> <form action="<?php echo htmlspecialchars(fn_url(''), ENT_QUOTES, 'UTF-8'); ?> " name="update_product_tab_form_<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8'); ?> " method="post" class=" form-horizontal"> <div id="content_group_<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['html_id']->value, ENT_QUOTES, 'UTF-8'); ?> "> <input type="hidden" name="tab_data[tab_id]" value="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8'); ?> " /> <input type="hidden" name="result_ids" value="content_group_tab_<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8'); ?> " /> <div class="tabs cm-j-tabs"> <ul class="nav nav-tabs"> <li id="general_<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['html_id']->value, ENT_QUOTES, 'UTF-8'); ?> " class="cm-js<?php if ($_smarty_tpl->tpl_vars['active_tab']->value == "block_general_" . (string) $_smarty_tpl->tpl_vars['html_id']->value) { ?> active<?php } ?> "> <a><?php echo $_smarty_tpl->__("general"); ?> </a> </li> <?php if ($_smarty_tpl->tpl_vars['dynamic_object_scheme']->value && $_smarty_tpl->tpl_vars['id']->value > 0) { ?> <li id="tab_status_<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['html_id']->value, ENT_QUOTES, 'UTF-8'); ?> " class="cm-js<?php if ($_smarty_tpl->tpl_vars['active_tab']->value == "block_status_" . (string) $_smarty_tpl->tpl_vars['html_id']->value) { ?> active<?php } ?> "> <a><?php echo $_smarty_tpl->__("status"); ?> </a> </li> <?php } ?> </ul> </div> <div class="cm-tabs-content" id="tabs_content_<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['html_id']->value, ENT_QUOTES, 'UTF-8'); ?> "> <div id="content_general_<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['html_id']->value, ENT_QUOTES, 'UTF-8'); ?> "> <fieldset> <div class="control-group"> <label class="cm-required control-label" for="elm_description_<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['html_id']->value, ENT_QUOTES, 'UTF-8'); ?> "><?php echo $_smarty_tpl->__("name"); ?> :</label> <div class="controls"> <input type="text" name="tab_data[name]" value="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['tab_data']->value['name'], ENT_QUOTES, 'UTF-8'); ?> " id="elm_description_<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['html_id']->value, ENT_QUOTES, 'UTF-8'); ?> " class="input-text" size="18" /> </div> </div> <?php if (!$_smarty_tpl->tpl_vars['dynamic_object_scheme']->value) { ?> <?php echo $_smarty_tpl->getSubTemplate("common/select_status.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('input_name' => "tab_data[status]", 'id' => "elm_tab_data_" . (string) $_smarty_tpl->tpl_vars['html_id']->value, 'obj' => $_smarty_tpl->tpl_vars['tab_data']->value), 0); ?> <?php } ?> <div class="control-group"> <label for="elm_show_in_popup_<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['html_id']->value, ENT_QUOTES, 'UTF-8'); ?> " class="control-label"><?php echo $_smarty_tpl->__("show_tab_in_popup"); ?> :</label> <div class="controls"> <input type="hidden" name="tab_data[show_in_popup]" value="N" /> <input type="checkbox" name="tab_data[show_in_popup]" id="elm_show_in_popup_<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['html_id']->value, ENT_QUOTES, 'UTF-8'); ?> " <?php if ($_smarty_tpl->tpl_vars['tab_data']->value['show_in_popup'] == "Y") { ?> checked="checked"<?php } ?> value="Y"> </div> </div> <?php if ($_smarty_tpl->tpl_vars['tab_data']->value['is_primary'] !== 'Y' && fn_check_view_permissions("block_manager.update_block")) { ?> <div class="control-group"> <label for="ajax_update_block_<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['html_id']->value, ENT_QUOTES, 'UTF-8'); ?> " class="cm-required control-label"><?php echo $_smarty_tpl->__("block"); ?> :</label> <div class="controls clearfix help-inline-wrap"> <?php echo $_smarty_tpl->getSubTemplate("common/popupbox.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('act' => "general", 'id' => "select_block_" . (string) $_smarty_tpl->tpl_vars['html_id']->value, 'text' => __("select_block"), 'link_text' => __("select_block"), 'href' => "block_manager.block_selection?extra_id=" . (string) $_smarty_tpl->tpl_vars['tab_data']->value['tab_id'] . "&on_product_tabs=1", 'action' => "block_manager.block_selection", 'opener_ajax_class' => "cm-ajax cm-ajax-force", 'content' => '', 'meta' => "pull-left"), 0); ?> <br><br> <div id="ajax_update_block_<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['html_id']->value, ENT_QUOTES, 'UTF-8'); ?> "> <input type="hidden" name="block_data[block_id]" id="ajax_update_block_<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['html_id']->value, ENT_QUOTES, 'UTF-8'); ?> " value="<?php echo htmlspecialchars(($tmp = @$_smarty_tpl->tpl_vars['tab_data']->value['block_id']) === null || $tmp === '' ? '' : $tmp, ENT_QUOTES, 'UTF-8'); ?> " /> <?php if ($_smarty_tpl->tpl_vars['tab_data']->value['block_id'] > 0) { ?> <?php echo $_smarty_tpl->getSubTemplate("views/block_manager/render/block.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('block_data' => $_smarty_tpl->tpl_vars['block_data']->value, 'external_render' => true, 'external_id' => $_smarty_tpl->tpl_vars['html_id']->value), 0); ?> <?php } ?> <!--ajax_update_block_<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['html_id']->value, ENT_QUOTES, 'UTF-8'); ?> --></div> </div> </div> <?php } ?> </fieldset> </div> <?php if ($_smarty_tpl->tpl_vars['dynamic_object_scheme']->value && $_smarty_tpl->tpl_vars['id']->value > 0) { ?> <div id="content_tab_status_<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['html_id']->value, ENT_QUOTES, 'UTF-8'); ?> " > <fieldset> <div class="control-group"> <label class="control-label"><?php echo $_smarty_tpl->__("global_status"); ?> :</label> <div class="controls"> <label class="radio text-value"><?php if ($_smarty_tpl->tpl_vars['tab_data']->value['status'] == 'A') { echo $_smarty_tpl->__("active"); } else { echo $_smarty_tpl->__("disabled"); } ?> </label> </div> </div> <input type="hidden" class="cm-no-hide-input" name="snapping_data[object_type]" value="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['dynamic_object_scheme']->value['object_type'], ENT_QUOTES, 'UTF-8'); ?> " /> <div class="control-group"> <label class="control-label"><?php if ($_smarty_tpl->tpl_vars['tab_data']->value['status'] == 'A') { echo $_smarty_tpl->__("disable_for"); } else { echo $_smarty_tpl->__("enable_for"); } ?> :</label> <div class="controls"> <?php echo smarty_function_include_ext(array('file' => $_smarty_tpl->tpl_vars['dynamic_object_scheme']->value['picker'], 'data_id' => "tab_" . (string) $_smarty_tpl->tpl_vars['html_id']->value . "_product_ids", 'input_name' => "tab_data[product_ids]", 'item_ids' => $_smarty_tpl->tpl_vars['tab_data']->value['product_ids'], 'view_mode' => "links", 'params_array' => $_smarty_tpl->tpl_vars['dynamic_object_scheme']->value['picker_params']), $_smarty_tpl); ?> </div> </div> </fieldset> <!--content_tab_status_<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['html_id']->value, ENT_QUOTES, 'UTF-8'); ?> --></div> <?php } ?> </div> <!--content_group_<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['html_id']->value, ENT_QUOTES, 'UTF-8'); ?> --></div> <div class="buttons-container"> <?php echo $_smarty_tpl->getSubTemplate("buttons/save_cancel.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('but_name' => "dispatch[tabs.update]", 'cancel_action' => "close", 'save' => $_smarty_tpl->tpl_vars['id']->value), 0); ?> </div> </form><?php }