<?php
/* Smarty version 3.1.33, created on 2021-12-20 20:42:11
  from '/opt/lampp/htdocs/testlink/gui/templates/execute/inc_exec_img_controls.tpl' */

/* @var Smarty_Internal_Template $_smarty_tpl */
if ($_smarty_tpl->_decodeProperties($_smarty_tpl, array (
  'version' => '3.1.33',
  'unifunc' => 'content_61c0dc93475141_08474618',
  'has_nocache_code' => false,
  'file_dependency' => 
  array (
    'ab8a6a04b8c2debd00a5d326862306e50ba70eab' => 
    array (
      0 => '/opt/lampp/htdocs/testlink/gui/templates/execute/inc_exec_img_controls.tpl',
      1 => 1636032772,
      2 => 'file',
    ),
  ),
  'includes' => 
  array (
  ),
),false)) {
function content_61c0dc93475141_08474618 (Smarty_Internal_Template $_smarty_tpl) {
$_smarty_tpl->_checkPlugins(array(0=>array('file'=>'/opt/lampp/htdocs/testlink/vendor/smarty/smarty/libs/plugins/function.html_options.php','function'=>'smarty_function_html_options',),));
?>
	
      <?php $_smarty_tpl->_assignInScope('ResultsStatusCode', $_smarty_tpl->tpl_vars['tlCfg']->value->results['status_code']);?>
      <?php if ($_smarty_tpl->tpl_vars['args_save_type']->value == 'bulk') {?>
        <?php $_smarty_tpl->_assignInScope('radio_id_prefix', "bulk_status");?>
      <?php } else { ?>
        <?php $_smarty_tpl->_assignInScope('radio_id_prefix', "statusSingle");?>
      <?php }?>

      <?php if ($_smarty_tpl->tpl_vars['gui']->value->grants->execute) {?>
  		<table class="invisible">
  		<tr>
  			<td style="text-align: center;width:80%;">
  				<div class="title"><?php echo $_smarty_tpl->tpl_vars['args_labels']->value['test_exec_notes'];?>
</div>
          <?php echo $_smarty_tpl->tpl_vars['args_webeditor']->value;?>
 
  			</td>
  			<td valign="top" style="width:20%;">			
    				      			<div class="title" style="text-align: center;">
            <?php if ($_smarty_tpl->tpl_vars['args_save_type']->value == 'bulk') {?> <?php echo $_smarty_tpl->tpl_vars['args_labels']->value['test_exec_result'];?>
 <?php } else { ?> &nbsp; <?php }?>
            </div>

    				<div class="resultBox">
              <?php if ($_smarty_tpl->tpl_vars['args_save_type']->value == 'bulk') {?>
                <?php
$_from = $_smarty_tpl->smarty->ext->_foreach->init($_smarty_tpl, $_smarty_tpl->tpl_vars['tlCfg']->value->results['status_label_for_exec_ui'], 'locale_status', false, 'verbose_status');
if ($_from !== null) {
foreach ($_from as $_smarty_tpl->tpl_vars['verbose_status']->value => $_smarty_tpl->tpl_vars['locale_status']->value) {
?>
    						      <input type="radio" <?php echo $_smarty_tpl->tpl_vars['args_input_enable_mgmt']->value;?>
 name="<?php echo $_smarty_tpl->tpl_vars['radio_id_prefix']->value;?>
[<?php echo $_smarty_tpl->tpl_vars['args_tcversion_id']->value;?>
]" 
    						      id="<?php echo $_smarty_tpl->tpl_vars['radio_id_prefix']->value;?>
_<?php echo $_smarty_tpl->tpl_vars['args_tcversion_id']->value;?>
_<?php echo $_smarty_tpl->tpl_vars['ResultsStatusCode']->value[$_smarty_tpl->tpl_vars['verbose_status']->value];?>
" 
    							    value="<?php echo $_smarty_tpl->tpl_vars['ResultsStatusCode']->value[$_smarty_tpl->tpl_vars['verbose_status']->value];?>
"
    											onclick="javascript:set_combo_group('execSetResults','status_','<?php echo $_smarty_tpl->tpl_vars['ResultsStatusCode']->value[$_smarty_tpl->tpl_vars['verbose_status']->value];?>
');"
    							    <?php if ($_smarty_tpl->tpl_vars['verbose_status']->value == $_smarty_tpl->tpl_vars['tlCfg']->value->results['default_status']) {?>
    							        checked="checked" 
    							    <?php }?> /> &nbsp;<?php echo call_user_func_array( $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['lang_get'][0], array( array('s'=>$_smarty_tpl->tpl_vars['locale_status']->value),$_smarty_tpl ) );?>
<br />
    					  <?php
}
}
$_smarty_tpl->smarty->ext->_foreach->restore($_smarty_tpl, 1);?>
              <?php }?>

              <?php if ($_smarty_tpl->tpl_vars['tlCfg']->value->exec_cfg->features->exec_duration->enabled) {?>	
                <br />	
                <?php echo $_smarty_tpl->tpl_vars['args_labels']->value['execution_duration'];?>
&nbsp;
                <input type="text" name="execution_duration" id="execution_duration"
                       size="<?php echo $_smarty_tpl->smarty->ext->configLoad->_getConfigVariable($_smarty_tpl, 'EXEC_DURATION_SIZE');?>
" 
                       onkeyup="this.value=this.value.replace(/[^0-9]/g,'');"
                       maxlength="<?php echo $_smarty_tpl->smarty->ext->configLoad->_getConfigVariable($_smarty_tpl, 'EXEC_DURATION_MAXLEN');?>
">  
                <?php }?>       		 			
              <?php if ($_smarty_tpl->tpl_vars['args_save_type']->value == 'single') {?>
                <br />
                <?php $_smarty_tpl->_assignInScope('addBR', 0);?>
                <?php if ($_smarty_tpl->tpl_vars['tc_exec']->value['assigned_user'] == '') {?>
                 <img src="<?php echo $_smarty_tpl->tpl_vars['tlImages']->value['assign_task'];?>
" 
                       title="<?php echo $_smarty_tpl->tpl_vars['args_labels']->value['assign_exec_task_to_me'];?>
">
                  <input type="checkbox" name="assignTask"  id="assignTask">
                  &nbsp;
                <?php }?>
                
                <?php if ($_smarty_tpl->tpl_vars['gui']->value->tlCanCreateIssue) {?>
                  <?php $_smarty_tpl->_assignInScope('addBR', 1);?>
                  <img src="<?php echo $_smarty_tpl->tpl_vars['tlImages']->value['bug_create_into_bts'];?>
" 
                       title="<?php echo $_smarty_tpl->tpl_vars['args_labels']->value['bug_create_into_bts'];?>
">
                  <input type="checkbox" name="createIssue"  id="createIssue" 
                         onclick="javascript:toogleShowHide('issue_summary');
                         javascript:toogleRequiredOnShowHide('bug_summary');
                         javascript:toogleRequiredOnShowHide('artifactVersion');
                         javascript:toogleRequiredOnShowHide('artifactComponent');
                         ">
                <?php }?>

                <?php if ($_smarty_tpl->tpl_vars['tlCfg']->value->exec_cfg->copyLatestExecIssues->enabled) {?>
                  <?php if ($_smarty_tpl->tpl_vars['addBR']->value) {?><br><?php }?>
                  <?php echo $_smarty_tpl->tpl_vars['args_labels']->value['bug_copy_from_latest_exec'];?>
&nbsp;
                   <input type="checkbox" name="copyIssues[<?php echo $_smarty_tpl->tpl_vars['args_tcversion_id']->value;?>
]" id="copyIssues" 
                    <?php if ($_smarty_tpl->tpl_vars['tlCfg']->value->exec_cfg->copyLatestExecIssues->default) {?> checked <?php }?>>
                   <br />
                <?php }?>

                 <input type="hidden" name="statusSingle[<?php echo $_smarty_tpl->tpl_vars['tcversion_id']->value;?>
]" 
                        id="statusSingle_<?php echo $_smarty_tpl->tpl_vars['tcversion_id']->value;?>
" value="">
                 <input type="hidden" name="save_results" id="save_results" value="0">
                 <br />
                 <br />
                 <button style="display: none;" type="submit" 
                         id="hidden-submit-button"></button>

                 <?php
$_from = $_smarty_tpl->smarty->ext->_foreach->init($_smarty_tpl, $_smarty_tpl->tpl_vars['gui']->value->execStatusIcons, 'ikval', false, 'kode');
if ($_from !== null) {
foreach ($_from as $_smarty_tpl->tpl_vars['kode']->value => $_smarty_tpl->tpl_vars['ikval']->value) {
?>
                   <?php $_smarty_tpl->_assignInScope('in', $_smarty_tpl->tpl_vars['ikval']->value['img']);?>
                   <img src="<?php echo $_smarty_tpl->tpl_vars['tlImages']->value[$_smarty_tpl->tpl_vars['in']->value];?>
" title="<?php echo $_smarty_tpl->tpl_vars['ikval']->value['title'];?>
"
                        name="fastExec<?php echo $_smarty_tpl->tpl_vars['kode']->value;?>
[<?php echo $_smarty_tpl->tpl_vars['tcversion_id']->value;?>
]"
                        id="fastExec<?php echo $_smarty_tpl->tpl_vars['kode']->value;?>
_<?php echo $_smarty_tpl->tpl_vars['tcversion_id']->value;?>
"
                        onclick="document.getElementById('save_button_clicked').value='<?php echo $_smarty_tpl->tpl_vars['args_tcversion_id']->value;?>
';
                        document.getElementById('statusSingle_<?php echo $_smarty_tpl->tpl_vars['tcversion_id']->value;?>
').value='<?php echo $_smarty_tpl->tpl_vars['kode']->value;?>
';
                        document.getElementById('save_results').value=1;
                        doSubmitForHTML5();
                        // document.forms['execSetResults'].submit();">&nbsp;
                 <?php
}
}
$_smarty_tpl->smarty->ext->_foreach->restore($_smarty_tpl, 1);?>  
                 <br />
                 <br />

                 <input type="hidden" name="save_and_next" 
                                      id="save_and_next" value="0">
                 <?php
$_from = $_smarty_tpl->smarty->ext->_foreach->init($_smarty_tpl, $_smarty_tpl->tpl_vars['gui']->value->execStatusIconsNext, 'ikval', false, 'kode');
if ($_from !== null) {
foreach ($_from as $_smarty_tpl->tpl_vars['kode']->value => $_smarty_tpl->tpl_vars['ikval']->value) {
?>
                   <?php $_smarty_tpl->_assignInScope('in', $_smarty_tpl->tpl_vars['ikval']->value['img']);?>
                   <img src="<?php echo $_smarty_tpl->tpl_vars['tlImages']->value[$_smarty_tpl->tpl_vars['in']->value];?>
" title="<?php echo $_smarty_tpl->tpl_vars['ikval']->value['title'];?>
"
                        name="fastExecNext<?php echo $_smarty_tpl->tpl_vars['kode']->value;?>
[<?php echo $_smarty_tpl->tpl_vars['tcversion_id']->value;?>
]"
                        id="fastExecNext<?php echo $_smarty_tpl->tpl_vars['kode']->value;?>
_<?php echo $_smarty_tpl->tpl_vars['tcversion_id']->value;?>
"
                        onclick="document.getElementById('save_button_clicked').value='<?php echo $_smarty_tpl->tpl_vars['args_tcversion_id']->value;?>
';
                        document.getElementById('statusSingle_<?php echo $_smarty_tpl->tpl_vars['tcversion_id']->value;?>
').value='<?php echo $_smarty_tpl->tpl_vars['kode']->value;?>
';
                        document.getElementById('save_and_next').value=1;
                        doSubmitForHTML5();
                        // document.forms['execSetResults'].submit();">&nbsp;
                 <?php
}
}
$_smarty_tpl->smarty->ext->_foreach->restore($_smarty_tpl, 1);?>  
                 <br />
                 <br />
                  <input type="submit" name="move2next[<?php echo $_smarty_tpl->tpl_vars['args_tcversion_id']->value;?>
]" 
                      <?php echo $_smarty_tpl->tpl_vars['args_input_enable_mgmt']->value;?>

                      onclick="document.getElementById('save_button_clicked').value=<?php echo $_smarty_tpl->tpl_vars['args_tcversion_id']->value;?>
;"
                      value="<?php echo $_smarty_tpl->tpl_vars['args_labels']->value['btn_next_tcase'];?>
" />
    		 			  <?php } else { ?>
     	    	        <input type="submit" id="do_bulk_save" name="do_bulk_save"
      	    	             value="<?php echo $_smarty_tpl->tpl_vars['args_labels']->value['btn_save_tc_exec_results'];?>
"/>
    		 			  <?php }?>       
    				</div>
    			</td>
    		</tr>
        <?php if ($_smarty_tpl->tpl_vars['args_save_type']->value == 'bulk' && $_smarty_tpl->tpl_vars['args_execution_time_cfields']->value != '') {?>
          <tr><td colspan="2">
  					<div id="cfields_exec_time_tcversionid_<?php echo $_smarty_tpl->tpl_vars['args_tcversion_id']->value;?>
" class="custom_field_container" 
  						style="background-color:#dddddd;">
            <?php echo $_smarty_tpl->tpl_vars['args_labels']->value['testcase_customfields'];?>

            <?php echo $_smarty_tpl->tpl_vars['args_execution_time_cfields']->value[0];?>
             </div> 
          </td></tr>
        <?php }?>
  		</table>
      
      <?php } else { ?>
        <input type="submit" name="move2next[<?php echo $_smarty_tpl->tpl_vars['args_tcversion_id']->value;?>
]" 
               <?php echo $_smarty_tpl->tpl_vars['args_input_enable_mgmt']->value;?>

               onclick="document.getElementById('save_button_clicked').value=<?php echo $_smarty_tpl->tpl_vars['args_tcversion_id']->value;?>
;"
               value="<?php echo $_smarty_tpl->tpl_vars['args_labels']->value['btn_next_tcase'];?>
" />
      <?php }?>

      <?php if ($_smarty_tpl->tpl_vars['gui']->value->addIssueOp != '' && !is_null($_smarty_tpl->tpl_vars['gui']->value->addIssueOp) && !is_null($_smarty_tpl->tpl_vars['gui']->value->addIssueOp['type'])) {?>  
        <?php $_smarty_tpl->_assignInScope('ak', $_smarty_tpl->tpl_vars['gui']->value->addIssueOp['type']);?> 
        <hr> 
        <table id="addIssueFeedback">
        <tr>
          <td colspan="2" class="label"><?php echo $_smarty_tpl->tpl_vars['args_labels']->value['create_issue_feedback'];?>
</td>
        </tr>
  
        <?php if ($_smarty_tpl->tpl_vars['ak']->value == 'createIssue') {?>
          <tr>
            <td colspan="2">
              <div class="label"><?php echo $_smarty_tpl->tpl_vars['gui']->value->addIssueOp[$_smarty_tpl->tpl_vars['ak']->value]['msg'];?>
</div>
            </td>
          </tr>
        <?php } else { ?>
          <?php
$_from = $_smarty_tpl->smarty->ext->_foreach->init($_smarty_tpl, $_smarty_tpl->tpl_vars['gui']->value->addIssueOp[$_smarty_tpl->tpl_vars['ak']->value], 'ikmsg', false, 'ik');
if ($_from !== null) {
foreach ($_from as $_smarty_tpl->tpl_vars['ik']->value => $_smarty_tpl->tpl_vars['ikmsg']->value) {
?>
          <tr>
            <td colspan="2">
              <div class="label"><?php echo $_smarty_tpl->tpl_vars['ikmsg']->value['msg'];?>
</div>
            </td>
          </tr>
          <?php
}
}
$_smarty_tpl->smarty->ext->_foreach->restore($_smarty_tpl, 1);?>
        <?php }?>
        </table>
        <hr>
      <?php }?>

      <table style="display:none;" id="issue_summary">
      <tr>
        <td colspan="2">
                    <div class="label"><?php echo $_smarty_tpl->tpl_vars['args_labels']->value['bug_summary'];?>
</div>
           <input type="text" id="bug_summary" name="bug_summary" value="<?php echo $_smarty_tpl->tpl_vars['gui']->value->bug_summary;?>
"
                  size="<?php echo $_smarty_tpl->smarty->ext->configLoad->_getConfigVariable($_smarty_tpl, 'BUGSUMMARY_SIZE');?>
" maxlength="<?php echo $_smarty_tpl->tpl_vars['gui']->value->issueTrackerCfg->bugSummaryMaxLength;?>
" 
                  style="display:none;">
        </td>
      </tr>

      <tr>
      <td colspan="2">
     <?php if ($_smarty_tpl->tpl_vars['gui']->value->issueTrackerMetaData != '') {?>
      <p>
      <?php if ($_smarty_tpl->tpl_vars['gui']->value->issueTrackerMetaData['issueTypes'] != '') {?>
       <label for="issueType"><?php echo $_smarty_tpl->tpl_vars['labels']->value['issueType'];?>
</label>
       <?php echo smarty_function_html_options(array('name'=>"issueType",'options'=>$_smarty_tpl->tpl_vars['gui']->value->issueTrackerMetaData['issueTypes']['items'],'selected'=>$_smarty_tpl->tpl_vars['gui']->value->issueType),$_smarty_tpl);?>

      <?php }?>

      <?php if ($_smarty_tpl->tpl_vars['gui']->value->issueTrackerMetaData['priorities'] != '') {?>
       <label for="issuePriority"><?php echo $_smarty_tpl->tpl_vars['labels']->value['issuePriority'];?>
</label> 
       <?php echo smarty_function_html_options(array('name'=>"issuePriority",'options'=>$_smarty_tpl->tpl_vars['gui']->value->issueTrackerMetaData['priorities']['items'],'selected'=>$_smarty_tpl->tpl_vars['gui']->value->issuePriority),$_smarty_tpl);?>

      <?php }?>
      </p>

      <p> 
            <?php if ($_smarty_tpl->tpl_vars['gui']->value->issueTrackerMetaData['versions'] != '' && $_smarty_tpl->tpl_vars['gui']->value->issueTrackerMetaData['versions']['items'] != '') {?>
        <label for="artifactVersion"><?php echo $_smarty_tpl->tpl_vars['labels']->value['artifactVersion'];?>
</label> 
        <select class="chosen-select-artifact" data-placeholder=" " id="artifactVersion" 
                <?php if ($_smarty_tpl->tpl_vars['gui']->value->issueTrackerMetaData['versions']['isMultiSelect']) {?>
                 name="artifactVersion[]" size="2" multiple
                <?php } else { ?>
                 name="artifactVersion"
                <?php }?> 
                >
        <?php echo smarty_function_html_options(array('options'=>$_smarty_tpl->tpl_vars['gui']->value->issueTrackerMetaData['versions']['items'],'selected'=>$_smarty_tpl->tpl_vars['gui']->value->artifactVersion),$_smarty_tpl);?>

        </select>
      <?php }?>
      
            <?php if ($_smarty_tpl->tpl_vars['gui']->value->issueTrackerMetaData['components']['items'] != '') {?>
        <label for="artifactComponent"><?php echo $_smarty_tpl->tpl_vars['labels']->value['artifactComponent'];?>
</label>         
         <select class="chosen-select-artifact" data-placeholder=" " id="artifactComponent" 
                 <?php if ($_smarty_tpl->tpl_vars['gui']->value->issueTrackerMetaData['components']['isMultiSelect']) {?>
                   name="artifactComponent[]" size="2" multiple
                 <?php } else { ?>
                   name="artifactComponent"
                 <?php }?> 
                 >
         <?php echo smarty_function_html_options(array('options'=>$_smarty_tpl->tpl_vars['gui']->value->issueTrackerMetaData['components']['items'],'selected'=>$_smarty_tpl->tpl_vars['gui']->value->artifactComponent),$_smarty_tpl);?>

         </select>
      <?php }?>
     </p>
     <?php }?>        
      </td>
      </tr>

      <tr>
        <td colspan="2">
          <div class="label"><?php echo $_smarty_tpl->tpl_vars['args_labels']->value['bug_description'];?>
</div>
          <textarea id="bug_notes" name="bug_notes" 
                  rows="<?php echo $_smarty_tpl->smarty->ext->configLoad->_getConfigVariable($_smarty_tpl, 'BUGNOTES_ROWS');?>
" cols="<?php echo $_smarty_tpl->tpl_vars['gui']->value->issueTrackerCfg->bugSummaryMaxLength;?>
" ></textarea>          
        </td>
      </tr>

      <tr>
        <td colspan="2">
          <input type="checkbox" name="addLinkToTL"  id="addLinkToTL"
                 <?php if ($_smarty_tpl->tpl_vars['gui']->value->addLinkToTLChecked) {?> checked <?php }?> >
          <span class="label"><?php echo $_smarty_tpl->tpl_vars['args_labels']->value['add_link_to_tlexec'];?>
</span>
        </td>
      </tr>

      </table>
      
      </br>
      <div class="messages" style="align:center;">
      <?php echo $_smarty_tpl->tpl_vars['args_labels']->value['exec_not_run_result_note'];?>

      </div>


      <?php echo '<script'; ?>
>
      function doSubmitForHTML5() 
      {
        document.getElementById("hidden-submit-button").click();
      }

      jQuery( document ).ready(function() {

      // IMPORTANT
      // For some chosen select I want on page load to be DISPLAY NONE
      // That's why I've changes from original example on the line where styles were applied
      // 
      jQuery(".chosen-select-artifact").chosen({ width: "35%" });

      // From https://github.com/harvesthq/chosen/issues/515
      jQuery(".chosen-select-artifact").each(function(){
          // take each select and put it as a child of the chosen container
          // this mean it'll position any validation messages correctly
          jQuery(this).next(".chosen-container").prepend(jQuery(this).detach());

          // apply all the styles, personally, I've added this to my stylesheet
          // TESTLINK NOTE
          jQuery(this).attr("style","display:none!important; position:absolute; clip:rect(0,0,0,0)");

          // to all of these events, trigger the chosen to open and receive focus
          jQuery(this).on("click focus keyup",function(event){
              jQuery(this).closest(".chosen-container").trigger("mousedown.chosen");
          });
      });
      });
      <?php echo '</script'; ?>
>

<?php }
}
