Skip to Content.
Sympa Menu

comanage-dev - [comanage-dev] r510 - in registry/trunk/app: Controller Lib View/Cous

Subject: COmanage Developers List

List archive

[comanage-dev] r510 - in registry/trunk/app: Controller Lib View/Cous


Chronological Thread 
  • From:
  • To:
  • Subject: [comanage-dev] r510 - in registry/trunk/app: Controller Lib View/Cous
  • Date: Tue, 30 Apr 2013 02:24:59 -0400
  • Authentication-results: sfpop-ironport03.merit.edu; dkim=neutral (message not signed) header.i=none

Author: marie
Date: 2013-04-30 02:24:58 -0400 (Tue, 30 Apr 2013)
New Revision: 510

Modified:
registry/trunk/app/Controller/CousController.php
registry/trunk/app/Lib/lang.php
registry/trunk/app/View/Cous/fields.inc
Log:
CO559 fixes black hole when first COU is added

Modified: registry/trunk/app/Controller/CousController.php
===================================================================
--- registry/trunk/app/Controller/CousController.php 2013-04-22 19:03:25
UTC (rev 509)
+++ registry/trunk/app/Controller/CousController.php 2013-04-30 06:24:58
UTC (rev 510)
@@ -139,7 +139,9 @@
// Parent COU must be in same CO as child

// Name of parent
- $parentCou = $reqdata['Cou']['parent_id'];
+ $parentCou = (!empty($reqdata['Cou']['parent_id'])
+ ? $reqdata['Cou']['parent_id']
+ : "");

if(isset($parentCou) && $parentCou != "")
{

Modified: registry/trunk/app/Lib/lang.php
===================================================================
--- registry/trunk/app/Lib/lang.php 2013-04-22 19:03:25 UTC (rev 509)
+++ registry/trunk/app/Lib/lang.php 2013-04-30 06:24:58 UTC (rev 510)
@@ -381,6 +381,7 @@
'fd.closed' => 'Closed',
'fd.comment' => 'Comment',
'fd.cou' => 'COU',
+ 'fd.cou.nopar' => 'No COUs are available to be assigned parent',
'fd.created' => 'Created',
// Demographics fields
'fd.de.persid' => 'Person ID',

Modified: registry/trunk/app/View/Cous/fields.inc
===================================================================
--- registry/trunk/app/View/Cous/fields.inc 2013-04-22 19:03:25 UTC (rev
509)
+++ registry/trunk/app/View/Cous/fields.inc 2013-04-30 06:24:58 UTC (rev
510)
@@ -74,9 +74,19 @@
</td>
<td>
<?php
- print ($e ? $this->Form->select('parent_id',
$this->viewVars['parent_options'])
- : Sanitize::html($cous[0]['Cou']['parent_id']));
-
+ if($e) {
+ if (!empty($this->viewVars['parent_options'] )) {
+ // Print dropdown selector with COU options
+ print $this->Form->select('parent_id',
$this->viewVars['parent_options']);
+ } else {
+ // Do not print empty selector
+ print _txt('fd.cou.nopar');
+ }
+ }
+ else {
+ print Sanitize::html($cous[0]['Cou']['parent_id']);
+ }
+
if($this->Form->isFieldError('status')) {
print $this->Form->error('status');
}



  • [comanage-dev] r510 - in registry/trunk/app: Controller Lib View/Cous, svnlog, 04/30/2013

Archive powered by MHonArc 2.6.16.

Top of Page