<fieldset>
<legend>New Organization Building Floor</legend>
<script type="text/javascript">
//wait for the DOM to be loaded
  $(document).ready(function() {
    // bind 'myForm' and provide a simple callback function
        $('#orgbuildfloor').ajaxForm(function() {
        alert("Organization Building Floor saved!");
       // document.getElementById('orgbuildfloor').reset();
          });
    });
</script>
<?php //include_partial('form', array('form' => $form)) ?>
<form id="orgbuildfloor"  action="<?php echo url_for
('orgbuildingfloor/'.($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; ?>
 <input type="hidden"  name="org_building_floor[building_id]"
id="org_building_floor_building_id" value="<?php echo $buildid; ?>" />
  <table>
  <tr>
  <td style="font-weight: bold;"><?php echo $form['floor_description']-
>renderLabel()?>:</td>
  <td><?php echo $form['floor_description']->render()?></td>
  </tr>
  </table>
  <table>
    <tfoot>
      <tr>
        <td colspan="2">
          &nbsp;<a href="<?php echo url_for('orgbuildingfloor/index') ?
>">Cancel</a>
          <?php if (!$form->getObject()->isNew()): ?>
            &nbsp;<?php echo link_to('Delete', 'orgbuildingfloor/
delete?id='.$form->getObject()->getId(), array('method' => 'delete',
'confirm' => 'Are you sure?')) ?>
          <?php endif; ?>
          <?php echo $form['created_when']?>
           <?php echo $form['_csrf_token']?>
          <input type="submit" value="Save" />
        </td>
      </tr>
    </tfoot>
    <tbody>
      <?php //echo $form ?>
    </tbody>
  </table>
</form>

<div class="Header1">Organization Building Floor List</div>
<div class="parContainer">
<table cellspacing="0" cellpadding="3" width="100%" height="100%">
    <tr class="tblHeader">
      <td>Id</td>
      <td>Building</td>
      <td>Floor description</td>
    </tr>
    <?php foreach ($org_building_floor_list as $count=>
$org_building_floor): ?>
    <tr bgcolor="<?php if($count%2==0){echo "#FFFFFF";}else{ echo
"#efeffb";}?>">
      <td><a href="<?php echo url_for('orgbuildingfloor/show?id='.
$org_building_floor->getId()) ?>"><?php echo $org_building_floor->getId
() ?></a></td>
      <td><?php echo $org_building_floor->getBuildingId() ?></td>
      <td><?php echo $org_building_floor->getFloorDescription() ?></
td>
    </tr>
    <?php endforeach; ?>
</table>
</div>
</fieldset>

Reply via email to