<div class="row">
<?php if (empty($master)) echo $form->labelEx($model, 'speed'); ?>
<?php if (empty($master)) echo $form->textField($model, 'speed', array('disabled' => $master)); ?>
<?php if (empty($master)) echo $form->error($model, 'speed'); ?>
</div>
<div class="row">
<?php if (empty($master)) echo $form->labelEx($model, 'power'); ?>
<?php if (empty($master)) echo $form->textField($model, 'power', array('disabled' => $master)); ?>
<?php if (empty($master)) echo $form->error($model, 'power'); ?>
</div>
<div id = "check" class="row" display="none">
<?php if (empty($master)) echo $form->labelEx($model, 'reclaimed'); ?>
<?php
if (empty($master))
echo $form->checkBox($model, 'reclaimed', array(
'template' => '{input} {labelTitle}',
'class' => 'chclass',
// 'visible' => 'FALSE',
'onchange' => 'javascript:'
. 'if(this.checked)'
. ' document.getElementById("Engine_recovered").value= new Date().toLocaleDateString() +" "+ new Date().toLocaleTimeString();'
. 'else document.getElementById("Engine_recovered").value="";'
)
);
?>
<?php if (empty($master)) echo $form->error($model, 'reclaimed'); ?>
</div>
<?php if (empty($master)) echo $form->textArea($model, 'act_end', array('rows' => 6, 'cols' => 50));
Yii::app()->getClientScript()->registerScript('myscript','$("#Engine_act_end").keyup(function() {
document.getElementById(\'Engine_reclaimed\').style.display="block";
});');
?>
<div class="row" >
<?php if (empty($master)) echo $form->labelEx($model, 'reclaimed'); ?>
<?php
if (empty($master))
echo $form->checkBox($model, 'reclaimed', array(
'template' => '{input} {labelTitle}',
'class' => 'chclass',
// 'visible' => 'FALSE',
'onchange' => 'javascript:'
. 'if(this.checked)'
. ' document.getElementById("Engine_recovered").value= new Date().toLocaleDateString() +" "+ new Date().toLocaleTimeString();'
. 'else document.getElementById("Engine_recovered").value="";'
)
);
?>
<?php if (empty($master)) echo $form->error($model, 'reclaimed'); ?>
</div>
<script type='text/javascript'>
document.getElementById('Engine_reclaimed').style.display = 'none';
</script>