Skip to Content.
Sympa Menu

comanage-dev - [comanage-dev] r650 - in registry/trunk/app: Controller Model View/CoEnrollmentAttributes

Subject: COmanage Developers List

List archive

[comanage-dev] r650 - in registry/trunk/app: Controller Model View/CoEnrollmentAttributes


Chronological Thread 
  • From:
  • To:
  • Subject: [comanage-dev] r650 - in registry/trunk/app: Controller Model View/CoEnrollmentAttributes
  • Date: Wed, 25 Dec 2013 15:31:46 -0500

Author: benno
Date: 2013-12-25 15:31:46 -0500 (Wed, 25 Dec 2013)
New Revision: 650

Modified:
registry/trunk/app/Controller/CoEnrollmentAttributesController.php
registry/trunk/app/Model/CoEnrollmentAttribute.php
registry/trunk/app/View/CoEnrollmentAttributes/fields.inc
Log:
Fix hiding of group enrollment attribute (CO-741)

Modified: registry/trunk/app/Controller/CoEnrollmentAttributesController.php
===================================================================
--- registry/trunk/app/Controller/CoEnrollmentAttributesController.php
2013-12-25 20:30:26 UTC (rev 649)
+++ registry/trunk/app/Controller/CoEnrollmentAttributesController.php
2013-12-25 20:31:46 UTC (rev 650)
@@ -174,14 +174,14 @@

function checkWriteFollowups($reqdata, $curdata = null) {
// Perform a quick check to see if the attribute can no longer have a
default attribute.
- // Currently, only types 'o', 'r', and 'x' can.
+ // Currently, only types 'g', 'o', 'r', and 'x' can.

if(!empty($curdata['CoEnrollmentAttributeDefault'][0]['id'])) {
// There is an existing default

$attrinfo = explode(':',
$reqdata['CoEnrollmentAttribute']['attribute']);

- if($attrinfo[0] != 'o' && $attrinfo[0] != 'r' && $attrinfo[0] != 'x') {
+ if($attrinfo[0] != 'g' && $attrinfo[0] != 'o' && $attrinfo[0] != 'r'
&& $attrinfo[0] != 'x') {
// Ignore return code

$this->CoEnrollmentAttribute->CoEnrollmentAttributeDefault->delete($curdata['CoEnrollmentAttributeDefault'][0]['id'],

false);

Modified: registry/trunk/app/Model/CoEnrollmentAttribute.php
===================================================================
--- registry/trunk/app/Model/CoEnrollmentAttribute.php 2013-12-25 20:30:26
UTC (rev 649)
+++ registry/trunk/app/Model/CoEnrollmentAttribute.php 2013-12-25 20:31:46
UTC (rev 650)
@@ -586,13 +586,16 @@
$attr['attribute'] = $efAttr['CoEnrollmentAttribute']['attribute'];
$attr['required'] = $efAttr['CoEnrollmentAttribute']['required'];
$attr['mvpa_required'] = false; // does not apply
- $attr['hidden'] = false;
$attr['label'] = $efAttr['CoEnrollmentAttribute']['label'];
$attr['description'] =
$efAttr['CoEnrollmentAttribute']['description'];
$attr['model'] = "EnrolleeCoPerson.CoGroupMember." .
$efAttr['CoEnrollmentAttribute']['id'];
$attr['field'] = "co_group_id";
+ $attr['hidden'] = false;
if(!empty($efAttr['CoEnrollmentAttributeDefault'][0]['value'])) {
$attr['default'] =
$efAttr['CoEnrollmentAttributeDefault'][0]['value'];
+ // If there's a default value, then the attribute can be hidden
+ $attr['hidden'] =
(isset($efAttr['CoEnrollmentAttribute']['hidden'])
+ && $efAttr['CoEnrollmentAttribute']['hidden']);
}
$attr['modifiable'] =
$efAttr['CoEnrollmentAttributeDefault'][0]['modifiable'];
$attr['validate']['content']['rule'][0] = 'inList';

Modified: registry/trunk/app/View/CoEnrollmentAttributes/fields.inc
===================================================================
--- registry/trunk/app/View/CoEnrollmentAttributes/fields.inc 2013-12-25
20:30:26 UTC (rev 649)
+++ registry/trunk/app/View/CoEnrollmentAttributes/fields.inc 2013-12-25
20:31:46 UTC (rev 650)
@@ -229,6 +229,7 @@
// Populate cross references
print $this->Form->hidden('co_enrollment_flow_id', array('default' =>
$vv_coefid)) . "\n";
print $this->Form->hidden('CoEnrollmentAttributeDefault.0.id') . "\n";
+ print
$this->Form->hidden('CoEnrollmentAttributeDefault.0.co_enrollment_attribute_id')
. "\n";

$l = 1;
?>



  • [comanage-dev] r650 - in registry/trunk/app: Controller Model View/CoEnrollmentAttributes, svnlog, 12/25/2013

Archive powered by MHonArc 2.6.16.

Top of Page