<?php
/* Smarty version 3.1.33, created on 2022-01-24 19:59:59
  from '/home/recursosspa/public_html/testlink/gui/templates/testcases/tcEdit.tpl' */

/* @var Smarty_Internal_Template $_smarty_tpl */
if ($_smarty_tpl->_decodeProperties($_smarty_tpl, array (
  'version' => '3.1.33',
  'unifunc' => 'content_61ef053f9ce369_88505579',
  'has_nocache_code' => false,
  'file_dependency' => 
  array (
    '1e866c3091e206d752b7b24dcd8b4be156271db2' => 
    array (
      0 => '/home/recursosspa/public_html/testlink/gui/templates/testcases/tcEdit.tpl',
      1 => 1643038979,
      2 => 'file',
    ),
  ),
  'includes' => 
  array (
    'file:inc_head.tpl' => 1,
    'file:inc_del_onclick.tpl' => 1,
    'file:testcases/tcEdit_New_viewer.tpl' => 1,
    'file:inc_refreshTreeWithFilters.tpl' => 1,
  ),
),false)) {
function content_61ef053f9ce369_88505579 (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'=>"warning,warning_empty_tc_title,btn_save,warning_estimated_execution_duration_format,
             version,title_edit_tc,cancel,warning_unsaved"),$_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','jsValidate'=>"yes",'editorType'=>$_smarty_tpl->tpl_vars['gui']->value->editorType), 0, false);
?>

<?php $_smarty_tpl->_subTemplateRender("file:inc_del_onclick.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 echo '<script'; ?>
 language="javascript" src="gui/javascript/ext_extensions.js" type="text/javascript"><?php echo '</script'; ?>
>
<?php echo '<script'; ?>
 language="javascript" src="gui/javascript/tcase_utils.js" type="text/javascript"><?php echo '</script'; ?>
>

<?php $_smarty_tpl->_assignInScope('opt_cfg', $_smarty_tpl->tpl_vars['gui']->value->opt_cfg);
echo '<script'; ?>
 type="text/javascript" language="JavaScript">
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");
<?php echo '</script'; ?>
>

<?php echo '<script'; ?>
 type="text/javascript">
var warning_empty_testcase_name = "<?php echo strtr($_smarty_tpl->tpl_vars['labels']->value['warning_empty_tc_title'], array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\/" ));?>
";
var alert_box_title = "<?php echo strtr($_smarty_tpl->tpl_vars['labels']->value['warning'], array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\/" ));?>
";
var warning_estimated_execution_duration_format = "<?php echo strtr($_smarty_tpl->tpl_vars['labels']->value['warning_estimated_execution_duration_format'], array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\/" ));?>
";


/**
 * validate certain form controls before submitting
 *
 */
function validateForm(the_form)
{
  var status_ok = true;
  
  if (isWhitespace(the_form.testcase_name.value))
  {
    alert_message(alert_box_title,warning_empty_testcase_name);
    selectField(the_form,'testcase_name');
    return false;
  }

  var val2check = the_form.estimated_execution_duration.value;
  if( isNaN(val2check) || /^\s+$/.test(val2check.trim()))
  {
    alert_message(alert_box_title,warning_estimated_execution_duration_format);
    return false;
  }

  var cf_designTime = document.getElementById('cfields_design_time');
  if (cf_designTime)
  {
    var cfields_container = cf_designTime.getElementsByTagName('input');
    var cfieldsChecks = validateCustomFields(cfields_container);
    if(!cfieldsChecks.status_ok)
    {
      var warning_msg = cfMessages[cfieldsChecks.msg_id];
      alert_message(alert_box_title,warning_msg.replace(/%s/, cfieldsChecks.cfield_label));
      return false;
    }

    cfields_container = cf_designTime.getElementsByTagName('textarea');
    cfieldsChecks = validateCustomFields(cfields_container);
    if(!cfieldsChecks.status_ok)
    {
      var warning_msg = cfMessages[cfieldsChecks.msg_id];
      alert_message(alert_box_title,warning_msg.replace(/%s/, cfieldsChecks.cfield_label));
      return false;
    }
  }
  return Ext.ux.requireSessionAndSubmit(the_form);
}
<?php echo '</script'; ?>
>

<?php if ($_smarty_tpl->tpl_vars['tlCfg']->value->gui->checkNotSaved) {?>
  <?php echo '<script'; ?>
 type="text/javascript">
  var unload_msg = "<?php echo strtr($_smarty_tpl->tpl_vars['labels']->value['warning_unsaved'], array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\/" ));?>
";
  var tc_editor = "<?php echo $_smarty_tpl->tpl_vars['gui']->value->editorType;?>
";
  <?php echo '</script'; ?>
>
  <?php echo '<script'; ?>
 src="gui/javascript/checkmodified.js" type="text/javascript"><?php echo '</script'; ?>
>
<?php }?>
</head>

<body onLoad="<?php echo $_smarty_tpl->tpl_vars['opt_cfg']->value->js_ot_name;?>
.init(document.forms[0]);focusInputField('testcase_name')">
<?php
$_smarty_tpl->smarty->ext->configLoad->_loadConfigFile($_smarty_tpl, "input_dimensions.conf", "tcNew", 0);
?>

<h1 class="title"><?php echo $_smarty_tpl->tpl_vars['labels']->value['title_edit_tc'];
echo @constant('TITLE_SEP');
echo htmlspecialchars($_smarty_tpl->tpl_vars['gui']->value->tc['name'], ENT_QUOTES, 'UTF-8', true);?>

  <?php echo @constant('TITLE_SEP_TYPE3');
echo $_smarty_tpl->tpl_vars['labels']->value['version'];?>
 <?php echo $_smarty_tpl->tpl_vars['gui']->value->tc['version'];?>
</h1> 

<div class="workBack" style="width:97%;">

<?php if ($_smarty_tpl->tpl_vars['gui']->value->has_been_executed) {?>
    <?php echo call_user_func_array( $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['lang_get'][0], array( array('s'=>'warning_editing_executed_tc','var'=>"warning_edit_msg"),$_smarty_tpl ) );?>

    <div class="messages" align="center"><?php echo $_smarty_tpl->tpl_vars['warning_edit_msg']->value;?>
</div>
<?php }?>

<form method="post" action="<?php echo $_smarty_tpl->tpl_vars['basehref']->value;?>
lib/testcases/tcEdit.php" name="tc_edit"
      onSubmit="return validateForm(this);">

  <input type="hidden" name="testsuite_id" id="testsuite_id" value="<?php echo $_smarty_tpl->tpl_vars['gui']->value->tc['testsuite_id'];?>
" />
  <input type="hidden" name="testcase_id" id="testcase_id" value="<?php echo $_smarty_tpl->tpl_vars['gui']->value->tc['testcase_id'];?>
" />
  <input type="hidden" name="tcversion_id" value="<?php echo $_smarty_tpl->tpl_vars['gui']->value->tc['id'];?>
" />
  <input type="hidden" name="version" value="<?php echo $_smarty_tpl->tpl_vars['gui']->value->tc['version'];?>
" />
  <input type="hidden" name="doAction" value="" />
  <input type="hidden" name="show_mode" value="<?php echo $_smarty_tpl->tpl_vars['gui']->value->show_mode;?>
" />
  
    <div class="groupBtn">
    <input id="do_update" type="submit" name="do_update" 
           onclick="show_modified_warning=false; doAction.value='doUpdate'" value="<?php echo $_smarty_tpl->tpl_vars['labels']->value['btn_save'];?>
" />
    
    <input type="button" name="go_back" value="<?php echo $_smarty_tpl->tpl_vars['labels']->value['cancel'];?>
" 
           onclick="show_modified_warning=false; 
                    javascript: <?php if (isset($_smarty_tpl->tpl_vars['gui']->value->cancelActionJS)) {
echo $_smarty_tpl->tpl_vars['gui']->value->cancelActionJS;?>
 <?php } else { ?> history.back() <?php }?>;"/>
  </div>  
  <?php $_smarty_tpl->_subTemplateRender("file:testcases/tcEdit_New_viewer.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array(), 0, false);
?>
  
    <div class="groupBtn">
    <input id="do_update_bottom" type="submit" name="do_update" 
           onclick="show_modified_warning=false; doAction.value='doUpdate'" value="<?php echo $_smarty_tpl->tpl_vars['labels']->value['btn_save'];?>
" />
    <input type="button" name="go_back_bottom" value="<?php echo $_smarty_tpl->tpl_vars['labels']->value['cancel'];?>
" 
           onclick="show_modified_warning=false; 
                    javascript: <?php if (isset($_smarty_tpl->tpl_vars['gui']->value->cancelActionJS)) {
echo $_smarty_tpl->tpl_vars['gui']->value->cancelActionJS;?>
 <?php } else { ?> history.back() <?php }?>;"/>
  </div>  
</form>

<?php echo '<script'; ?>
 type="text/javascript" defer="1">
    document.forms[0].testcase_name.focus();
<?php echo '</script'; ?>
>

<?php if (isset($_smarty_tpl->tpl_vars['gui']->value->refreshTree) && $_smarty_tpl->tpl_vars['gui']->value->refreshTree) {?>
  <?php $_smarty_tpl->_subTemplateRender("file:inc_refreshTreeWithFilters.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array(), 0, false);
}?>

</div>
</body>
</html>
<?php }
}
