git-svn-id: file:///svn-source/pmgr/branches/v0.3_work@1044 97e9348a-65ac-dc4b-aefc-98561f571b83
49 lines
1.7 KiB
PHP
49 lines
1.7 KiB
PHP
<?php /* -*- mode:PHP -*- */
|
|
|
|
//pr($this->data);
|
|
?>
|
|
|
|
<script type="text/javascript"><!--
|
|
|
|
// Reset the form
|
|
function newKey(dig) {
|
|
$('#LockKey').val(("000000000" + Math.floor(Math.random()*(Math.pow(10,dig)))) . slice(-1*dig));
|
|
}
|
|
|
|
--></script>
|
|
|
|
<?php
|
|
; // alignment
|
|
|
|
/**********************************************************************
|
|
**********************************************************************
|
|
**********************************************************************
|
|
**********************************************************************
|
|
* Lock Edit
|
|
*/
|
|
|
|
echo '<div class="lock edit">' . "\n";
|
|
|
|
echo $form->create('Lock', array('action' => 'edit')) . "\n";
|
|
echo $form->input('id') . "\n";
|
|
|
|
echo($this->element
|
|
('form_table',
|
|
array('class' => 'item lock detail',
|
|
'caption' => isset($this->data['Lock']) ? 'Edit Lock' : 'New Lock',
|
|
'fields' => array
|
|
('name' => array('label_attributes' => array('class' => 'empty'),
|
|
'after' => ("Name of the Lock Set")),
|
|
'qty' => array('label_attributes' => array('class' => 'empty'),
|
|
'after' => ("Quantity")),
|
|
'key' => array('label_attributes' => array('class' => 'empty'),
|
|
'after' => ('(<A HREF="#" ONCLICK="newKey(4); return false;">New</A>) Key Code / Combination')),
|
|
'comment' => array('label_attributes' => array('class' => 'optional empty'),
|
|
'after' => 'Optional: Comments about this lock set.'),
|
|
))) . "\n");
|
|
|
|
echo $form->submit(isset($this->data['Lock']) ? 'Update' : 'Add New Lock') . "\n";
|
|
echo $form->submit('Cancel', array('name' => 'cancel')) . "\n";
|
|
echo $form->end() . "\n";
|
|
echo '</div>' . "\n";
|