diff --git a/blocks/html/deeds/addDeedForm.inc b/blocks/html/deeds/addDeedForm.inc index c6209f6..ecb8fb0 100644 --- a/blocks/html/deeds/addDeedForm.inc +++ b/blocks/html/deeds/addDeedForm.inc @@ -1,6 +1,6 @@ */ @@ -9,41 +9,9 @@
Deed Info - - - - - - - - - - - - - - - - - - - - + + + + + + - - - +
- - -
- - - - - -
- - - - - -
+ + +
+
+
Owner 1 + + + + + + + + + + +
+
+
+
Owner 2 + + + + + + + + + +
+
diff --git a/blocks/html/deeds/findForm.inc b/blocks/html/deeds/findForm.inc index 8629806..b42e2a1 100644 --- a/blocks/html/deeds/findForm.inc +++ b/blocks/html/deeds/findForm.inc @@ -1,6 +1,6 @@ */ @@ -8,15 +8,6 @@
Search Deeds - - - - - + + +
- - -
+ + +
diff --git a/blocks/html/deeds/updateDeedForm.inc b/blocks/html/deeds/updateDeedForm.inc index 682077c..bad461c 100644 --- a/blocks/html/deeds/updateDeedForm.inc +++ b/blocks/html/deeds/updateDeedForm.inc @@ -1,6 +1,6 @@ @param Deed $this->deed @@ -11,51 +11,9 @@
Deed Info - - - - - - - - - - - - - - - - - - - - + + + + + + - +
- - -
- - - - - -
- - - - - -
+ + +
+
+
Owner 1 + + + + + + + + + + +
+
+
+
+
+
Owner 2 + + + + + + + + + +
+
+
+
diff --git a/classes/Deed.php b/classes/Deed.php index ff1300b..09bb0d9 100644 --- a/classes/Deed.php +++ b/classes/Deed.php @@ -7,7 +7,7 @@ class Deed { private $id; - private $section; + private $section_id; private $lot; private $lastname1; private $firstname1; @@ -20,6 +20,7 @@ class Deed private $lot2; private $cemetery_id; + private $section; private $cemetery; /** @@ -84,7 +85,7 @@ class Deed $this->validate(); $data = array(); - $data['section'] = $this->section ? $this->section : null; + $data['section_id'] = $this->section_id ? $this->section_id : null; $data['lot'] = $this->lot ? $this->lot : null; $data['lastname1'] = $this->lastname1 ? $this->lastname1 : null; $data['firstname1'] = $this->firstname1 ? $this->firstname1 : null; @@ -131,11 +132,25 @@ class Deed } /** - * @return string + * @return int + */ + public function getSection_id() + { + return $this->section_id; + } + + /** + * @return Section */ public function getSection() { - return $this->section; + if ($this->section_id) { + if (!$this->section) { + $this->section = new Section($this->section_id); + } + return $this->section; + } + return null; } /** @@ -257,11 +272,21 @@ class Deed //---------------------------------------------------------------- /** - * @param string $string + * @param int $int */ - public function setSection($string) + public function setSection_id($int) { - $this->section = trim($string); + $this->section = new Section($int); + $this->section_id = $int; + } + + /** + * @param Section $section + */ + public function setSection($section) + { + $this->section_id = $section->getId(); + $this->section = $section; } /** diff --git a/html/deeds/home.php b/html/deeds/home.php index c9facea..add0f55 100644 --- a/html/deeds/home.php +++ b/html/deeds/home.php @@ -9,7 +9,7 @@ $currentPage = isset($_GET['page']) ? (int)$_GET['page'] : 1; $deedList = new DeedList(null,20,$currentPage); -$knownFields = array('section','lot','cemetery_id','firstname','lastname','middleInitial'); +$knownFields = array('section_id','lot','cemetery_id','firstname','lastname','middleInitial'); if (count(array_intersect(array_keys($_GET),$knownFields))) { $deedList->find($_GET); }