From 30fdc10648cb4f03ce2a79c08faf6a20dfc3a212 Mon Sep 17 00:00:00 2001 From: Abijah Date: Mon, 3 Mar 2014 07:29:06 +0000 Subject: [PATCH] Changed quantity to not show up if just 1. Set field order for edit to match view git-svn-id: file:///svn-source/pmgr/branches/v0.3_work@1044 97e9348a-65ac-dc4b-aefc-98561f571b83 --- site/views/locks/edit.ctp | 4 ++-- site/views/locks/view.ctp | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/site/views/locks/edit.ctp b/site/views/locks/edit.ctp index da7ba38..3e8f273 100644 --- a/site/views/locks/edit.ctp +++ b/site/views/locks/edit.ctp @@ -34,10 +34,10 @@ echo($this->element 'fields' => array ('name' => array('label_attributes' => array('class' => 'empty'), 'after' => ("Name of the Lock Set")), - 'key' => array('label_attributes' => array('class' => 'empty'), - 'after' => ('(New) Key Code / Combination')), 'qty' => array('label_attributes' => array('class' => 'empty'), 'after' => ("Quantity")), + 'key' => array('label_attributes' => array('class' => 'empty'), + 'after' => ('(New) Key Code / Combination')), 'comment' => array('label_attributes' => array('class' => 'optional empty'), 'after' => 'Optional: Comments about this lock set.'), ))) . "\n"); diff --git a/site/views/locks/view.ctp b/site/views/locks/view.ctp index 4e9281c..201d42e 100644 --- a/site/views/locks/view.ctp +++ b/site/views/locks/view.ctp @@ -13,7 +13,8 @@ $lock = $lock['Lock']; $rows = array(); $rows[] = array('Name', $lock['name']); -$rows[] = array('Quantity', $lock['qty']); +if ($lock['qty'] > 1) + $rows[] = array('Quantity', $lock['qty']); $rows[] = array('Key', $lock['key']); if (!empty($lock['last_key'])) $rows[] = array('Last Key', $lock['last_key']);