2009-12-18 16:54:06 +00:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* @copyright 2009 City of Bloomington, Indiana
|
2011-06-14 13:29:37 +00:00
|
|
|
* @license http://www.gnu.org/licenses/agpl.txt GNU/AGPL, see LICENSE.txt
|
2009-12-18 16:54:06 +00:00
|
|
|
* @author Cliff Ingham <inghamn@bloomington.in.gov>
|
2009-12-18 17:40:05 +00:00
|
|
|
* @param Interment $this->interment
|
2010-01-06 16:16:21 +00:00
|
|
|
* @param string $this->return_url
|
2009-12-18 16:54:06 +00:00
|
|
|
*/
|
2010-01-06 16:16:21 +00:00
|
|
|
$return_url = $this->return_url ? $this->return_url : BASE_URL.'/interments';
|
2009-12-18 16:54:06 +00:00
|
|
|
?>
|
2010-01-06 18:10:10 +00:00
|
|
|
<h2>Update Interment</h2>
|
2010-01-06 16:16:21 +00:00
|
|
|
<form method="post" action="<?php echo BASE_URL; ?>/interments/updateInterment.php">
|
2009-12-18 17:40:05 +00:00
|
|
|
<fieldset><legend>Interment Info</legend>
|
|
|
|
<input name="interment_id" type="hidden" value="<?php echo $this->interment->getId(); ?>" />
|
2010-01-06 16:16:21 +00:00
|
|
|
<input name="return_url" type="hidden" value="<?php echo $return_url; ?>" />
|
2009-12-18 16:54:06 +00:00
|
|
|
<table>
|
2010-01-06 16:16:21 +00:00
|
|
|
<tr><td><label for="interment-cemetery_id" class="required">Cemetery</label></td>
|
|
|
|
<td><select name="interment[cemetery_id]" id="interment-cemetery_id"
|
2010-01-06 17:10:08 +00:00
|
|
|
onchange="COB.populateSections(this.options[this.selectedIndex].value,'interment-section_id','<?php echo BASE_URL; ?>')">
|
2010-01-06 16:16:21 +00:00
|
|
|
<option></option>
|
|
|
|
<?php
|
|
|
|
$list = new CemeteryList();
|
|
|
|
$list->find();
|
|
|
|
foreach ($list as $cemetery) {
|
|
|
|
$name = View::escape($cemetery->getName());
|
|
|
|
$selected = $this->interment->getCemetery_id()==$cemetery->getId()
|
|
|
|
? 'selected="selected"'
|
|
|
|
: '';
|
|
|
|
echo "<option value=\"{$cemetery->getId()}\" $selected>$name</option>";
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
</select>
|
|
|
|
</td>
|
|
|
|
</tr>
|
2009-12-18 16:54:06 +00:00
|
|
|
|
2010-01-06 16:16:21 +00:00
|
|
|
<tr><td><label for="interment-section_id">Section</label></td>
|
|
|
|
<td><select name="interment[section_id]" id="interment-section_id">
|
|
|
|
<option></option>
|
|
|
|
<?php
|
|
|
|
if ($this->interment->getSection_id()) {
|
|
|
|
foreach ($this->interment->getCemetery()->getSections() as $section) {
|
|
|
|
$name = $section->getName() ? View::escape($section->getName()) : View::escape($section->getCode());
|
|
|
|
$selected = $section->getId()==$this->interment->getSection_id()
|
|
|
|
? 'selected="selected"'
|
|
|
|
: '';
|
|
|
|
echo "<option value=\"{$section->getId()}\" $selected>$name</option>";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
</select>
|
2009-12-18 17:40:05 +00:00
|
|
|
<label for="interment-lot">Lot</label>
|
|
|
|
<input name="interment[lot]" id="interment-lot"
|
2009-12-18 16:54:06 +00:00
|
|
|
size="5" maxlength="5"
|
2009-12-18 17:40:05 +00:00
|
|
|
value="<?php echo View::escape($this->interment->getLot()); ?>" />
|
2009-12-18 16:54:06 +00:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
|
2009-12-18 17:40:05 +00:00
|
|
|
<tr><td><label for="interment-book">Book</label></td>
|
|
|
|
<td><input name="interment[book]" id="interment-book"
|
2009-12-18 16:54:06 +00:00
|
|
|
size="4" maxlength="4"
|
2009-12-18 17:40:05 +00:00
|
|
|
value="<?php echo View::escape($this->interment->getBook()); ?>" />
|
|
|
|
<label for="interment-pageNumber">Page</label>
|
|
|
|
<input name="interment[pageNumber]" id="interment-pageNumber"
|
2009-12-18 16:54:06 +00:00
|
|
|
size="5" maxlength="5"
|
2009-12-18 17:40:05 +00:00
|
|
|
value="<?php echo View::escape($this->interment->getPageNumber()); ?>" />
|
2009-12-18 16:54:06 +00:00
|
|
|
</td>
|
|
|
|
</tr>
|
2010-01-06 16:16:21 +00:00
|
|
|
|
|
|
|
<tr><td><label for="interment-firstname">First</label></td>
|
|
|
|
<td><input name="interment[firstname]" id="interment-firstname"
|
2009-12-18 17:40:05 +00:00
|
|
|
value="<?php echo View::escape($this->interment->getFirstname()); ?>" />
|
2010-01-06 16:16:21 +00:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr><td><label for="interment-middleInitial">MI</label></td>
|
|
|
|
<td><input name="interment[middleInitial]" id="interment-middleInitial"
|
2009-12-18 17:40:05 +00:00
|
|
|
value="<?php echo View::escape($this->interment->getMiddleInitial()); ?>" />
|
2010-01-06 16:16:21 +00:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr><td><label for="interment-lastname">Last</label></td>
|
|
|
|
<td><input name="interment[lastname]" id="interment-lastname"
|
2009-12-18 17:40:05 +00:00
|
|
|
value="<?php echo View::escape($this->interment->getLastname()); ?>" />
|
2009-12-18 16:54:06 +00:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
|
2009-12-18 17:40:05 +00:00
|
|
|
<tr><td><label for="interment-birthPlace">Place of Birth</label></td>
|
|
|
|
<td><input name="interment[birthPlace]" id="interment-birthPlace"
|
|
|
|
value="<?php echo View::escape($this->interment->getBirthPlace()); ?>" />
|
2009-12-18 16:54:06 +00:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
|
2009-12-18 17:40:05 +00:00
|
|
|
<tr><td><label for="interment-lastResidence">Last Residence</label></td>
|
|
|
|
<td><input name="interment[lastResidence]" id="interment-lastResidence"
|
|
|
|
value="<?php echo View::escape($this->interment->getLastResidence()); ?>" />
|
2009-12-18 16:54:06 +00:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
|
2009-12-18 17:40:05 +00:00
|
|
|
<tr><td><label for="interment-deceasedDate">Date of Death</label></td>
|
|
|
|
<td><input name="interment[deceasedDate]" id="interment-deceasedDate"
|
|
|
|
size="10" value="<?php echo $this->interment->getDeceasedDate('n/j/Y'); ?>" />
|
|
|
|
<label for="interment-age">Age</label>
|
|
|
|
<input name="interment[age]" id="interment-age"
|
2009-12-18 16:54:06 +00:00
|
|
|
size="3" maxlength="3"
|
2009-12-18 17:40:05 +00:00
|
|
|
value="<?php echo View::escape($this->interment->getAge()); ?>" />
|
|
|
|
<label for="interment-sex">Gender</label>
|
|
|
|
<select name="interment[sex]" id="interment-sex">
|
2009-12-18 16:54:06 +00:00
|
|
|
<option></option>
|
2009-12-18 17:40:05 +00:00
|
|
|
<option value="M" <?php echo $this->interment->getSex()=='M' ? 'selected="selected"' : ''; ?>>
|
2009-12-18 16:54:06 +00:00
|
|
|
M
|
|
|
|
</option>
|
2009-12-18 17:40:05 +00:00
|
|
|
<option value="F" <?php echo $this->interment->getSex()=='F' ? 'selected="selected"' : ''; ?>>
|
2009-12-18 16:54:06 +00:00
|
|
|
F
|
|
|
|
</option>
|
|
|
|
</select>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</table>
|
|
|
|
|
2010-01-06 16:16:21 +00:00
|
|
|
<div><label for="interment-notes">Notes</label></div>
|
|
|
|
<div>
|
|
|
|
<textarea name="interment[notes]" id="interment-notes" rows="3" cols="60"><?php echo View::escape($this->interment->getNotes()); ?></textarea>
|
|
|
|
</div>
|
|
|
|
|
2009-12-18 16:54:06 +00:00
|
|
|
<button type="submit" class="submit">Submit</button>
|
2010-01-06 16:16:21 +00:00
|
|
|
<button type="button" class="cancel" onclick="document.location.href='<?php echo $return_url; ?>';">
|
2009-12-18 16:54:06 +00:00
|
|
|
Cancel
|
|
|
|
</button>
|
|
|
|
</fieldset>
|
2010-01-06 16:16:21 +00:00
|
|
|
</form>
|