function printForm() { $GLOBALS['system']->includeDBClass('person'); $person = new Person(); $person->fields['first_name']['width'] = 11; $person->fields['last_name']['width'] = 11; $person->fields['email']['width'] = 25; ?> <form method="post" id="add-family" class="form-horizontal"> <input type="hidden" name="new_family_submitted" value="1" /> <div class=""> <label>Family Name:</label> <?php $this->_family->printFieldInterface('family_name'); ?> </div> <div> <h3>Family Members</h3> <table class="expandable"> <?php include_once 'include/size_detector.class.php'; if (SizeDetector::isNarrow()) { ?> <tr> <td> <div class="compact-2col family-member-box"> <label>First Name</label> <label>Last Name</label> <div><?php $person->printFieldInterface('first_name', 'members_0_'); ?> </div> <div class="last_name preserve-value"><?php $person->printFieldInterface('last_name', 'members_0_'); ?> </div> <label>Gender</label> <label>Age</label> <div><?php $person->printFieldInterface('gender', 'members_0_'); ?> </div> <div><?php $person->printFieldInterface('age_bracket', 'members_0_'); ?> </div> <label>Status</label> <label>Congregation</label> <div class="person-status preserve-value"><?php $person->printFieldInterface('status', 'members_0_'); ?> </div> <div class="congregation"><?php $person->printFieldInterface('congregationid', 'members_0_'); ?> </div> <label>Mobile</label> <label>Email</label> <div><?php $person->printFieldInterface('mobile_tel', 'members_0_'); ?> </div> <div><?php $person->printFieldInterface('email', 'members_0_'); ?> </div> </div> </td> </tr> <?php } else { ?> <thead> <tr> <td>First Name</td> <td>Last Name</td> <td>Gender</td> <td>Age</td> <td>Status</td> <td>Cong.</td> <td>Mobile Tel</td> <td>Email</td> </tr> <thead> <tbody> <tr> <td><?php $person->printFieldInterface('first_name', 'members_0_'); ?> </td> <td class="last_name preserve-value"><?php $person->printFieldInterface('last_name', 'members_0_'); ?> </td> <td><?php $person->printFieldInterface('gender', 'members_0_'); ?> </td> <td><?php $person->printFieldInterface('age_bracket', 'members_0_'); ?> </td> <td class="person-status preserve-value"><?php $person->printFieldInterface('status', 'members_0_'); ?> </td> <td class="congregation preserve-value"><?php $person->printFieldInterface('congregationid', 'members_0_'); ?> </td> <td><?php $person->printFieldInterface('mobile_tel', 'members_0_'); ?> </td> <td><?php $person->printFieldInterface('email', 'members_0_'); ?> </td> </tr> </tbody> <?php } ?> </table> </div> <h3>Family Details <small>(optional)</small></h3> <?php $this->_family->fields['family_name']['readonly'] = 1; $this->_family->printForm(); $this->_family->fields['family_name']['readonly'] = 0; ?> <?php if ($GLOBALS['user_system']->havePerm(PERM_EDITNOTE)) { ?> <div <?php echo REQUIRE_INITIAL_NOTE ? '' : 'class="optional"'; ?> > <h3>Initial Note <small>(<?php echo REQUIRE_INITIAL_NOTE ? 'required' : 'optional'; ?> )</small></h3> <?php $GLOBALS['system']->includeDBClass('family_note'); $note = new Family_Note(); $note->printForm('initial_note_'); ?> </div> <?php } if ($plan_chooser = Action_Plan::getMultiChooser('execute_plan', 'create_family')) { ?> <h3>Action plans <small>(optional)</small></h3> <p>Execute the following action plans for the new family: </p> <div class="indent-left"> <?php echo $plan_chooser; ?> <p>Reference date for plans: <?php print_widget('plan_reference_date', array('type' => 'date'), NULL); ?> </p> </div> <?php } ?> <h3>Create</h3> <div class="align-right"> <input type="submit" class="btn" value="Create Family" /> <input type="button" class="back btn" value="Cancel" /> </div> </form> <?php }