Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- _form
- <h2>Students:</h2>
- <table id="students">
- <thead>
- <tr>
- <td>Name</td>
- <td>Surname</td>
- <td>
- <?php echo CHtml::ajaxSubmitButton('add', '', array('update' => '#students'), array('submit' => '', 'params' => array('Student[command]' => 'add', 'noValidate' => true))); ?>
- </td>
- </tr>
- </thead>
- <tbody>
- <?php foreach ($studentManager->items as $id => $student): ?>
- <?php $this->renderPartial('form/studentRow', array('id' => $id, 'model' => $student, 'form' => $form)); ?>
- <?php endforeach; ?>
- </tbody>
- </table>
- _studentRow
- <tr>
- <td>
- <?php echo $form->textField($model, "[$id]first_name"); ?>
- <td>
- <?php echo $form->textField($model, "[$id]last_name"); ?>
- </td>
- <td>
- <?php
- echo CHtml::ajaxSubmitButton(
- 'delete', '', array('update' => '#students'), array(
- 'submit' => '',
- 'params' => array(
- 'Student[command]' => 'delete',
- 'Student[id]' => $id,
- 'noValidate' => true)));
- ?>
- </td>
- </tr>
Add Comment
Please, Sign In to add comment