this is the code

<fieldset>
                <legend>Edit Organization Department Category</legend>
<script type="text/javascript">
        // wait for the DOM to be loaded
        $(document).ready(function() {
            // bind 'myForm' and provide a simple callback function
            $('#orgdepartmentcategory').ajaxForm(function() {
            //var pidval;
                //pidval = document.getElementById
('hr_tbl_marriages_hr_tbl_particulars_id').value;
                alert("Organization Department Category Updated!");
               // $('#lists_id').load('lists/id/'+pidval).fadeIn
("slow");
               // document.getElementById
('orgdepartmentcategory').reset();
            });
        });
</script>
<?php //include_partial('form', array('form' => $form)) ?>
<form id="orgdepartmentcategory" name="orgdepartmentcategory"
action="<?php echo url_for('orgdepartmentcategory/'.($form->getObject
()->isNew() ? 'create' : 'update').(!$form->getObject()->isNew() ? '?
id='.$form->getObject()->getId() : '')) ?>" method="post" <?php $form-
>isMultipart() and print 'enctype="multipart/form-data" ' ?>>
<?php if (!$form->getObject()->isNew()): ?>
<input type="hidden" name="sf_method" value="put" />
<?php endif; ?>
 <table>
 <tr>
     <td style="font-weight: bold;"><?php echo $form
['dept_category_title']->renderLabel()?></td>
     <td><?php echo $form['dept_category_title']->render()?></td>
 </tr>
 </table>
  <table>
    <tfoot>
      <tr>
        <td colspan="2">
          &nbsp;<a href="<?php echo url_for('orgdepartmentcategory/
index') ?>">Cancel</a>
          <?php if (!$form->getObject()->isNew()): ?>
            &nbsp;<?php echo link_to('Delete', 'orgdepartmentcategory/
delete?id='.$form->getObject()->getId(), array('method' => 'delete',
'confirm' => 'Are you sure?')) ?>
          <?php endif; ?>
          <?php echo $form['id']?>
          <?php echo $form['modified_when']?>
          <?php echo $form['_csrf_token']?>
          <input type="submit" value="Save" />
        </td>
      </tr>
    </tfoot>
    <tbody>
      <?php //echo $form ?>
    </tbody>
  </table>
</form>
</fieldset>

Reply via email to