Skip to Content.
Sympa Menu

comanage-dev - [comanage-dev] r611 - in registry/trunk/app: Config/Schema Controller Lib Model View/CoEnrollmentFlows View/CoPetitions

Subject: COmanage Developers List

List archive

[comanage-dev] r611 - in registry/trunk/app: Config/Schema Controller Lib Model View/CoEnrollmentFlows View/CoPetitions


Chronological Thread 
  • From:
  • To:
  • Subject: [comanage-dev] r611 - in registry/trunk/app: Config/Schema Controller Lib Model View/CoEnrollmentFlows View/CoPetitions
  • Date: Tue, 24 Sep 2013 09:59:08 -0400

Author: benno
Date: 2013-09-24 09:59:08 -0400 (Tue, 24 Sep 2013)
New Revision: 611

Modified:
registry/trunk/app/Config/Schema/schema.xml
registry/trunk/app/Controller/CoPetitionsController.php
registry/trunk/app/Lib/lang.php
registry/trunk/app/Model/CoEnrollmentFlow.php
registry/trunk/app/View/CoEnrollmentFlows/fields.inc
registry/trunk/app/View/CoPetitions/fields.inc
Log:
Add introductory text to enrollment flows (CO-688)

Modified: registry/trunk/app/Config/Schema/schema.xml
===================================================================
--- registry/trunk/app/Config/Schema/schema.xml 2013-09-24 13:54:38 UTC (rev
610)
+++ registry/trunk/app/Config/Schema/schema.xml 2013-09-24 13:59:08 UTC (rev
611)
@@ -5,7 +5,7 @@
Version: $Revision$
Date: $Date$

- Copyright (C) 2010-2012 University Corporation for Advanced Internet
Development, Inc.
+ Copyright (C) 2010-2013 University Corporation for Advanced Internet
Development, Inc.

Licensed under the Apache License, Version 2.0 (the "License"); you may
not use this file except in compliance with
the License. You may obtain a copy of the License at
@@ -559,6 +559,7 @@
<field name="notify_on_approval" type="L" />
<field name="approval_subject" type="C" size="256" />
<field name="approval_body" type="X" size="4000" />
+ <field name="introduction_text" type="X" size="4000" />
<field name="created" type="T" />
<field name="modified" type="T" />


Modified: registry/trunk/app/Controller/CoPetitionsController.php
===================================================================
--- registry/trunk/app/Controller/CoPetitionsController.php 2013-09-24
13:54:38 UTC (rev 610)
+++ registry/trunk/app/Controller/CoPetitionsController.php 2013-09-24
13:59:08 UTC (rev 611)
@@ -276,6 +276,15 @@
$this->set('vv_terms_and_conditions',

$this->CoPetition->Co->CoTermsAndConditions->find('all', $tArgs));
}
+
+ // See if there is introductory text
+
+ $introText =
$this->CoPetition->CoEnrollmentFlow->field('introduction_text',
+
array('CoEnrollmentFlow.id' => $enrollmentFlowID));
+
+ if($introText) {
+ $this->set('vv_introduction_text', $introText);
+ }
}

if(($this->action == 'edit' || $this->action == 'view')

Modified: registry/trunk/app/Lib/lang.php
===================================================================
--- registry/trunk/app/Lib/lang.php 2013-09-24 13:54:38 UTC (rev 610)
+++ registry/trunk/app/Lib/lang.php 2013-09-24 13:59:08 UTC (rev 611)
@@ -510,6 +510,8 @@
'fd.ef.env.desc' => 'Examine the server environment for authoritative
organizational identity attributes',
'fd.ef.epx' => 'Early Provisioning Executable',
'fd.ef.epx.desc' => '(Need for this TBD)',
+ 'fd.ef.intro' => 'Introduction',
+ 'fd.ef.intro.desc' => 'Optional text to display at the top of a Petition
form',
'fd.ef.ldap' => 'Enable LDAP Attribute Retrieval',
'fd.ef.ldap.desc' => 'If the enrollee is affiliated with an organization
with a known LDAP server, query the LDAP server for authoritative attributes',
'fd.ef.match' => 'Identity Matching',

Modified: registry/trunk/app/Model/CoEnrollmentFlow.php
===================================================================
--- registry/trunk/app/Model/CoEnrollmentFlow.php 2013-09-24 13:54:38
UTC (rev 610)
+++ registry/trunk/app/Model/CoEnrollmentFlow.php 2013-09-24 13:59:08
UTC (rev 611)
@@ -153,6 +153,11 @@
'required' => true,
'allowEmpty' => false
),
+ 'introduction_text' => array(
+ 'rule' => 'notEmpty',
+ 'required' => false,
+ 'allowEmpty' => true
+ ),
'status' => array(
'rule' => array('inList', array(StatusEnum::Active,
StatusEnum::Suspended))

Modified: registry/trunk/app/View/CoEnrollmentFlows/fields.inc
===================================================================
--- registry/trunk/app/View/CoEnrollmentFlows/fields.inc 2013-09-24
13:54:38 UTC (rev 610)
+++ registry/trunk/app/View/CoEnrollmentFlows/fields.inc 2013-09-24
13:59:08 UTC (rev 611)
@@ -2,7 +2,7 @@
/**
* COmanage Registry CO Enrollment Configuration Fields
*
- * Copyright (C) 2011-12 University Corporation for Advanced Internet
Development, Inc.
+ * Copyright (C) 2011-13 University Corporation for Advanced Internet
Development, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may
not use this file except in compliance with
* the License. You may obtain a copy of the License at
@@ -14,7 +14,7 @@
* KIND, either express or implied. See the License for the specific
language governing
* permissions and limitations under the License.
*
- * @copyright Copyright (C) 2011-12 University Corporation for Advanced
Internet Development, Inc.
+ * @copyright Copyright (C) 2011-13 University Corporation for Advanced
Internet Development, Inc.
* @link http://www.internet2.edu/comanage COmanage Project
* @package registry
* @since COmanage Registry v0.3
@@ -399,6 +399,17 @@
:
Sanitize::html($co_enrollment_flows[0]['CoEnrollmentFlow']['approval_body']));
?>
</td>
</tr>
+ <tr class="line1">
+ <td>
+ <b><?php print _txt('fd.ef.intro'); ?></b><br />
+ <font class="desc"><?php print _txt('fd.ef.intro.desc'); ?></font>
+ </td>
+ <td>
+ <?php print ($e
+ ? $this->Form->input('introduction_text')
+ :
Sanitize::html($co_enrollment_flows[0]['CoEnrollmentFlow']['introduction_text']));
?>
+ </td>
+ </tr>
</tbody>
</table>
<?php

Modified: registry/trunk/app/View/CoPetitions/fields.inc
===================================================================
--- registry/trunk/app/View/CoPetitions/fields.inc 2013-09-24 13:54:38
UTC (rev 610)
+++ registry/trunk/app/View/CoPetitions/fields.inc 2013-09-24 13:59:08
UTC (rev 611)
@@ -2,7 +2,7 @@
/**
* COmanage Registry CO Petitions Fields
*
- * Copyright (C) 2012 University Corporation for Advanced Internet
Development, Inc.
+ * Copyright (C) 2012-3 University Corporation for Advanced Internet
Development, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may
not use this file except in compliance with
* the License. You may obtain a copy of the License at
@@ -14,7 +14,7 @@
* KIND, either express or implied. See the License for the specific
language governing
* permissions and limitations under the License.
*
- * @copyright Copyright (C) 2012 University Corporation for Advanced
Internet Development, Inc.
+ * @copyright Copyright (C) 2012-3 University Corporation for Advanced
Internet Development, Inc.
* @link http://www.internet2.edu/comanage COmanage Project
* @package registry
* @since COmanage Registry v0.5
@@ -227,14 +227,18 @@
</tbody>
</table>
</div>
-
<?php endif; // action == add ?>
</div>
<div id="tabs-attributes">
-
- <?php
- include('petition-attributes.inc');
- ?>
+ <?php
+ if($this->action == 'add' && !empty($vv_introduction_text)) {
+ print "<p>" . $vv_introduction_text . "</p>";
+ }
+ ?>
+ <?php
+ include('petition-attributes.inc');
+ ?>
+ </div>
</div>
</div>




  • [comanage-dev] r611 - in registry/trunk/app: Config/Schema Controller Lib Model View/CoEnrollmentFlows View/CoPetitions, svnlog, 09/24/2013

Archive powered by MHonArc 2.6.16.

Top of Page