Find Deeds and Find Interments now use the same form
git-svn-id: https://rosehill.googlecode.com/svn/trunk@58 100bd78a-fc82-11de-b5bc-ffd2847a4b57
This commit is contained in:
parent
91d5514031
commit
25468f1a37
|
@ -6,72 +6,12 @@
|
||||||
*/
|
*/
|
||||||
?>
|
?>
|
||||||
<form method="get" action="<?php echo BASE_URL; ?>/deeds">
|
<form method="get" action="<?php echo BASE_URL; ?>/deeds">
|
||||||
<fieldset><legend>Search Deeds</legend>
|
<?php
|
||||||
<table>
|
// Whether you're searching for deeds or interments, the fields
|
||||||
<tr><td><label for="firstname">Owner</label></td>
|
// the user enters are the same
|
||||||
<td><label for="firstname">Firstname</label>
|
include APPLICATION_HOME.'/blocks/html/interments/partials/findFields.inc';
|
||||||
<input name="firstname" id="firstname"
|
?>
|
||||||
value="<?php echo isset($_GET['firstname']) ? View::escape($_GET['firstname']) : ''; ?>" />
|
<div>
|
||||||
<label for="lastname">Lastname</label>
|
|
||||||
<input name="lastname" id="lastname"
|
|
||||||
value="<?php echo isset($_GET['lastname']) ? View::escape($_GET['lastname']) : ''; ?>" />
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<tr><td><label for="cemetery_id">Cemetery</label></td>
|
|
||||||
<td><select name="cemetery_id" id="cemetery_id"
|
|
||||||
onchange="COB.populateSections(this.options[this.selectedIndex].value,'section_id','<?php echo BASE_URL; ?>')">
|
|
||||||
<option value="">Any Cemetery</option>
|
|
||||||
<?php
|
|
||||||
$list = new CemeteryList();
|
|
||||||
$list->find();
|
|
||||||
foreach ($list as $cemetery) {
|
|
||||||
$name = View::escape($cemetery->getName());
|
|
||||||
$selected = (isset($_GET['cemetery']) && $_GET['cemetery']==$name)
|
|
||||||
? 'selected="selected"'
|
|
||||||
: '';
|
|
||||||
echo "<option value=\"{$cemetery->getId()}\">$name</option>";
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
</select>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr><td><label for="section_id">Section</label></td>
|
|
||||||
<td><select name="section_id" id="section_id">
|
|
||||||
<option value="">Any Section</option>
|
|
||||||
<?php
|
|
||||||
if (isset($_GET['cemetery_id'])) {
|
|
||||||
try {
|
|
||||||
$cemetery = new Cemetery($_GET['cemetery_id']);
|
|
||||||
foreach ($cemetery->getSections() as $section) {
|
|
||||||
$name = $section->getName()
|
|
||||||
? View::escape($section->getName())
|
|
||||||
: View::escape($section->getCode());
|
|
||||||
$selected = (isset($_GET['section_id']) && $_GET['section_id']==$section->getId())
|
|
||||||
? 'selected="selected"'
|
|
||||||
: '';
|
|
||||||
echo "<option value=\"{$section->getId()}\" $selected>$name</option>";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch (Exception $e) {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
$id = View::escape($_GET['section_id']);
|
|
||||||
echo "<option value=\"$id\" selected=\"selected\">$id</option>";
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
</select>
|
|
||||||
<label for="lot">Lot</label>
|
|
||||||
<input name="lot" id="lot" size="3"
|
|
||||||
value="<?php echo isset($_GET['lot']) ? View::escape($_GET['lot']) : ''; ?>" />
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
<button type="submit" class="search">Search</button>
|
<button type="submit" class="search">Search</button>
|
||||||
<button type="button" onclick="document.location.href='<?php echo BASE_URL; ?>/deeds';">
|
</div>
|
||||||
Clear
|
|
||||||
</button>
|
|
||||||
</fieldset>
|
|
||||||
</form>
|
</form>
|
|
@ -7,56 +7,11 @@
|
||||||
?>
|
?>
|
||||||
<h2>Search Burial Records</h2>
|
<h2>Search Burial Records</h2>
|
||||||
<form method="get" action="<?php echo BASE_URL; ?>/interments">
|
<form method="get" action="<?php echo BASE_URL; ?>/interments">
|
||||||
<table>
|
<?php
|
||||||
<tr><td><label for="lastname">Last Name</label></td>
|
// Whether you're searching for deeds or interments, the fields
|
||||||
<td><input name="lastname" id="lastname"
|
// the user enters are the same
|
||||||
value="<?php echo isset($_GET['lastname']) ? View::escape($_GET['lastname']) : ''; ?>" />
|
include APPLICATION_HOME.'/blocks/html/interments/partials/findFields.inc';
|
||||||
</td>
|
?>
|
||||||
</tr>
|
|
||||||
<tr><td><label for="firstname">First Name</label></td>
|
|
||||||
<td><input name="firstname" id="firstname"
|
|
||||||
value="<?php echo isset($_GET['firstname']) ? View::escape($_GET['firstname']) : ''; ?>" />
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr><td><label for="cemetery_id">Cemetery</label></td>
|
|
||||||
<td><select name="cemetery_id" id="cemetery_id"
|
|
||||||
onchange="COB.populateSections(this.options[this.selectedIndex].value,'section_id','<?php echo BASE_URL; ?>')">
|
|
||||||
<option value="">Any Cemetery</option>
|
|
||||||
<?php
|
|
||||||
$cemeteries = new CemeteryList();
|
|
||||||
$cemeteries->find();
|
|
||||||
foreach ($cemeteries as $cemetery) {
|
|
||||||
$name = View::escape($cemetery->getName());
|
|
||||||
$selected = (isset($_GET['cemetery_id']) && $_GET['cemetery_id']==$cemetery->getId())
|
|
||||||
? 'selected="selected"'
|
|
||||||
: '';
|
|
||||||
echo "<option value=\"{$cemetery->getId()}\" $selected>$name</option>";
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
</select>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr><td><label for="section_id">Section</label></td>
|
|
||||||
<td><select name="section_id" id="section_id">
|
|
||||||
<option value="">Any Section</option>
|
|
||||||
<?php
|
|
||||||
if (isset($_GET['cemetery_id'])) {
|
|
||||||
$sections = new SectionList(array('cemetery_id'=>$_GET['cemetery_id']));
|
|
||||||
foreach ($sections as $section) {
|
|
||||||
$name = $section->getName()
|
|
||||||
? View::escape($section->getName())
|
|
||||||
: View::escape($section->getCode());
|
|
||||||
$selected = isset($_GET['section_id']) && $section->getId()==$_GET['section_id']
|
|
||||||
? 'selected="selected"'
|
|
||||||
: '';
|
|
||||||
echo "<option value=\"{$section->getId()}\" $selected>$name</option>";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
</select>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
<div>
|
<div>
|
||||||
<button type="submit" class="search">Search</button>
|
<button type="submit" class="search">Search</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -0,0 +1,57 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* @copyright 2010 City of Bloomington, Indiana
|
||||||
|
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.txt
|
||||||
|
* @author Cliff Ingham <inghamn@bloomington.in.gov>
|
||||||
|
*/
|
||||||
|
?>
|
||||||
|
<table>
|
||||||
|
<tr><td><label for="lastname">Last Name</label></td>
|
||||||
|
<td><input name="lastname" id="lastname"
|
||||||
|
value="<?php echo isset($_GET['lastname']) ? View::escape($_GET['lastname']) : ''; ?>" />
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr><td><label for="firstname">First Name</label></td>
|
||||||
|
<td><input name="firstname" id="firstname"
|
||||||
|
value="<?php echo isset($_GET['firstname']) ? View::escape($_GET['firstname']) : ''; ?>" />
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr><td><label for="cemetery_id">Cemetery</label></td>
|
||||||
|
<td><select name="cemetery_id" id="cemetery_id"
|
||||||
|
onchange="COB.populateSections(this.options[this.selectedIndex].value,'section_id','<?php echo BASE_URL; ?>')">
|
||||||
|
<option value="">Any Cemetery</option>
|
||||||
|
<?php
|
||||||
|
$cemeteries = new CemeteryList();
|
||||||
|
$cemeteries->find();
|
||||||
|
foreach ($cemeteries as $cemetery) {
|
||||||
|
$name = View::escape($cemetery->getName());
|
||||||
|
$selected = (isset($_GET['cemetery_id']) && $_GET['cemetery_id']==$cemetery->getId())
|
||||||
|
? 'selected="selected"'
|
||||||
|
: '';
|
||||||
|
echo "<option value=\"{$cemetery->getId()}\" $selected>$name</option>";
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</select>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr><td><label for="section_id">Section</label></td>
|
||||||
|
<td><select name="section_id" id="section_id">
|
||||||
|
<option value="">Any Section</option>
|
||||||
|
<?php
|
||||||
|
if (isset($_GET['cemetery_id'])) {
|
||||||
|
$sections = new SectionList(array('cemetery_id'=>$_GET['cemetery_id']));
|
||||||
|
foreach ($sections as $section) {
|
||||||
|
$name = $section->getName()
|
||||||
|
? View::escape($section->getName())
|
||||||
|
: View::escape($section->getCode());
|
||||||
|
$selected = isset($_GET['section_id']) && $section->getId()==$_GET['section_id']
|
||||||
|
? 'selected="selected"'
|
||||||
|
: '';
|
||||||
|
echo "<option value=\"{$section->getId()}\" $selected>$name</option>";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</select>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
Loading…
Reference in New Issue