2009-12-18 12:56:12 +00:00
|
|
|
<?php
|
|
|
|
/**
|
2010-01-26 18:42:34 +00:00
|
|
|
* @copyright 2009-2010 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 12:56:12 +00:00
|
|
|
* @author Cliff Ingham <inghamn@bloomington.in.gov>
|
2009-12-18 14:28:25 +00:00
|
|
|
@param Deed $this->deed
|
2009-12-18 12:56:12 +00:00
|
|
|
*/
|
|
|
|
?>
|
2010-01-06 18:10:10 +00:00
|
|
|
<h2>Update Deed</h2>
|
2009-12-18 12:56:12 +00:00
|
|
|
<form method="post" action="<?php echo $_SERVER['SCRIPT_NAME']; ?>">
|
|
|
|
<fieldset><legend>Deed Info</legend>
|
2009-12-18 14:28:25 +00:00
|
|
|
<input name="deed_id" type="hidden" value="<?php echo $this->deed->getId(); ?>" />
|
2009-12-18 12:56:12 +00:00
|
|
|
<table>
|
2009-12-18 14:28:25 +00:00
|
|
|
<tr><td><label for="deed-cemetery_id">Cemetery</label></td>
|
2010-01-26 18:42:34 +00:00
|
|
|
<td><select name="deed[cemetery_id]" id="deed-cemetery_id"
|
|
|
|
onchange="COB.populateSections(this.options[this.selectedIndex].value,'deed-section_id','<?php echo BASE_URL; ?>')">
|
2009-12-18 12:56:12 +00:00
|
|
|
<option></option>
|
|
|
|
<?php
|
2009-12-18 14:28:25 +00:00
|
|
|
$list = new CemeteryList();
|
|
|
|
$list->find();
|
|
|
|
foreach ($list as $cemetery) {
|
|
|
|
$name = View::escape($cemetery->getName());
|
|
|
|
$selected = $this->deed->getCemetery_id()==$cemetery->getId()
|
|
|
|
? 'selected="selected"'
|
|
|
|
: '';
|
2010-01-28 15:29:37 +00:00
|
|
|
echo "<option value=\"{$cemetery->getId()}\" $selected>$name</option>";
|
2009-12-18 12:56:12 +00:00
|
|
|
}
|
|
|
|
?>
|
|
|
|
</select>
|
|
|
|
</td>
|
|
|
|
</tr>
|
2010-01-26 18:42:34 +00:00
|
|
|
<tr><td><label for="deed-section_id">Section</label></td>
|
|
|
|
<td><select name="deed[section_id]" id="deed-section_id">
|
|
|
|
<option></option>
|
|
|
|
<?php
|
|
|
|
if ($this->deed->getSection_id()) {
|
|
|
|
foreach ($this->deed->getCemetery()->getSections() as $section) {
|
|
|
|
$name = View::escape($section->getCode());
|
|
|
|
$selected = $section->getId()==$this->deed->getSection_id()
|
|
|
|
? 'selected="selected"'
|
|
|
|
: '';
|
|
|
|
echo "<option value=\"{$section->getId()}\" $selected>$name</option>";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
</select>
|
|
|
|
<label for="deed-lot">Lot</label>
|
|
|
|
<input name="deed[lot]" id="deed-lot" size="3"
|
|
|
|
value="<?php echo View::escape($this->deed->getLot()); ?>" />
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr><td><label for="deed-issueDate">Date Issued</label></td>
|
|
|
|
<td><input name="deed[issueDate]" size="10" value="<?php echo $this->deed->getIssueDate('n/j/Y'); ?>" /></td>
|
|
|
|
</tr>
|
2009-12-18 12:56:12 +00:00
|
|
|
<tr><td><label for="deed-notes">notes</label></td>
|
2009-12-18 14:28:25 +00:00
|
|
|
<td><textarea name="deed[notes]" id="deed-notes" rows="3" cols="60"><?php echo View::escape($this->deed->getNotes()); ?></textarea>
|
2009-12-18 12:56:12 +00:00
|
|
|
</td>
|
|
|
|
</tr>
|
2010-01-26 18:42:34 +00:00
|
|
|
</table>
|
|
|
|
</fieldset>
|
|
|
|
<fieldset><legend>Owner 1</legend>
|
|
|
|
<table>
|
|
|
|
<tr><td><label for="deed-firstname1">First</label></td>
|
|
|
|
<td><input name="deed[firstname1]" id="deed-firstname1"
|
|
|
|
value="<?php echo View::escape($this->deed->getFirstname1()); ?>" />
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr><td><label for="deed-middleInitial1">MI</label></td>
|
|
|
|
<td><input name="deed[middleInitial1]" id="deed-middleInitial1"
|
|
|
|
value="<?php echo View::escape($this->deed->getMiddleInitial1()); ?>" />
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr><td><label for="deed-lastname1">Last</label></td>
|
|
|
|
<td><input name="deed[lastname1]" id="deed-lastname1"
|
|
|
|
value="<?php echo View::escape($this->deed->getLastname1()); ?>" />
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</table>
|
|
|
|
</fieldset>
|
|
|
|
<fieldset><legend>Owner 2</legend>
|
|
|
|
<table>
|
|
|
|
<tr><td><label for="deed-firstname2">First</label></td>
|
|
|
|
<td><input name="deed[firstname2]" id="deed-firstname2"
|
|
|
|
value="<?php echo View::escape($this->deed->getFirstname2()); ?>" />
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr><td><label for="deed-middleInitial2">MI</label></td>
|
|
|
|
<td><input name="deed[middleInitial2]" id="deed-middleInitial2"
|
|
|
|
value="<?php echo View::escape($this->deed->getMiddleInitial2()); ?>" />
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr><td><label for="deed-lastname2">Last</label></td>
|
|
|
|
<td><input name="deed[lastname2]" id="deed-lastname2"
|
|
|
|
value="<?php echo View::escape($this->deed->getLastname2()); ?>" />
|
|
|
|
</td>
|
|
|
|
</tr>
|
2009-12-18 12:56:12 +00:00
|
|
|
</table>
|
|
|
|
|
|
|
|
<button type="submit" class="submit">Submit</button>
|
|
|
|
<button type="button" class="cancel" onclick="document.location.href='<?php echo BASE_URL; ?>/deeds';">
|
|
|
|
Cancel
|
|
|
|
</button>
|
|
|
|
</fieldset>
|
|
|
|
</form>
|