* code for task #2906, change edit testcase UI.
This commit is contained in:
@@ -48,25 +48,61 @@
|
||||
<th class='w-40px'><?php echo $lang->testcase->stepID;?></th>
|
||||
<th width="45%"><?php echo $lang->testcase->stepDesc;?></th>
|
||||
<th><?php echo $lang->testcase->stepExpect;?></th>
|
||||
<th class='w-60px'><?php echo $lang->actions;?></th>
|
||||
<th class='w-100px'><?php echo $lang->actions;?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<?php
|
||||
foreach($case->steps as $stepID => $step)
|
||||
{
|
||||
$stepID += 1;
|
||||
echo "<tr id='row$stepID' class='text-center'>";
|
||||
echo "<td class='stepID strong'>$stepID</td>";
|
||||
echo '<td>' . html::textarea('steps[]', $step->desc, "rows='3' class='form-control'") . '</td>';
|
||||
echo '<td>' . html::textarea('expects[]', $step->expect, "rows='3' class='form-control'") . '</td>';
|
||||
echo "<td class='text-left'>";
|
||||
echo "<button type='button' tabindex='-1' class='addbutton btn' onclick='preInsert($stepID)' title='{$lang->testcase->insertBefore}'><i class='icon icon-double-angle-up'></i></button>";
|
||||
echo "<button type='button' tabindex='-1' class='addbutton btn' onclick='postInsert($stepID)' title='{$lang->testcase->insertAfter}' ><i class='icon icon-double-angle-down'></i></button>";
|
||||
echo "<button type='button' tabindex='-1' class='delbutton btn' onclick='deleteRow($stepID)' title='{$lang->testcase->deleteStep}' ><i class='icon icon-remove'></i></button>";
|
||||
echo "</td>";
|
||||
echo '</tr>';
|
||||
}
|
||||
?>
|
||||
<tbody id='steps' class='sortable' data-group-name='<?php echo $lang->testcase->groupName ?>'>
|
||||
<tr class='template step' id='stepTemplate'>
|
||||
<td class='step-id'><input type='hidden' name='stepID[]' class='step-id-control'></td>
|
||||
<td>
|
||||
<div class='input-group'>
|
||||
<span class='input-group-addon step-child-id'></span>
|
||||
<textarea rows='1' class='form-control autosize step-steps' name='steps[]'></textarea>
|
||||
<span class="input-group-addon">
|
||||
<label class="checkbox-inline">
|
||||
<input type='checkbox' name='stepType[]' value='parent' class='step-type'> <?php echo $lang->testcase->group ?>
|
||||
</label>
|
||||
</span>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<textarea rows='1' class='form-control autosize step-expects' name='expects[]'></textarea>
|
||||
</td>
|
||||
<td>
|
||||
<div class='btn-group'>
|
||||
<button type='button' class='btn btn-step-add'><i class='icon icon-plus'></i></button>
|
||||
<button type='button' class='btn btn-step-move'><i class='icon icon-move'></i></button>
|
||||
<button type='button' class='btn btn-step-delete'><i class='icon icon-remove'></i></button>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<?php foreach($case->steps as $stepID => $step):?>
|
||||
<tr class='step'>
|
||||
<td class='step-id'><input type='hidden' name='stepID[]' class='step-id-control'></td>
|
||||
<td>
|
||||
<div class='input-group'>
|
||||
<span class='input-group-addon step-child-id'></span>
|
||||
<?php echo html::textarea('steps[]', $step->desc, "rows='1' class='form-control autosize step-steps'") ?>
|
||||
<span class="input-group-addon">
|
||||
<label class="checkbox-inline">
|
||||
<input type='checkbox' name='stepType[]' value='parent' class='step-type'> <?php echo $lang->testcase->group ?>
|
||||
</label>
|
||||
</span>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<?php echo html::textarea('expects[]', $step->expect, "rows='1' class='form-control autosize step-expects'") ?>
|
||||
</td>
|
||||
<td>
|
||||
<div class='btn-group'>
|
||||
<button type='button' class='btn btn-step-add'><i class='icon icon-plus'></i></button>
|
||||
<button type='button' class='btn btn-step-move'><i class='icon icon-move'></i></button>
|
||||
<button type='button' class='btn btn-step-delete'><i class='icon icon-remove'></i></button>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
Reference in New Issue
Block a user