Implement copying and uppdating experiments

This commit is contained in:
Eike Foken
2011-09-28 15:48:55 +02:00
parent abe3371d86
commit 9fc5223406
4 changed files with 84 additions and 37 deletions

View File

@@ -31,44 +31,46 @@
</div>
<div class="box">
<h3><?=_('Configuration');?></h3>
<table class="tableList">
<thead>
<tr>
<th scope="col" width="40%"><?=_('Parameter');?></th>
<th scope="col" width="40%"><?=_('Value');?></th>
<th scope="col"><?=_('Unit');?></th>
</tr>
</thead>
<tbody>
<form name="editExperiment" method="post" action="<?=site_url('experiments/detail/' . $experiment['id']);?>">
<h3><?=_('Configuration');?></h3>
<table class="tableList">
<thead>
<tr>
<th scope="col" width="40%"><?=_('Parameter');?></th>
<th scope="col" width="40%"><?=_('Value');?></th>
<th scope="col"><?=_('Unit');?></th>
</tr>
</thead>
<tbody>
<?php
foreach ($parameters as $param):
?>
<tr>
<td width="40%"><?=$param['readable'];?></td>
<td width="41%">
<input type="text" name="param-<?=$param['parameter_id'];?>" class="long text" value="<?=(!empty($_POST['param-' . $param['parameter_id']]) ? $this->input->post('param-' . $param['parameter_id']) : $param['value']);?>" />
<tr>
<td width="40%"><?=$param['readable'];?></td>
<td width="41%">
<input type="text" name="param-<?=$param['parameter_id'];?>" class="long text" value="<?=(!empty($_POST['param-' . $param['parameter_id']]) ? $this->input->post('param-' . $param['parameter_id']) : $param['value']);?>" />
<?php
if (!empty($param['description'])):
?>
<span class="form_info">
<a href="<?=site_url('ajax/parameter_help/' . $param['parameter_id']);?>" name="<?=_('Description');?>" id="<?=$param['parameter_id'];?>" class="jtip">&nbsp;</a>
</span>
<span class="form_info">
<a href="<?=site_url('ajax/parameter_help/' . $param['parameter_id']);?>" name="<?=_('Description');?>" id="<?=$param['parameter_id'];?>" class="jtip">&nbsp;</a>
</span>
<?php
endif;
?>
<?=form_error('params');?>
</td>
<td><?=$param['unit'];?></td>
</tr>
<?=form_error('params');?>
</td>
<td><?=$param['unit'];?></td>
</tr>
<?php
endforeach;
?>
</tbody>
</table>
<p>
<a href="javascript:void(0);" class="button save"><?=_('Save changes');?></a>
</p>
</tbody>
</table>
<p>
<a href="javascript:void(0);" onclick="$('form[name=editExperiment]').submit();" class="button save"><?=_('Save changes');?></a>
</p>
</form>
</div>
<?php