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

/* @var Smarty_Internal_Template $_smarty_tpl */
if ($_smarty_tpl->_decodeProperties($_smarty_tpl, array (
  'version' => '3.1.33',
  'unifunc' => 'content_68f1ecc6a34d70_99652775',
  'has_nocache_code' => false,
  'file_dependency' => 
  array (
    '2cabb0c0ee3b259c30f8edd65b8ce223ee346c36' => 
    array (
      0 => 'C:\\php5.6\\htdocs\\testlink-1.9.20\\gui\\templates\\tl-classic\\plan\\planMilestonesEdit.tpl',
      1 => 1579460696,
      2 => 'file',
    ),
  ),
  'includes' => 
  array (
    'file:inc_head.tpl' => 1,
    'file:inc_ext_js.tpl' => 1,
    'file:inc_del_onclick.tpl' => 1,
    'file:inc_update.tpl' => 1,
    'file:error_icon.tpl' => 4,
  ),
),false)) {
function content_68f1ecc6a34d70_99652775 (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',),));
echo call_user_func_array( $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['lang_get'][0], array( array('var'=>'labels','s'=>'show_event_history,warning_empty_milestone_name,
                          warning_empty_low_priority_tcases,warning_empty_medium_priority_tcases,
                          warning_empty_high_priority_tcases,info_milestones_date,
                          warning_invalid_percentage_value,warning_must_be_number,
                          btn_cancel,warning,start_date,info_milestones_start_date,
                          th_name,th_date_format,th_perc_a_prio,th_perc_b_prio,th_perc_c_prio,
                          th_perc_testcases,th_delete,alt_delete_milestone,show_calender,
                          clear_date,info_milestone_create_prio,info_milestone_create_no_prio'),$_smarty_tpl ) );?>


<?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);
?>


<?php $_smarty_tpl->_assignInScope('managerURL', "lib/plan/planMilestonesEdit.php");
$_smarty_tpl->_assignInScope('editAction', ((string)$_smarty_tpl->tpl_vars['managerURL']->value)."?doAction=edit&tplan_id=");
$_smarty_tpl->_assignInScope('deleteAction', ((string)$_smarty_tpl->tpl_vars['managerURL']->value)."?doAction=doDelete&tplan_id=");
$_smarty_tpl->_assignInScope('createAction', ((string)$_smarty_tpl->tpl_vars['managerURL']->value)."?doAction=create&tplan_id=");?>


<?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_ext_js.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array('bResetEXTCss'=>1), 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">

// BUGID 3943: Escape all messages (string)
var alert_box_title = "<?php echo strtr($_smarty_tpl->tpl_vars['labels']->value['warning'], array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\/" ));?>
";
var warning_invalid_percentage_value = "<?php echo strtr($_smarty_tpl->tpl_vars['labels']->value['warning_invalid_percentage_value'], array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\/" ));?>
";
var warning_must_be_number = "<?php echo strtr($_smarty_tpl->tpl_vars['labels']->value['warning_must_be_number'], array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\/" ));?>
";

var warning_empty = new Object;
warning_empty.milestone_name  = "<?php echo strtr($_smarty_tpl->tpl_vars['labels']->value['warning_empty_milestone_name'], array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\/" ));?>
";
warning_empty.low_priority_tcases = "<?php echo strtr($_smarty_tpl->tpl_vars['labels']->value['warning_empty_low_priority_tcases'], array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\/" ));?>
";
warning_empty.medium_priority_tcases = "<?php echo strtr($_smarty_tpl->tpl_vars['labels']->value['warning_empty_medium_priority_tcases'], array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\/" ));?>
";
warning_empty.high_priority_tcases = "<?php echo strtr($_smarty_tpl->tpl_vars['labels']->value['warning_empty_high_priority_tcases'], array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\/" ));?>
";



var warning_nonumeric_low_priority_tcases = 'no numeric';


/*
  function: validateForm
            validate form inputs, doing several checks like:
            - fields that can not be empty

            if some check fails:
            1. an alert message is displayed
            2. background color of offending field is changed.

  args : f: form object

  returns: true  -> all checks ok
           false -> when a check fails
*/

function validateForm(f)
{
  var numeric_check = /[^\d]/;
  var idx;
  var obj;
  var dummy;

  // Very Important: name and id must be the same for these HTML field
  var fields2check = new Array('low_priority_tcases','medium_priority_tcases','high_priority_tcases');
    
  if (isWhitespace(f.milestone_name.value))
  {
      alert_message(alert_box_title,warning_empty.milestone_name);
      selectField(f, 'milestone_name');
      return false;
  }

  for(idx=0; idx < fields2check.length; idx++)
  {
      obj = document.getElementById(fields2check[idx]);
      if (isWhitespace(obj.value))
      {
          alert_message(alert_box_title,warning_empty[fields2check[idx]]);
          selectField(f, fields2check[idx]);
          return false;
      }

      dummy = obj.value.trim();   // IMPORTANT: trim is function provided by EXT-JS library
      if(numeric_check.test(dummy))
      {
          alert_message(alert_box_title,warning_must_be_number);
          selectField(f, fields2check[idx]);
          return false;
      }
   
      if(dummy < 0 || dummy > 100)
      {
          alert_message(alert_box_title,warning_invalid_percentage_value);
          selectField(f, fields2check[idx]);
          return false;
      }
  }

}

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

</head>

<body class="testlink">

<div class="workBack">
  <?php $_smarty_tpl->_subTemplateRender("file:inc_update.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);
?>
	<h2>
	<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['gui']->value->action_descr, ENT_QUOTES, 'UTF-8', true);?>

	<?php if ($_smarty_tpl->tpl_vars['gui']->value->milestone['id'] > 0) {?>
		<?php if ($_smarty_tpl->tpl_vars['gui']->value->grants->mgt_view_events == "yes") {?>
			<img style="margin-left:5px;" class="clickable" src="<?php echo @constant('TL_THEME_IMG_DIR');?>
/question.gif" 
					onclick="showEventHistoryFor('<?php echo $_smarty_tpl->tpl_vars['gui']->value->milestone['id'];?>
','milestones')" 
					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 }?>
	<?php }?>
	</h2>

	<form method="post" action="lib/plan/planMilestonesEdit.php"
	      name="milestone_mgr" onSubmit="javascript:return validateForm(this);">
	
	    <input type="hidden" name="id" value="<?php echo $_smarty_tpl->tpl_vars['gui']->value->milestone['id'];?>
"/>
	    <table class="common" style="width:80%">
		      <tr>
			    <th style="background:none;"><?php echo $_smarty_tpl->tpl_vars['labels']->value['th_name'];?>
</th>
	        		<td>
	        			<input type="text" id="milestone_name" name="milestone_name" size="<?php echo $_smarty_tpl->smarty->ext->configLoad->_getConfigVariable($_smarty_tpl, 'MILESTONE_NAME_SIZE');?>
"
                	  	 maxlength="<?php echo $_smarty_tpl->smarty->ext->configLoad->_getConfigVariable($_smarty_tpl, 'MILESTONE_NAME_MAXLEN');?>
"  value="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['gui']->value->milestone['name'], ENT_QUOTES, 'UTF-8', true);?>
" required />
	              <?php $_smarty_tpl->_subTemplateRender("file:error_icon.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array('field'=>"milestone_name"), 0, false);
?>
	        		</td>
    	    </tr>
    	    
 	    		<tr>
			    <th style="background:none;"><?php echo $_smarty_tpl->tpl_vars['labels']->value['th_date_format'];?>
</th>
			        <td>
	                <input type="text" 
	                       name="target_date" id="target_date" 
					       value="<?php echo $_smarty_tpl->tpl_vars['gui']->value->milestone['target_date'];?>
" required />
					<img title="<?php echo $_smarty_tpl->tpl_vars['labels']->value['show_calender'];?>
" src="<?php echo @constant('TL_THEME_IMG_DIR');?>
/calendar.gif"
					     onclick="showCal('target_date-cal','target_date','<?php echo $_smarty_tpl->tpl_vars['gsmarty_datepicker_format']->value;?>
');" >
					<img title="<?php echo $_smarty_tpl->tpl_vars['labels']->value['clear_date'];?>
" src="<?php echo @constant('TL_THEME_IMG_DIR');?>
/trash.png"
			             onclick="javascript:var x = document.getElementById('target_date'); x.value = '';" >
					<div id="target_date-cal" style="position:absolute;width:240px;left:300px;z-index:1;"></div>
             		<span class="italic"><?php echo $_smarty_tpl->tpl_vars['labels']->value['info_milestones_date'];?>
</span>
		      	</td>
			    </tr>
	 	    	<tr>

			    <th style="background:none;"><?php echo $_smarty_tpl->tpl_vars['labels']->value['start_date'];?>
</th>
			        <td>
			        	                <input type="text" 
	                       name="start_date" id="start_date" 
					       value="<?php echo $_smarty_tpl->tpl_vars['gui']->value->milestone['start_date'];?>
" />
					<img title="<?php echo $_smarty_tpl->tpl_vars['labels']->value['show_calender'];?>
" src="<?php echo @constant('TL_THEME_IMG_DIR');?>
/calendar.gif"
					     onclick="showCal('start_date-cal','start_date','<?php echo $_smarty_tpl->tpl_vars['gsmarty_datepicker_format']->value;?>
');" >
					<img title="<?php echo $_smarty_tpl->tpl_vars['labels']->value['clear_date'];?>
" src="<?php echo @constant('TL_THEME_IMG_DIR');?>
/trash.png"
			             onclick="javascript:var x = document.getElementById('start_date'); x.value = '';" >
					<div id="start_date-cal" style="position:absolute;width:240px;left:300px;z-index:1;"></div>
             		<span class="italic"><?php echo $_smarty_tpl->tpl_vars['labels']->value['info_milestones_start_date'];?>
</span>
		      	</td>
		      </tr>

          <?php if ($_smarty_tpl->tpl_vars['session']->value['testprojectOptions']->testPriorityEnabled) {?>
		          <tr>
		          	<th style="background:none;"><?php echo $_smarty_tpl->tpl_vars['labels']->value['th_perc_a_prio'];?>
:</th>
		          	<td>
		          		<input type="text" id="low_priority_tcases" name="low_priority_tcases" 
		          		       size="<?php echo $_smarty_tpl->smarty->ext->configLoad->_getConfigVariable($_smarty_tpl, 'PRIORITY_SIZE');?>
" maxlength="<?php echo $_smarty_tpl->smarty->ext->configLoad->_getConfigVariable($_smarty_tpl, 'PRIORITY_MAXLEN');?>
" 
		          		       value="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['gui']->value->milestone['high_percentage'], ENT_QUOTES, 'UTF-8', true);?>
" required />
	                <?php $_smarty_tpl->_subTemplateRender("file:error_icon.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array('field'=>"low_priority_tcases"), 0, true);
?>
		          	</td>
		          </tr>
		          <tr>
		          	<th style="background:none;"><?php echo $_smarty_tpl->tpl_vars['labels']->value['th_perc_b_prio'];?>
:</th>
		          	<td>
		          		<input type="text" id="medium_priority_tcases" name="medium_priority_tcases" 
		          		       size="<?php echo $_smarty_tpl->smarty->ext->configLoad->_getConfigVariable($_smarty_tpl, 'PRIORITY_SIZE');?>
" maxlength="<?php echo $_smarty_tpl->smarty->ext->configLoad->_getConfigVariable($_smarty_tpl, 'PRIORITY_MAXLEN');?>
" 
		          		       value="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['gui']->value->milestone['medium_percentage'], ENT_QUOTES, 'UTF-8', true);?>
" required />
	                <?php $_smarty_tpl->_subTemplateRender("file:error_icon.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array('field'=>"medium_priority_tcases"), 0, true);
?>
		          	</td>
		          </tr>
		          <tr>
		          	<th style="background:none;"><?php echo $_smarty_tpl->tpl_vars['labels']->value['th_perc_c_prio'];?>
:</th>
		          	<td>
		          		<input type="text" id="high_priority_tcases" name="high_priority_tcases" 
		          		       size="<?php echo $_smarty_tpl->smarty->ext->configLoad->_getConfigVariable($_smarty_tpl, 'PRIORITY_SIZE');?>
" maxlength="<?php echo $_smarty_tpl->smarty->ext->configLoad->_getConfigVariable($_smarty_tpl, 'PRIORITY_MAXLEN');?>
" 
		          		       value="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['gui']->value->milestone['low_percentage'], ENT_QUOTES, 'UTF-8', true);?>
" required />
	                <?php $_smarty_tpl->_subTemplateRender("file:error_icon.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array('field'=>"high_priority_tcases"), 0, true);
?>
		          	</td>
		          </tr>
		       
		      <?php } else { ?>
		      		<tr>
			        	<th style="background:none;"><?php echo $_smarty_tpl->tpl_vars['labels']->value['th_perc_testcases'];?>
:</th>
			          <td>
			          	<input type="hidden" name="low_priority_tcases" id="low_priority_tcases" value="0"/>
			          	<input type="hidden" name="high_priority_tcases" id="high_priority_tcases" value="0"/>
			          	<input type="text" name="medium_priority_tcases" id="medium_priority_tcases" 
			          	       size="<?php echo $_smarty_tpl->smarty->ext->configLoad->_getConfigVariable($_smarty_tpl, 'PRIORITY_SIZE');?>
"  maxlength="<?php echo $_smarty_tpl->smarty->ext->configLoad->_getConfigVariable($_smarty_tpl, 'PRIORITY_MAXLEN');?>
" 
			          	       value="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['gui']->value->milestone['medium_percentage'], ENT_QUOTES, 'UTF-8', true);?>
"/>
			          </td>
		         </tr>
          <?php }?>
      </table>


	<div class="groupBtn">
		<input type="hidden" id="doAction" name="doAction" value="" />
		<input type="submit" id="create" name="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 type="button" id="go_back" name="go_back" value="<?php echo $_smarty_tpl->tpl_vars['labels']->value['btn_cancel'];?>
" 
			     onclick="javascript: history.back();"/>
	</div>
	</form>
	
		<br />
	<?php if ($_smarty_tpl->tpl_vars['session']->value['testprojectOptions']->testPriorityEnabled) {?>
		<p class="italic"><?php echo $_smarty_tpl->tpl_vars['labels']->value['info_milestone_create_prio'];?>
</p>
	<?php } else { ?>
		<p class="italic"><?php echo $_smarty_tpl->tpl_vars['labels']->value['info_milestone_create_no_prio'];?>
</p>
	<?php }?>
	
</div>
</body>
</html>
<?php }
}
