<?php
/* Smarty version 3.1.33, created on 2025-10-17 09:16:57
  from 'C:\php5.6\htdocs\testlink-1.9.20\gui\templates\tl-classic\codetrackers\codeTrackerEdit.tpl' */

/* @var Smarty_Internal_Template $_smarty_tpl */
if ($_smarty_tpl->_decodeProperties($_smarty_tpl, array (
  'version' => '3.1.33',
  'unifunc' => 'content_68f1ed69c2c095_78116673',
  'has_nocache_code' => false,
  'file_dependency' => 
  array (
    '74dada552e6d63e5212f2e26d5fd082aefc1706b' => 
    array (
      0 => 'C:\\php5.6\\htdocs\\testlink-1.9.20\\gui\\templates\\tl-classic\\codetrackers\\codeTrackerEdit.tpl',
      1 => 1579460696,
      2 => 'file',
    ),
  ),
  'includes' => 
  array (
    'file:inc_head.tpl' => 1,
    'file:inc_del_onclick.tpl' => 1,
    'file:bootstrap.inc.tpl' => 1,
    'file:inc_feedback.tpl' => 1,
    'file:error_icon.tpl' => 1,
  ),
),false)) {
function content_68f1ed69c2c095_78116673 (Smarty_Internal_Template $_smarty_tpl) {
$_smarty_tpl->_checkPlugins(array(0=>array('file'=>'C:\\php5.6\\htdocs\\testlink-1.9.20\\vendor\\smarty\\smarty\\libs\\plugins\\modifier.replace.php','function'=>'smarty_modifier_replace',),1=>array('file'=>'C:\\php5.6\\htdocs\\testlink-1.9.20\\vendor\\smarty\\smarty\\libs\\plugins\\function.html_options.php','function'=>'smarty_function_html_options',),));
$_smarty_tpl->_assignInScope('url_args', "lib/codetrackers/codeTrackerEdit.php");
$_smarty_tpl->_assignInScope('edit_url', ((string)$_smarty_tpl->tpl_vars['basehref']->value).((string)$_smarty_tpl->tpl_vars['url_args']->value));?>

<?php echo call_user_func_array( $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['lang_get'][0], array( array('var'=>'labels','s'=>'warning,warning_empty_codetracker_name,warning_empty_codetracker_type,
             show_event_history,th_codetracker,th_codetracker_type,config,btn_cancel,
             codetracker_show_cfg_example,codetracker_cfg_example,used_on_testproject,btn_check_connection,
             codeTracker_connection_ok,codeTracker_connection_ko'),$_smarty_tpl ) );?>


<?php $_smarty_tpl->_subTemplateRender("file:inc_head.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array('jsValidate'=>"yes",'openHead'=>"yes"), 0, false);
$_smarty_tpl->_subTemplateRender("file:inc_del_onclick.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array(), 0, false);
?>

<?php echo '<script'; ?>
 type="text/javascript">
var warning_empty_codetracker_name = "<?php echo strtr($_smarty_tpl->tpl_vars['labels']->value['warning_empty_codetracker_name'], array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\/" ));?>
";
var alert_box_title = "<?php echo strtr($_smarty_tpl->tpl_vars['labels']->value['warning'], array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\/" ));?>
";
function validateForm(f)
{
  if (isWhitespace(f.name.value))
  {
      alert_message(alert_box_title,warning_empty_codetracker_name);
      selectField(f, 'name');
      return false;
  }
  return true;
}

function displayCTSCfgExample(oid,displayOID)
{
	var type;
	type = Ext.get(oid).getValue();
	Ext.Ajax.request({
		url: fRoot+'lib/ajax/getcodetrackercfgtemplate.php',
		method: 'GET',
		params: {
			type: type
		},
		success: function(result, request) {
			var obj = Ext.util.JSON.decode(result.responseText);
      // after 
      // include of jquery and upgrade of prototype
      // I've started with issues $
      document.getElementById(displayOID).innerHTML = obj['cfg'];
		},
		failure: function (result, request) {
		}
	});
	
}


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

<?php $_smarty_tpl->_subTemplateRender("file:bootstrap.inc.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array(), 0, false);
?> 
</head>

<body>
<?php $_smarty_tpl->_assignInScope('cfg_section', smarty_modifier_replace(call_user_func_array($_smarty_tpl->registered_plugins[ 'modifier' ][ 'basename' ][ 0 ], array( basename($_smarty_tpl->source->filepath) )),".tpl",''));
$_smarty_tpl->smarty->ext->configLoad->_loadConfigFile($_smarty_tpl, "input_dimensions.conf", $_smarty_tpl->tpl_vars['cfg_section']->value, 0);
?>


<h1 class="title"><?php echo htmlspecialchars($_smarty_tpl->tpl_vars['gui']->value->main_descr, ENT_QUOTES, 'UTF-8', true);?>
</h1>

<?php if ($_smarty_tpl->tpl_vars['gui']->value->canManage != '') {?>
  <div class="workBack">
  
  <div class="action_descr"><?php echo htmlspecialchars($_smarty_tpl->tpl_vars['gui']->value->action_descr, ENT_QUOTES, 'UTF-8', true);?>

  	<?php if ($_smarty_tpl->tpl_vars['gui']->value->mgt_view_events == "yes" && $_smarty_tpl->tpl_vars['gui']->value->item['id'] > 0) {?>
			<img style="margin-left:5px;" class="clickable" src="<?php echo $_smarty_tpl->tpl_vars['tlImages']->value['info'];?>
"
				 onclick="showEventHistoryFor('<?php echo $_smarty_tpl->tpl_vars['gui']->value->item['id'];?>
','codetrackers')" 
				 alt="<?php echo $_smarty_tpl->tpl_vars['labels']->value['show_event_history'];?>
" title="<?php echo $_smarty_tpl->tpl_vars['labels']->value['show_event_history'];?>
"/>
	<?php }?>
  
  </div><br />
  <?php $_smarty_tpl->_subTemplateRender("file:inc_feedback.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array('user_feedback'=>$_smarty_tpl->tpl_vars['gui']->value->user_feedback), 0, false);
?>

  <?php if ($_smarty_tpl->tpl_vars['gui']->value->connectionStatus == 'ok') {?>
    <?php echo $_smarty_tpl->tpl_vars['labels']->value['codeTracker_connection_ok'];?>

  <?php } elseif ($_smarty_tpl->tpl_vars['gui']->value->connectionStatus == 'ko') {?>    
    <?php echo $_smarty_tpl->tpl_vars['labels']->value['codeTracker_connection_ko'];?>

  <?php }?>

  	<form name="edit" method="post" action="<?php echo $_smarty_tpl->tpl_vars['edit_url']->value;?>
" onSubmit="javascript:return validateForm(this);">
  	<table class="common" style="width:50%">
  		<tr>
  			<th><?php echo $_smarty_tpl->tpl_vars['labels']->value['th_codetracker'];?>
</th>
  			<td><input type="text" name="name" id="name"  
  			           size="<?php echo $_smarty_tpl->smarty->ext->configLoad->_getConfigVariable($_smarty_tpl, 'CODETRACKER_NAME_SIZE');?>
" maxlength="<?php echo $_smarty_tpl->smarty->ext->configLoad->_getConfigVariable($_smarty_tpl, 'CODETRACKER_NAME_MAXLEN');?>
" 
  				         value="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['gui']->value->item['name'], ENT_QUOTES, 'UTF-8', true);?>
" />
			  		<?php $_smarty_tpl->_subTemplateRender("file:error_icon.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array('field'=>"name"), 0, false);
?>
			  </td>				
  		</tr>
  		<tr>
  			<th><?php echo $_smarty_tpl->tpl_vars['labels']->value['th_codetracker_type'];?>
</th>
			<td>
  			<select id="type" name="type">
  				<?php echo smarty_function_html_options(array('options'=>$_smarty_tpl->tpl_vars['gui']->value->typeDomain,'selected'=>$_smarty_tpl->tpl_vars['gui']->value->item['type']),$_smarty_tpl);?>

  			</select>
  			<a href="javascript:displayCTSCfgExample('type','cfg_example')"><?php echo $_smarty_tpl->tpl_vars['labels']->value['codetracker_show_cfg_example'];?>
</a>
			</td>
  		</tr>
		
  		<tr>
  			<th><?php echo $_smarty_tpl->tpl_vars['labels']->value['config'];?>
</th>
  			<td><textarea name="cfg" rows="<?php echo $_smarty_tpl->smarty->ext->configLoad->_getConfigVariable($_smarty_tpl, 'CODETRACKER_CFG_ROWS');?>
" 
  									 cols="<?php echo $_smarty_tpl->smarty->ext->configLoad->_getConfigVariable($_smarty_tpl, 'CODETRACKER_CFG_COLS');?>
"><?php echo $_smarty_tpl->tpl_vars['gui']->value->item['cfg'];?>
</textarea></td>
  		</tr>
  		<tr>
  			<th><?php echo $_smarty_tpl->tpl_vars['labels']->value['codetracker_cfg_example'];?>
</th>
  			<td name="cfg_example" id="cfg_example">&nbsp;</td>
  		</tr>
  	</table>

	<?php if ($_smarty_tpl->tpl_vars['gui']->value->testProjectSet != '') {?>
  	<table class="common" style="width:50%">
		<tr>
			<th>
			<?php echo $_smarty_tpl->tpl_vars['labels']->value['used_on_testproject'];?>

			</th>
		</tr>
		<?php
$_from = $_smarty_tpl->smarty->ext->_foreach->init($_smarty_tpl, $_smarty_tpl->tpl_vars['gui']->value->testProjectSet, 'item_def', false, 'item_id');
if ($_from !== null) {
foreach ($_from as $_smarty_tpl->tpl_vars['item_id']->value => $_smarty_tpl->tpl_vars['item_def']->value) {
?>
		<tr>
			<td>
			<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['item_def']->value['testproject_name'], ENT_QUOTES, 'UTF-8', true);?>

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

  	<div class="groupBtn">	
	<input type="hidden" name="id" id="id" value="<?php echo $_smarty_tpl->tpl_vars['gui']->value->item['id'];?>
">
  	<input type="hidden" name="doAction" value="<?php echo $_smarty_tpl->tpl_vars['gui']->value->operation;?>
" />
    <input class="btn btn-primary" type="submit" name="create" id="create" value="<?php echo $_smarty_tpl->tpl_vars['gui']->value->submit_button_label;?>
"
	         onclick="doAction.value='<?php echo $_smarty_tpl->tpl_vars['gui']->value->operation;?>
'" />
    <input class="btn btn-primary" type="submit" name="checkConnection" id="checkConnection" 
           value="<?php echo $_smarty_tpl->tpl_vars['labels']->value['btn_check_connection'];?>
"
           onclick="doAction.value='checkConnection'" />
  	<input class="btn btn-primary" type="button" value="<?php echo $_smarty_tpl->tpl_vars['labels']->value['btn_cancel'];?>
"
	         onclick="javascript:location.href=fRoot+'lib/codetrackers/codeTrackerView.php'" />
  	</div>
  	</form>
  </div>
<?php }?>
</body>
</html>
<?php }
}
