comanage-dev - [comanage-dev] r639 - in registry/trunk/app: Config/Schema Lib Model View/CoEnrollmentAttributes
Subject: COmanage Developers List
List archive
[comanage-dev] r639 - in registry/trunk/app: Config/Schema Lib Model View/CoEnrollmentAttributes
Chronological Thread
- From:
- To:
- Subject: [comanage-dev] r639 - in registry/trunk/app: Config/Schema Lib Model View/CoEnrollmentAttributes
- Date: Wed, 11 Dec 2013 23:34:15 -0500
Author: benno
Date: 2013-12-11 23:34:15 -0500 (Wed, 11 Dec 2013)
New Revision: 639
Modified:
registry/trunk/app/Config/Schema/schema.xml
registry/trunk/app/Lib/lang.php
registry/trunk/app/Model/CoEnrollmentAttribute.php
registry/trunk/app/View/CoEnrollmentAttributes/fields.inc
Log:
Hide non-modifiable attributes during enrollment (CO-732)
Modified: registry/trunk/app/Config/Schema/schema.xml
===================================================================
--- registry/trunk/app/Config/Schema/schema.xml 2013-12-12 00:58:06 UTC (rev
638)
+++ registry/trunk/app/Config/Schema/schema.xml 2013-12-12 04:34:15 UTC (rev
639)
@@ -596,6 +596,7 @@
</field>
<field name="required" type="I" />
<field name="ordr" type="I" />
+ <field name="hidden" type="L" />
<field name="copy_to_coperson" type="L" />
<field name="ignore_authoritative" type="L" />
<field name="language" type="C" size="16" />
Modified: registry/trunk/app/Lib/lang.php
===================================================================
--- registry/trunk/app/Lib/lang.php 2013-12-12 00:58:06 UTC (rev 638)
+++ registry/trunk/app/Lib/lang.php 2013-12-12 04:34:15 UTC (rev 639)
@@ -570,6 +570,8 @@
'fd.group.own' => 'Owner',
'fd.group.own.only' => 'Owner (only)',
'fd.groups' => 'Groups',
+ 'fd.hidden' => 'Hidden',
+ 'fd.hidden.desc' => 'If true, this field will not be rendered during
enrollment',
'fd.history.pt' => 'Petition History',
// Identifier Assignment
'fd.ia.algorithm' => 'Algorithm',
Modified: registry/trunk/app/Model/CoEnrollmentAttribute.php
===================================================================
--- registry/trunk/app/Model/CoEnrollmentAttribute.php 2013-12-12 00:58:06
UTC (rev 638)
+++ registry/trunk/app/Model/CoEnrollmentAttribute.php 2013-12-12 04:34:15
UTC (rev 639)
@@ -257,8 +257,13 @@
// Description
$attr['description'] =
$efAttr['CoEnrollmentAttribute']['description'];
- // Single value attributes are never hidden
- $attr['hidden'] = 0;
+ // Single value attributes are never hidden, unless there is a
non-modifable
+ // default value
+ $attr['hidden'] =
+ (isset($efAttr['CoEnrollmentAttribute']['hidden'])
+ && $efAttr['CoEnrollmentAttribute']['hidden']
+ && isset($efAttr['CoEnrollmentAttributeDefault'][0]['modifiable'])
+ && !$efAttr['CoEnrollmentAttributeDefault'][0]['modifiable']);
// Org attributes can ignore authoritative values
$attr['ignore_authoritative'] =
Modified: registry/trunk/app/View/CoEnrollmentAttributes/fields.inc
===================================================================
--- registry/trunk/app/View/CoEnrollmentAttributes/fields.inc 2013-12-12
00:58:06 UTC (rev 638)
+++ registry/trunk/app/View/CoEnrollmentAttributes/fields.inc 2013-12-12
04:34:15 UTC (rev 639)
@@ -448,6 +448,19 @@
? _txt('fd.yes') : _txt('fd.no'))); ?>
</td>
</tr>
+ <tr class="line<?php print ($l % 2); $l++; ?>">
+ <td>
+ <b><?php print _txt('fd.hidden'); ?></b><br />
+ <font class="desc"><?php print _txt('fd.hidden.desc'); ?></font>
+ </td>
+ <td>
+ <?php // Note this is a CoEnrollmentAttribute field, not
CoEnrollmentAttributeDefault
+ print ($e
+ ? $this->Form->input('hidden', array('default' =>
false))
+ :
($co_enrollment_attributes[0]['CoEnrollmentAttribute']['hidden']
+ ? _txt('fd.yes') : _txt('fd.no'))); ?>
+ </td>
+ </tr>
</table>
</div>
<?php
- [comanage-dev] r639 - in registry/trunk/app: Config/Schema Lib Model View/CoEnrollmentAttributes, svnlog, 12/11/2013
Archive powered by MHonArc 2.6.16.