<?php
/* Smarty version 3.1.33, created on 2021-12-20 20:41:27
  from '/opt/lampp/htdocs/testlink/gui/templates/platforms/platformsAssign.tpl' */

/* @var Smarty_Internal_Template $_smarty_tpl */
if ($_smarty_tpl->_decodeProperties($_smarty_tpl, array (
  'version' => '3.1.33',
  'unifunc' => 'content_61c0dc6775dd68_93212571',
  'has_nocache_code' => false,
  'file_dependency' => 
  array (
    '5cbae27882e35d728faf7782b29f597e7faebfae' => 
    array (
      0 => '/opt/lampp/htdocs/testlink/gui/templates/platforms/platformsAssign.tpl',
      1 => 1636032772,
      2 => 'file',
    ),
  ),
  'includes' => 
  array (
    'file:inc_head.tpl' => 1,
    'file:inc_ext_js.tpl' => 1,
    'file:opt_transfer.inc.tpl' => 1,
  ),
),false)) {
function content_61c0dc6775dd68_93212571 (Smarty_Internal_Template $_smarty_tpl) {
echo call_user_func_array( $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['lang_get'][0], array( array('var'=>"labels",'s'=>"title_platforms,menu_assign_platform_to_testplan,
             platform_unlink_warning_title,platform_unlink_warning_message,
             platform_assignment_no_testplan,btn_save"),$_smarty_tpl ) );?>


<?php $_smarty_tpl->_subTemplateRender("file:inc_head.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array('openHead'=>'yes'), 0, false);
$_smarty_tpl->_subTemplateRender("file:inc_ext_js.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array(), 0, false);
echo '<script'; ?>
 language="JavaScript" src="gui/javascript/OptionTransfer.js" type="text/javascript"><?php echo '</script'; ?>
>
<?php echo '<script'; ?>
 language="JavaScript" src="gui/javascript/expandAndCollapseFunctions.js" type="text/javascript"><?php echo '</script'; ?>
>

<?php if ($_smarty_tpl->tpl_vars['gui']->value->can_do) {?>
  <?php echo '<script'; ?>
 type="text/javascript" language="JavaScript">
<?php echo $_smarty_tpl->tpl_vars['gui']->value->platform_count_js;?>


  var <?php echo $_smarty_tpl->tpl_vars['opt_cfg']->value->js_ot_name;?>
 = new OptionTransfer("<?php echo $_smarty_tpl->tpl_vars['opt_cfg']->value->from->name;?>
","<?php echo $_smarty_tpl->tpl_vars['opt_cfg']->value->to->name;?>
");
  <?php echo $_smarty_tpl->tpl_vars['opt_cfg']->value->js_ot_name;?>
.saveRemovedLeftOptions("<?php echo $_smarty_tpl->tpl_vars['opt_cfg']->value->js_ot_name;?>
_removedLeft");
  <?php echo $_smarty_tpl->tpl_vars['opt_cfg']->value->js_ot_name;?>
.saveRemovedRightOptions("<?php echo $_smarty_tpl->tpl_vars['opt_cfg']->value->js_ot_name;?>
_removedRight");
  <?php echo $_smarty_tpl->tpl_vars['opt_cfg']->value->js_ot_name;?>
.saveAddedLeftOptions("<?php echo $_smarty_tpl->tpl_vars['opt_cfg']->value->js_ot_name;?>
_addedLeft");
  <?php echo $_smarty_tpl->tpl_vars['opt_cfg']->value->js_ot_name;?>
.saveAddedRightOptions("<?php echo $_smarty_tpl->tpl_vars['opt_cfg']->value->js_ot_name;?>
_addedRight");
  <?php echo $_smarty_tpl->tpl_vars['opt_cfg']->value->js_ot_name;?>
.saveNewLeftOptions("<?php echo $_smarty_tpl->tpl_vars['opt_cfg']->value->js_ot_name;?>
_newLeft");
  <?php echo $_smarty_tpl->tpl_vars['opt_cfg']->value->js_ot_name;?>
.saveNewRightOptions("<?php echo $_smarty_tpl->tpl_vars['opt_cfg']->value->js_ot_name;?>
_newRight");


/* Checks if any of the removed platforms has linked testcases.
 * If that is the case, an alert dialog is displayed
 *
 * 20091201 - Eloff - Added transferLeft function
 */
<?php echo $_smarty_tpl->tpl_vars['opt_cfg']->value->js_ot_name;?>
.transferLeft=function(){
	options = this.right.options;
	num_with_linked_to_move = 0;
	for(idx=0; idx<options.length; idx++) {
		if(options[idx].selected && platform_count_map[options[idx].text] > 0) {
			num_with_linked_to_move++;
		}
	}
	// Don't allow removal of platforms with linked TCs.
	if (num_with_linked_to_move > 0) {
		Ext.Msg.alert("<?php echo $_smarty_tpl->tpl_vars['labels']->value['platform_unlink_warning_title'];?>
",
		                "<?php echo $_smarty_tpl->tpl_vars['labels']->value['platform_unlink_warning_message'];?>
");
	}
	else {
		// this is the default call from option transfer
		moveSelectedOptions(this.right,this.left,this.autoSort,this.staticOptionRegex); this.update();
	}
};

// Select all options in right panel, and move to left
<?php echo $_smarty_tpl->tpl_vars['opt_cfg']->value->js_ot_name;?>
.transferAllLeft=function(){
	options = this.right.options;
	Ext.query("option", this.right).each(function(el, i) {
			el.selected = true;
		});
	this.transferLeft();
};

  <?php echo '</script'; ?>
>
<?php }?>
</head>

<body <?php if ($_smarty_tpl->tpl_vars['gui']->value->can_do) {?> onLoad="<?php echo $_smarty_tpl->tpl_vars['opt_cfg']->value->js_ot_name;?>
.init(document.forms[0])" <?php }?>>

<div class="workBack">
	<h1 class="title"><?php echo $_smarty_tpl->tpl_vars['gui']->value->mainTitle;?>
</h1>

<?php if ($_smarty_tpl->tpl_vars['gui']->value->warning != '') {?>
    <?php echo $_smarty_tpl->tpl_vars['gui']->value->warning;?>

<?php }?>

<?php if ($_smarty_tpl->tpl_vars['gui']->value->can_do) {?>
		<div style="margin-top: 25px;">
			<form method="post" action="lib/platforms/platformsAssign.php?tplan_id=<?php echo $_smarty_tpl->tpl_vars['gui']->value->tplan_id;?>
">
			  <input type="hidden" name="doAction" value="">
				<?php $_smarty_tpl->_subTemplateRender("file:opt_transfer.inc.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array('option_transfer'=>$_smarty_tpl->tpl_vars['opt_cfg']->value), 0, false);
?>
				<br />
				<input type="submit" name="doAssignPlatforms" value="<?php echo $_smarty_tpl->tpl_vars['labels']->value['btn_save'];?>
" 
				       onclick="doAction.value='doAssignPlatforms'"	/>
			</form>
		</div>
	<?php } else { ?>
	  <?php echo $_smarty_tpl->tpl_vars['labels']->value['platform_assignment_no_testplan'];?>

	<?php }?>
</div>
</body>
</html>
<?php }
}
