Skip to content

Instantly share code, notes, and snippets.

@Shadow6363
Created August 12, 2011 13:31
Show Gist options
  • Save Shadow6363/1142029 to your computer and use it in GitHub Desktop.
Save Shadow6363/1142029 to your computer and use it in GitHub Desktop.
<fieldset style="border: none;">
<legend id="preventativeMaintenanceLegend">
<span class="ui-icon ui-icon-triangle-1-e" id="preventativeMaintenanceArrow" style="display: inline-block;"></span>
<span>Preventative Maintenance Information</span>
</legend>
<div id="preventativeMaintenances" style="display: none; margin-left: 2.5%;">
<div id="preventativeMaintenance">
<?php
echo $this->Form->hidden('firstMaintenance', array('value' => 0));
echo $this->Form->hidden('EquipmentHistory.0.subject', array('value' => '1'));
echo $this->Form->input('EquipmentHistory.0.date', array('empty' => true));
echo $this->Form->input('EquipmentHistory.0.details');
?>
</div>
<?php for($i = 4; $i < count($this->data['EquipmentHistory']); $i++): ?>
<?php if($this->data['EquipmentHistory'][$i]['subject'] == 1): ?>
<div id="preventativeMaintenance">
<?php
echo $this->Form->hidden('EquipmentHistory.' . $i . '.subject', array('value' => '1'));
echo $this->Form->input('EquipmentHistory.' . $i . '.date', array('empty' => true));
echo $this->Form->input('EquipmentHistory.' . $i . '.details');
?>
</div>
<?php endif; ?>
<?php endfor; ?>
<button id="AddMaintenance">Add Preventative Maintenance Information</button>
</div>
</fieldset>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment