Index: WAeUP_SRP/trunk/skins/waeup_custom/default.css.dtml
===================================================================
--- WAeUP_SRP/trunk/skins/waeup_custom/default.css.dtml	(revision 2098)
+++ WAeUP_SRP/trunk/skins/waeup_custom/default.css.dtml	(revision 2098)
@@ -0,0 +1,1063 @@
+<dtml-comment>
+CSS directives conforming to the CSS 2.1 spec.
+Those CSS directives are suppported by user agents such as Mozilla/Firefox, MSIE6, MSIE5.x, etc.
+$Id: default.css.dtml 47552 2006-07-28 17:33:14Z gracinet $
+</dtml-comment>
+
+<dtml-let last_modified="_.DateTime()-14" expires="_.DateTime()+1" >
+<dtml-call "REQUEST.RESPONSE.setHeader( 'Content-Type', 'text/css' )">
+<dtml-call "REQUEST.RESPONSE.setHeader( 'Last-Modified', last_modified.toZone('GMT').rfc822() )">
+<dtml-call "REQUEST.RESPONSE.setHeader( 'Cache-Control', 'max-age=36000, must-revalidate' )">
+<dtml-call "REQUEST.RESPONSE.setHeader( 'Expires', expires.toZone('GMT').rfc822() )" >
+</dtml-let>
+
+<dtml-with stylesheet_properties>
+
+<dtml-comment>
+BASIC ELEMENTS ------------------------------
+</dtml-comment>
+
+body {
+font: <dtml-var mainFont>;
+background: <dtml-var mainBackground>;
+color: <dtml-var mainFontColor>;
+margin: 0;
+padding: 0;
+}
+
+body .popup {
+font: <dtml-var mainFont>;
+}
+
+a {
+text-decoration: none;
+color: <dtml-var mainLinkColor>;
+background-color: transparent;
+}
+
+a.strong {
+font-weight: bold;
+}
+
+img {
+border: 0;
+vertical-align: middle;
+}
+
+p {
+margin: 0.5em 0 1em 0;
+line-height: 133%;
+}
+p a {
+text-decoration: underline;
+}
+p a:visited {
+color: <dtml-var contentLinkVisitedColor>;
+background-color: transparent;
+}
+p a:active {
+color: <dtml-var contentLinkActiveColor>;
+background-color: transparent;
+}
+a:hover {
+text-decoration: none;
+}
+p img {
+border: <dtml-var contentImageBorder>;
+margin: 0;
+}
+
+h1, h2, h3, h4, h5, h6 {
+color: <dtml-var headingFontColor>;
+background-color: transparent;
+font: <dtml-var headingFont>;
+font-weight: bold;
+margin: 0;
+padding-top: 0.5em;
+}
+h1 {
+font-size: <dtml-var headingSize1>;
+margin-top: 0.5em;
+margin-bottom: 0.5em;
+}
+h2 {
+font-size: <dtml-var headingSize2>;
+margin-bottom: 1em;
+}
+h3 {
+font-size: <dtml-var headingSize3>;
+}
+h4 {
+font-size: <dtml-var headingSize4>;
+}
+h5 {
+font-size: <dtml-var headingSize5>;
+}
+h6 {
+font-size: <dtml-var headingSize6>;
+}
+
+ol, ul {
+padding: 0;
+margin: 0;
+line-height: 133%;
+}
+ul a, ol a {
+text-decoration: underline;
+}
+
+dt {
+font-weight: bold;
+margin: 0.5em 0em 0.5em 0em;
+}
+dt a {
+text-decoration: none;
+}
+
+dd {
+line-height: 133%;
+margin-bottom: 1em;
+}
+
+legend {
+background: <dtml-var mainBackground>;
+padding: 0.5em 0em 0.5em 0em;
+}
+
+textarea {
+color: <dtml-var mainFontColor>;
+background-color: white;
+font: <dtml-var inputFont>;
+}
+input {
+font: <dtml-var inputFont>;
+color: <dtml-var mainFontColor>;
+background-color: white;
+vertical-align: middle;
+}
+select {
+font: <dtml-var inputFont>;
+vertical-align: top;
+}
+abbr, acronym, .explain {
+color: <dtml-var mainFontColor>;
+background-color: transparent;
+}
+q, blockquote {
+font-style: italic;
+font-size: 100%;
+}
+code {
+font-size: 100%;
+color: <dtml-var mainFontColor>;
+background-color: <dtml-var preBackground>;
+}
+pre {
+font-size: 100%;
+padding: 1em;
+border: <dtml-var preBorder>;
+color: <dtml-var mainFontColor>;
+background-color: <dtml-var preBackground>;
+overflow: auto;
+}
+
+<dtml-comment>
+Classes ------------------------------
+</dtml-comment>
+
+#idioma p {
+margin-top: 0;
+}
+
+.logo {
+margin: <dtml-var logoMargin>;
+padding: <dtml-var logoPadding>;
+}
+
+.note {
+font-size: smaller;
+}
+
+.even {
+background-color: <dtml-var boxEvenBackground>;
+}
+
+.odd {
+background-color: <dtml-var boxOddBackground>;
+}
+
+.pending {
+font-weight: bold;
+color: #ffa500;
+}
+
+.work {
+font-weight: bold;
+color: blue;
+}
+
+.draft {
+font-weight: bold;
+color: #5555ff;
+}
+
+.published {
+font-weight: bold;
+color: #22a522;
+}
+
+.deferred {
+font-weight: bold;
+color: #ff6600;
+}
+
+.expired {
+font-weight: bold;
+color: #ff0033;
+}
+
+.locked {
+border: 1px solid #ff6600;
+color: #ff6600;
+padding-left: 0.2em;
+padding-right: 0.2em;
+}
+
+.url {
+color: <dtml-var urlFontColor>
+}
+
+input.standalone, button.standalone {
+background: <dtml-var standaloneButtonBackground>;
+background-image: none;
+color: <dtml-var standaloneButtonFontColor>;
+border: <dtml-var standaloneButtonBorder>;
+}
+
+input.context {
+background: <dtml-var contextButtonBackground>;
+background-image: none;
+color: <dtml-var contextButtonFontColor>;
+}
+
+input.destructive {
+background: <dtml-var destructiveButtonBackground>;
+background-image: none;
+color: <dtml-var destructiveButtonFontColor>;
+}
+
+button {
+font: <dtml-var inputFont>;
+background: <dtml-var standaloneButtonBackground>;
+color: <dtml-var standaloneButtonFontColor>;
+background-image: none;
+vertical-align: middle;
+}
+
+<dtml-comment>
+DIVs ------------------------------
+</dtml-comment>
+
+div.batchLayout {
+text-align: right;
+background-color: <dtml-var boxEvenBackground>;
+}
+
+div.pageNavigationLayout {
+text-align: center;
+background-color: <dtml-var boxEvenBackground>;
+}
+
+.contact {
+text-align: center;
+margin: 0;
+padding: 1px 0px 1px 0px;
+}
+
+div.message {
+background: <dtml-var messageBackground>;
+color: <dtml-var mainFontColor>;
+font: <dtml-var messageFont>;
+margin: 1em 0;
+padding: 0.5em 1em;
+vertical-align: middle;
+}
+
+div.message a {
+background: <dtml-var messageBackground>;
+color: <dtml-var mainFontColor>;
+text-decoration: underline;
+}
+
+div.description {
+font: <dtml-var descriptionFont>;
+display: block;
+margin-bottom: 0.5em;
+line-height: 133%;
+}
+
+div.documentActions {
+float: right;
+margin-top: 1em;
+}
+
+div.documentActions li {
+display: inline;
+}
+
+div.searchBox {
+float: right;
+text-align: right;
+padding: <dtml-var searchPadding>;
+margin: <dtml-var searchMargin>;
+clear: right;
+background-color: transparent;
+color: <dtml-var searchFontColor>;
+text-transform: <dtml-var textTransform>;
+width: 40%;
+}
+
+div.headerActions {
+float: right;
+text-align: right;
+margin-top: 1em;
+margin-right: 1em;
+margin-bottom: 4px;
+}
+
+div.headerActions li {
+display: inline;
+}
+
+div.pathBar {
+padding: 1px 1em 1px 1em;
+text-transform: <dtml-var textTransform>;
+}
+
+div.row {
+clear: both;
+}
+
+div.label {
+padding-right: 2em;
+font-weight: bold;
+float: left;
+}
+
+div.field {
+padding: 0px 0px 0px 0px;
+float: left;
+text-align: left;
+}
+
+span.legend {
+font-weight: bold;
+}
+
+div.popupImg {
+padding: 10px;
+text-align: center;
+}
+
+.hidden {
+display: none;
+}
+
+.hiddenItem {
+background-color: <dtml-var boxEvenBackground>;
+}
+
+<dtml-comment>
+Documents language selection
+</dtml-comment>
+
+span.selectedLang {
+background: #003a6b;
+color: #ffffff;
+font-weight: bold;
+padding-left: 0.5em;
+padding-right: 0.5em;
+}
+a.availableLang {
+text-decoration: underline;
+}
+a.availableLang:hover {
+text-decoration: none;
+}
+
+<dtml-comment>
+Accessibility statement and usage
+</dtml-comment>
+
+div.accesskeys, div.accesskeysUsage {
+border: 1px solid #999999;
+background-color: #dddddd;
+padding: 1em;
+margin: 0.5em 0 2em 0;
+}
+
+<dtml-comment>
+Contact info and conformance statement
+</dtml-comment>
+
+.contactInfo li {
+display: inline;
+margin: 1em;
+}
+
+.conformanceStatement {
+text-align: center;
+}
+
+.conformanceStatement li {
+display: inline;
+}
+
+.conformanceStatement img {
+margin: 1em;
+}
+
+<dtml-comment>
+CMF Calendar
+</dtml-comment>
+
+.CalendarArrow {
+font-weight: bold;
+text-decoration: none;
+color: #000000;
+}
+
+.CalendarTitle {
+font-weight: bold;
+text-decoration: none;
+text-align: center;
+color: #000000;
+}
+
+p.help {
+font-style: italic;
+}
+
+table.calendar td {
+white-space: nowrap;
+background-color: white;
+width: 1.5em;
+}
+
+table.calendar a {
+text-decoration: none;
+color: black;
+}
+
+table.calendar td.event {
+background-color: <dtml-var boxEvenBackground>;
+text-decoration: none;
+}
+
+table.calendar td.todayevent {
+background-color: <dtml-var boxEvenBackground>;
+}
+
+table.calendar td.weekdays {
+background-color: <dtml-var boxEvenBackground>;
+}
+
+table.calendar th {
+background-color: <dtml-var boxEvenBackground>;
+white-space: nowrap;
+}
+
+table.localRoleForm th {
+text-align: left;
+}
+
+span.highlightedSearchTerm {
+background-color: #ffff00;
+}
+
+span.searchFor {
+font-weight: bold;
+}
+
+/* hack for IE6 bugs */
+/* Hides from IE5-mac \*/
+* html .group {height: 1%}
+* html div.box {height: 1%}
+* html div.box .content {height: 1%}
+* html div.document {height: 1%}
+/* End hide from IE-mac */
+
+.netscape4 {
+display: none;
+}
+
+table {
+font-size: 100%;
+}
+
+hr {
+height: 1px;
+color: <dtml-var mainTabBorderColorSelected>;
+background-color: transparent;
+}
+
+h1, h2 {
+border-bottom: 1px solid <dtml-var mainTabBorderColor>;
+}
+
+form {
+border: none;
+}
+
+textarea {
+border: <dtml-var inputBorder>;
+padding: 0.1em;
+}
+input {
+border: <dtml-var inputBorder>;
+margin-bottom: 1px; /* IE bug fix */
+padding: 0.1em;
+}
+select {
+font: <dtml-var inputFont>;
+border: <dtml-var inputBorder>;
+vertical-align: top;
+}
+
+abbr, acronym, .explain {
+border-bottom: 1px dotted <dtml-var mainFontColor>;
+cursor: help;
+}
+
+ol, ul {
+padding-left: 3em;
+margin: 0px;
+}
+
+.content li, #content li {
+padding: 0em 0em 0.4em 0em;
+}
+
+ul.fileChoice {
+padding-left: 0;
+list-style-type: None;
+}
+
+button {
+background: <dtml-var buttonBackground>;
+border: <dtml-var buttonBorder>;
+margin: 0.2em;
+padding: 0.1em;
+font: <dtml-var inputFont>;
+}
+
+button:hover {
+background: <dtml-var buttonBackgroundHover>;
+}
+
+input.standalone, button.standalone {
+background: <dtml-var standaloneButtonBackground>;
+cursor: pointer;
+font: <dtml-var inputFont>;
+font-weight: <dtml-var buttonWeight>;
+padding: <dtml-var standaloneButtonPadding>;
+text-transform: <dtml-var textTransform>;
+}
+
+input.standalone:hover, button.standalone:hover {
+background: <dtml-var standaloneButtonBackgroundHover>;
+}
+
+input.context {
+background: <dtml-var contextButtonBackground>;
+cursor: pointer;
+font: <dtml-var inputFont>;
+font-weight: <dtml-var buttonWeight>;
+padding: <dtml-var contextButtonPadding>;
+text-transform: <dtml-var textTransform>;
+border: <dtml-var contextButtonBorder>;
+}
+
+input.context:hover {
+background: <dtml-var contextButtonBackgroundHover>;
+}
+
+input.destructive {
+background: <dtml-var destructiveButtonBackground>;
+border: <dtml-var destructiveButtonBorder>;
+cursor: pointer;
+font: <dtml-var inputFont>;
+font-weight: <dtml-var buttonWeight>;
+padding: <dtml-var destructiveButtonPadding>;
+text-transform: <dtml-var textTransform>;
+}
+
+input.destructive:hover {
+background: <dtml-var destructiveButtonBackgroundHover>;
+border: <dtml-var destructiveButtonBorderHover>;
+}
+
+input.noborder {
+background: transparent;
+border: <dtml-var noBorder>;
+margin: 0;
+}
+
+input.searchButton {
+font-size: 100% ! important;
+margin-bottom: 1px ! important;
+}
+
+input.moveUp {
+background: <dtml-var moveUpButtonBackground>;
+}
+input.moveDown {
+background: <dtml-var moveDownButtonBackground>;
+}
+input.moveTop {
+background: <dtml-var moveTopButtonBackground>;
+}
+input.moveBottom {
+background: <dtml-var moveBottomButtonBackground>;
+}
+
+<dtml-comment>
+Forms ------------------------------
+</dtml-comment>
+
+form {
+margin: 0px;
+}
+
+form.workflow {
+padding:0px 0px 10px 0px;
+}
+
+form.workflow dl {
+font-weight: bold;
+}
+
+form.workflow dd {
+margin-left: 0px;
+}
+
+<dtml-comment>
+Generic table definitions
+</dtml-comment>
+
+table.columns td.left {
+background: <dtml-var columnsLeftBackground>;
+}
+table.columns td.right {
+background: <dtml-var columnsRightBackground>;
+}
+
+table.listing {
+width: 100%;
+}
+
+table.listing caption {
+font-weight: bold;
+}
+
+table.listing td {
+padding: 0.4em;
+}
+
+table.listing thead tr th {
+text-align: center;
+}
+
+table.listing thead td {
+background-color: <dtml-var listingHeaderBackground>;
+color: <dtml-var listingHeaderColor>;
+text-align: center;
+font-weight: bold;
+}
+
+table.listing tbody td {
+background-color: <dtml-var listingCellBackground>;
+color: <dtml-var listingCellColor>;
+}
+
+table.listing tbody tr.odd td {
+background-color: <dtml-var listingCellOddBackground>;
+color: <dtml-var listingCellOddColor>;
+}
+
+table.listing tbody tr.even td {
+background-color: <dtml-var listingCellEvenBackground>;
+color: <dtml-var listingCellEvenColor>;
+}
+
+table.listing .action {
+font-weight: bold;
+text-align: left;
+}
+
+<dtml-comment>
+Specific table definitions
+</dtml-comment>
+
+form#loginForm {
+padding-top:20px;
+padding-bottom:20px;
+width: 30em;
+}
+table#login th {
+width: 12em;
+}
+
+table#portalConfiguration th {
+width: 18em;
+padding-bottom: 1em;
+}
+table#portalConfiguration td {
+width: 18em;
+padding-bottom: 1em;
+}
+
+table#subscriptions td {
+text-align: center;
+}
+
+table#subscriptions .action {
+text-align: left;
+}
+
+table.localRolesAssignment {
+width: 100%;
+padding: 0;
+margin: 0.4em;
+margin-bottom: 2em;
+border: 0.1em solid black;
+}
+
+table.localRolesAssignment td.assignedRole {
+text-align: center;
+}
+
+table.localRolesAssignment td.inheritedRole {
+text-align: center;
+background: <dtml-var inheritedRole>;
+}
+
+span.inheritedRole {
+background: <dtml-var inheritedRole>;
+}
+
+table.localRolesAssignment td.inheritedBlockedRole {
+text-align: center;
+background: <dtml-var inheritedBlockedRole>;
+}
+
+span.inheritedBlockedRole {
+background: <dtml-var inheritedBlockedRole>;
+}
+
+<dtml-comment>
+DIVs ------------------------------
+</dtml-comment>
+
+div.top {
+background: <dtml-var topBackground>;
+margin: <dtml-var topMargin>;
+padding: <dtml-var topPadding>;
+width: 100%;
+}
+
+.contact {
+background: <dtml-var footerBackground>;
+border-top: <dtml-var footerBorder>;
+border-bottom: <dtml-var footerBorder>;
+width: 100%;
+}
+
+div.document {
+font: <dtml-var contentFont>;
+background: <dtml-var contentBackground>;
+}
+
+div.message {
+border: <dtml-var messageBorder>;
+}
+
+div.pathBar {
+border-bottom-color: <dtml-var mainTabBorderColorSelected>;
+border-bottom-style: solid;
+border-bottom-width: 1px;
+}
+
+div.row {
+margin: 0em 0em 0.5em 0em;
+position:relative;
+}
+
+.required {
+padding-right: 0.5em;
+background: <dtml-var requiredField>;
+}
+
+.error {
+background: <dtml-var messageBackground>;
+border: <dtml-var messageBorder>;
+padding: 1em;
+margin: 0em;
+}
+
+span.legend {
+background: <dtml-var contentBackground>;
+font-size: <dtml-var legendFontSize>;
+padding: 0.5em 0em 0.5em 0em;
+position : relative;
+top: -0.8em;
+left: 0;
+}
+
+<dtml-comment>
+The "group" class is used to group together the HTML fields of a form.
+</dtml-comment>
+.group {
+margin: 0em;
+padding:10px 0px 20px 0px;
+}
+
+.comment_box {
+border: 1px solid #bcbcbc;
+margin: 1em 0 1em 1em;
+padding: 5px 10px 10px 20px;
+}
+
+.user_roles {
+margin: 1em 0 1em 0;
+padding: 0.7em 0em 0.7em 0em;
+}
+
+.header_roles {
+font-weight: bold;
+background: #b1acb2;
+}
+
+.assign_roles {
+padding-top: 0.7em;
+}
+
+table.calendar {
+border: <dtml-var boxBorder>;
+text-align: right;
+}
+
+table.calendar a:hover {
+text-decoration: none;
+}
+
+table.calendar th {
+border: none;
+font-weight: bold;
+text-align: center;
+}
+
+table.calendar td {
+width: 1.5em;
+}
+
+table.calendar td.weekdays {
+border: <dtml-var boxBorder>;
+border-style: solid none;
+text-align: center;
+}
+
+table.calendar td.event {
+font-weight: bold;
+}
+
+table.calendar td.todayevent {
+border: <dtml-var boxHighlight>;
+font-weight: bold;
+}
+
+table.calendar td.todaynoevent {
+border-collapse: collapse;
+border: <dtml-var boxHighlight>;
+}
+
+<dtml-comment>
+Tooltips
+</dtml-comment>
+
+.tooltipControl {
+color: #000000;
+background: #ffffe1;
+border: 1px solid #000000;
+
+margin-left: 1em;
+}
+
+.tooltipControl:hover {
+background: #ffffb8;
+}
+
+.tooltipArea {
+color: #000000;
+background: #ffffe1;
+border: 1px solid #000000;
+padding: 0.8em;
+font-weight: normal;
+font-size: 80%;
+text-align: left;
+
+position: inherit;
+left: -15em;
+top: 1.5em;
+width: 20em;
+
+visibility: hidden;
+display: none;
+z-index: 1000;
+}
+
+<dtml-comment>
+XXX: CPSMailBoxer definitions that should not be here but in a dedicated file
+</dtml-comment>
+
+div.mailboxerNoArchive {
+border-top: solid;
+border-width: 1px;
+}
+
+td.mailboxerMonth {
+background-color: <dtml-var boxEvenBackground>;
+text-align: center;
+}
+
+<dtml-comment>
+Books
+</dtml-comment>
+
+div.bookSummary {
+width: 100%;
+border: 1px solid black;
+padding: 0.5em;
+}
+
+div.bookSummaryNav {
+text-align: center;
+width: 100%;
+background-color: <dtml-var boxEvenBackground>;
+}
+
+li.summaryEntries {
+margin: 0.5em;
+}
+
+div.bookPageHeader {
+border-bottom: 1px solid black;
+}
+
+div.bookPageNavigation {
+}
+
+div.bookPageInfo {
+float: right;
+}
+
+<dtml-comment>
+Hide stuff by id and make it available in source
+</dtml-comment>
+
+#bylineFolder {
+clear: both;
+text-align: left;
+}
+
+#byline {
+clear: both;
+text-align: right;
+margin-top: 2em;
+}
+
+<dtml-comment>
+javascript use for block toggle
+</dtml-comment>
+
+div.hidden {
+visibility: hidden;
+display: none;
+}
+
+div.visible {
+visibility: visible;
+display: block;
+}
+
+<dtml-comment>
+Advanced search form
+</dtml-comment>
+
+#advancedSearchForm {
+font-size: 90%;
+}
+
+#advancedSearchZCText {
+text-align: right;
+}
+
+p.advancedSearchButton {
+text-align: right;
+}
+
+#advancedSearchForm fieldset {
+border: none;
+border-left: <dtml-var boxBorder>;
+border-bottom: <dtml-var boxBorder>;
+padding: 0.5em 0em 0.5em 0em;
+margin: 0.5em;
+}
+
+span.advancedSearchColumn {
+padding-left: 1em;
+float:left;
+width:12em;
+}
+
+div.drophover {
+border-bottom: 3px solid black;
+}
+
+div.drophover-in {
+background: #ffe68f;
+border: 1px solid black;
+}
+
+#ajax_psm {
+background: #ffac0b;
+color: white;
+padding: 8px;
+border: 1px solid black;
+float: right;
+font-weight: bold;
+position: absolute;
+<dtml-if "isUserAgentGecko(REQUEST)">
+-moz-border-radius: 4px;
+</dtml-if>
+}
+
+div.draggable:hover {
+background: #efefef;
+}
+
+div.more_block {
+padding-left: 10px;
+}
+
+div.batchLayout, div.pageNavigationLayout {
+color: #666666;
+margin: 0px 2px 0px 2px;
+padding: 3px 20px 3px 0px;
+}
+
+table.folderButtons {
+padding-top: 1.2em;
+}
+
+</dtml-with>
Index: WAeUP_SRP/trunk/skins/waeup_student/apply_pume.py
===================================================================
--- WAeUP_SRP/trunk/skins/waeup_student/apply_pume.py	(revision 2098)
+++ WAeUP_SRP/trunk/skins/waeup_student/apply_pume.py	(revision 2098)
@@ -0,0 +1,101 @@
+## Script (Python) "apply_pume"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=REQUEST
+##title=
+##
+# $Id$
+"""
+process the Pume Application Form
+"""
+try:
+    from Products.zdb import set_trace
+except:
+    def set_trace():
+        pass
+
+import DateTime
+current = DateTime.DateTime()
+pr = context.portal_registration
+request = REQUEST
+
+#type_name = 'StudentApplication'
+#ti = context.portal_types[type_name]
+#REQUEST.set('type_name',type_name)
+create = "create" in request.keys()
+apply_pume = "apply" in request.keys()
+edit = "edit" in request.keys()
+mode = request.get('mode','')
+if not mode:
+    if apply_pume or edit:
+        mode = "edit"
+    else:
+        mode = "create"
+validate = create or edit or apply_pume
+
+lt = context.portal_layouts
+reg_no = request.get('widget__reg_no','').upper()
+if not reg_no:
+    reg_no = request.get('reg_no','').upper()
+    
+object = {}
+#set_trace()
+if reg_no:
+    brains = context.applicants_catalog(reg_no = reg_no)
+    if len(brains) == 1:
+        for field in context.applicants_catalog.schema():
+            object[field] = getattr(brains[0],field,None)
+
+res,psm,ds = lt.renderLayout(layout_id= 'application',
+                             schema_id= 'application',
+                             layout_mode = mode,
+                             context=context,
+                             mapping=validate and REQUEST,
+                             ob=object,
+                             commit = False,
+                            )
+
+if psm == 'invalid':
+    return context.apply_pume_form(rendered = res,
+                                   psm = "Please correct your input!",
+                                   #psm = "%s, %s" % (psm,ds),
+                                   mode = mode,
+                                   ds = ds,
+                                  )
+elif psm == '':
+    return context.apply_pume_form(rendered = res,
+                                   psm = None,
+                                   ds = ds,
+                                   mode = mode,
+                                  )
+elif psm == 'valid':
+    pass
+if create or edit or apply_pume:
+    data = {}
+    for field in context.applicants_catalog.schema():
+        if ds.has_key(field) and request.has_key("widget__%s" % field):
+            data[field] = ds.get(field)
+    data['reg_no'] = reg_no
+    if apply_pume:
+        data['registration_date'] = current
+        data['status'] = "submitted"
+    context.applicants_catalog.modifyRecord(**data)
+    if apply_pume:
+        if not request.has_key('confirm'):
+            return context.apply_pume_form(rendered = res,
+                                        psm = "Please confirm Passport Photograph",
+                                        #psm = "%s, %s" % (psm,ds),
+                                        mode = mode,
+                                        ds = ds,
+                                        )
+                    
+        return request.RESPONSE.redirect("%s/apply_pume?mode=view&reg_no=%s" %
+                                     (context.absolute_url(),ds.get('reg_no')))
+    elif edit or create:
+        return request.RESPONSE.redirect("%s/apply_pume?mode=edit&reg_no=%s" %
+                                     (context.absolute_url(),ds.get('reg_no')))
+
+
Index: WAeUP_SRP/trunk/skins/waeup_student/apply_pume_form.pt
===================================================================
--- WAeUP_SRP/trunk/skins/waeup_student/apply_pume_form.pt	(revision 2098)
+++ WAeUP_SRP/trunk/skins/waeup_student/apply_pume_form.pt	(revision 2098)
@@ -0,0 +1,58 @@
+<tal:block define="rendered_main options/rendered;
+           portal_status_message options/psm;
+           ds options/ds;
+           jamb options/jamb/getContent|nothing;
+           mode options/mode;
+           "
+           >
+  <metal:block define-macro="edit_form">
+    <metal:block use-macro="here/main_template/macros/master">
+      <metal:block fill-slot="main">
+        <h3>Apppply for the Post University Matriculation Examination! </h3>
+        <br />
+        <form action="" id="editForm" method="post" 
+              enctype="multipart/form-data" class="workflow"
+              tal:attributes="action string:${context/absolute_url}/apply_pume"
+              >
+          <input type="hidden" name="reg_no"
+                 tal:attributes="value ds/reg_no|nothing"
+                 tal:condition="ds/reg_no|nothing"/>
+          <div tal:replace="structure rendered_main" />
+          <div class="" tal:condition="python: mode=='edit'">
+          <input type="checkbox" class="standalone" 
+                 name="confirm"
+                 value="" 
+            />
+            I confirm that Passport Photograph uploaded on this form is a true picture of me
+          </div>
+          
+          <input type="submit" class="standalone" 
+                 name="edit"
+                 value="Edit" 
+                 tal:condition="python: mode == 'edit'" />
+          <input type="submit" class="standalone" name="apply"
+                 value="apply for Pume"
+                 tal:condition="python: mode == 'edit'"
+                 />
+          <input type="submit" 
+                 class="standalone" 
+                 name="create"
+                 value="Login for PUME Application"
+                 tal:condition="python: mode == 'create'" 
+                 />
+          </form>
+          <p>Instructions :</p>
+          <ul tal:condition="python: mode in ('create','edit')">
+            <li>Enter your JAMB Registration Number and the Application PIN above.</li> 
+            <li>Upload your passport picture.</li> 
+            <li>Apply for Pume.</li>
+          </ul>
+          <ul tal:condition="python: mode == 'view'">
+            <li>Print the Pume Acknowledgement Slip.</li>
+          </ul>
+      </metal:block>
+      <metal:block fill-slot="sub">
+      </metal:block>
+    </metal:block>
+  </metal:block>
+</tal:block>
Index: WAeUP_SRP/trunk/skins/waeup_student/layout_apply_pume_create.pt
===================================================================
--- WAeUP_SRP/trunk/skins/waeup_student/layout_apply_pume_create.pt	(revision 2098)
+++ WAeUP_SRP/trunk/skins/waeup_student/layout_apply_pume_create.pt	(revision 2098)
@@ -0,0 +1,113 @@
+<tal:block define="global creation python:1;
+                   global formaction string:apply_admission" />
+<!-- a layout_lib macro -->
+<!-- $Id$ -->
+
+<metal:block define-macro="default_edit"
+  tal:define="layout options/layout;
+  ds options/datastructure;
+  dm ds/getDataModel;
+  creation creation|nothing;
+  metadata metadata|nothing;
+  cpsmcat nocall:here/translation_service;
+  apply request/apply_button|nothing;
+  ">
+  <table class="layoutDefault" summary="Form layout"
+         tal:condition="layout/rows">
+    <span tal:repeat="row python: layout['rows']" valign="top" >
+      <span tal:repeat="cell row">
+        <tr tal:define="widget cell/widget;
+              wid widget/getWidgetId;
+              err python:ds.getError(wid);
+              err_mapping python:ds.getErrorMapping(wid);
+              is_required python: widget.is_required and creation and ('create' not in widget.readonly_layout_modes);
+              tooltip_id python:wid + '_help';
+              widget_css_class cell/widget_css_class|nothing;
+              css_class python:test(err, 'row error','row')"
+              tal:condition="python: wid != 'passport'"
+              >
+          <div tal:attributes="class widget_css_class;
+          id python:widget.getHtmlWidgetId()+'_widget';"
+          >
+            <td>
+            <div class="label" tal:condition="widget/label_edit"
+                 tal:attributes="class python:test(is_required, 'label required','label')">
+              <label tal:content="widget/label_edit"
+                     tal:attributes="for cell/widget_input_area_id|nothing;">label</label>:
+            </div>
+            <button type="button" class="tooltipControl"
+                    tal:condition="widget/help"
+                    tal:attributes="onclick python:'toggleElementVisibility(\'%s\')' % tooltip_id;"> ? </button>
+            </td>
+            <td>
+            <span class="field">
+              <div tal:replace="structure cell/widget_rendered"/>
+            </span>
+            <div class="tooltipArea" style="visibility: hidden;"
+                 tal:condition="widget/help"
+                 tal:attributes="id tooltip_id;
+                 onclick python:'showElement(false, \'%s\')' % tooltip_id;"
+                 >
+              <tal:block tal:content="widget/help">This is the help for this field
+              </tal:block>
+            </div>
+            <tal:block condition="err">
+              <tal:block define="msg python:cpsmcat(err, mapping=err_mapping)">
+                <br /><em style="color: red"
+                          tal:content="msg">err</em>
+              </tal:block>
+            </tal:block>
+            </td>
+          </div>
+        </tr>
+      </span>
+    </span>
+    <tr tal:condition="widgets/passport|nothing" 
+        tal:define="cell widgets/passport|nothing;">
+      <tal:block tal:define="widget cell/widget;
+      wid widget/getWidgetId;
+      err python:ds.getError(wid);
+      err_mapping python:ds.getErrorMapping(wid);
+      is_required python: widget.is_required and creation and ('create' not in widget.readonly_layout_modes);
+      tooltip_id python:wid + '_help';
+      widget_css_class widget/widget_css_class|nothing;
+      css_class python:test(err, 'row error','row')"
+      >
+        <div tal:attributes="class widget_css_class;
+        id python:widget.getHtmlWidgetId()+'_widget';"
+        >
+          <td>
+            <div class="label" tal:condition="widget/label_edit"
+                 tal:attributes="class python:test(is_required, 'label required','label')">
+              <label tal:content="widget/label_edit"
+                     tal:attributes="for cell/widget_input_area_id|nothing;">label</label>:
+            </div>
+            <button type="button" class="tooltipControl"
+                    tal:condition="widget/help"
+                    tal:attributes="onclick python:'toggleElementVisibility(\'%s\')' % tooltip_id;"> ? </button>
+          </td>
+          <td>
+            <span class="field">
+              <div tal:replace="structure cell/widget_rendered"/>
+            </span>
+            <div class="tooltipArea" style="visibility: hidden;"
+                 tal:condition="widget/help"
+                 tal:attributes="id tooltip_id;
+                 onclick python:'showElement(false, \'%s\')' % tooltip_id;"
+                 >
+              <tal:block tal:content="widget/help">This is the help for this field
+              </tal:block>
+            </div>
+            <tal:block condition="err">
+              <tal:block define="msg python:cpsmcat(err, mapping=err_mapping)">
+                <br /><em style="color: red"
+                          tal:content="msg">err</em>
+              </tal:block>
+            </tal:block>
+          </td>
+        </div>
+      </tal:block>
+    </tr>
+  </table>
+  <br />
+</metal:block>
Index: WAeUP_SRP/trunk/skins/waeup_student/layout_apply_pume_edit.pt
===================================================================
--- WAeUP_SRP/trunk/skins/waeup_student/layout_apply_pume_edit.pt	(revision 2098)
+++ WAeUP_SRP/trunk/skins/waeup_student/layout_apply_pume_edit.pt	(revision 2098)
@@ -0,0 +1,61 @@
+<metal:block define-macro="default_edit"
+  tal:define="layout options/layout;
+  ds options/datastructure;
+  dm ds/getDataModel;
+  creation creation|nothing;
+  cpsmcat nocall:here/translation_service;
+  proceed options/proceed|nothing;
+  ">
+<table width="100%" cellpadding="2" cellspacing="2" summary="Form layout"
+       tal:condition="layout/rows">
+  <tr tal:repeat="row layout/rows" valign="top">
+    <td tal:repeat="cell row"
+      tal:attributes="colspan cell/ncols">
+      <tal:block define="widget cell/widget;
+                         wid widget/getWidgetId;
+                         err python:ds.getError(wid);
+                         err_mapping python:ds.getErrorMapping(wid);
+                         is_required widget/is_required|nothing;
+                         tooltip_id python:wid + '_help';
+                         widget_css_class cell/widget_css_class|nothing;
+                         css_class python:test(err, 'row error','row')">
+        <div tal:attributes="class widget_css_class;
+                             id python:widget.getHtmlWidgetId()+'_widget';
+                            ">
+          <div class="label" tal:condition="widget/label_edit"
+            tal:attributes="class python:test(is_required, 'label required',
+                                              'label')">
+            <label i18n:translate="" tal:condition="widget/is_i18n"
+              tal:content="widget/label_edit"
+              tal:attributes="for cell/widget_input_area_id|nothing;">label</label>
+            <label tal:condition="not:widget/is_i18n"
+              tal:content="widget/label_edit"
+              tal:attributes="for cell/widget_input_area_id|nothing;">label</label>
+          </div>
+          <button type="button" class="tooltipControl"
+                  tal:condition="widget/help"
+                  tal:attributes="onclick python:'toggleElementVisibility(\'%s\')' % tooltip_id;"> ? </button>
+          <div class="field">
+            <div tal:replace="structure cell/widget_rendered"/>
+          </div>
+          <div class="tooltipArea" style="visibility: hidden;"
+               tal:condition="widget/help"
+               tal:attributes="id tooltip_id;
+                               onclick python:'showElement(false, \'%s\')' % tooltip_id;">
+            <tal:block i18n:translate="" tal:condition="widget/is_i18n"
+              tal:content="widget/help">i18_key-help_for_this_field</tal:block>
+            <tal:block tal:condition="not:widget/is_i18n"
+              tal:content="widget/help">This is the help for this field</tal:block>
+          </div>
+          <tal:block condition="err">
+              <tal:block define="msg python:cpsmcat(err, mapping=err_mapping)">
+                <br /><em style="color: red"
+                  tal:content="msg">err</em>
+              </tal:block>
+          </tal:block>
+        </div>
+      </tal:block>
+    </td>
+  </tr>
+</table>
+                                </metal:block>
Index: WAeUP_SRP/trunk/skins/waeup_student/layout_apply_pume_view.pt
===================================================================
--- WAeUP_SRP/trunk/skins/waeup_student/layout_apply_pume_view.pt	(revision 2098)
+++ WAeUP_SRP/trunk/skins/waeup_student/layout_apply_pume_view.pt	(revision 2098)
@@ -0,0 +1,103 @@
+<metal:block define-macro="default_edit"
+  tal:define="layout options/layout;
+  ds options/datastructure;
+  cpsmcat nocall:here/translation_service;
+  ">
+  <table class="layoutDefault" summary="Form layout"
+         tal:condition="layout/rows">
+    <span tal:repeat="row python: layout['rows']" valign="top" >
+      <span tal:repeat="cell row">
+        <tr tal:define="widget cell/widget;
+              wid widget/getWidgetId;
+              err python:ds.getError(wid);
+              err_mapping python:ds.getErrorMapping(wid);
+              is_required python: widget.is_required;
+              tooltip_id python:wid + '_help';
+              widget_css_class cell/widget_css_class|nothing;
+              css_class python:test(err, 'row error','row')"
+              tal:condition="python: wid != 'passport'"
+              >
+          <div tal:attributes="class widget_css_class;
+          id python:widget.getHtmlWidgetId()+'_widget';"
+          >
+            <td>
+            <div class="label" tal:condition="widget/label_edit"
+                 tal:attributes="class python:test(is_required, 'label required','label')">
+              <label tal:content="widget/label_edit"
+                     tal:attributes="for cell/widget_input_area_id|nothing;">label</label>:
+            </div>
+            <button type="button" class="tooltipControl"
+                    tal:condition="widget/help"
+                    tal:attributes="onclick python:'toggleElementVisibility(\'%s\')' % tooltip_id;"> ? </button>
+            </td>
+            <td>
+            <span class="field">
+              <div tal:replace="structure cell/widget_rendered"/>
+            </span>
+            <div class="tooltipArea" style="visibility: hidden;"
+                 tal:condition="widget/help"
+                 tal:attributes="id tooltip_id;
+                 onclick python:'showElement(false, \'%s\')' % tooltip_id;"
+                 >
+              <tal:block tal:content="widget/help">This is the help for this field
+              </tal:block>
+            </div>
+            <tal:block condition="err">
+              <tal:block define="msg python:cpsmcat(err, mapping=err_mapping)">
+                <br /><em style="color: red"
+                          tal:content="msg">err</em>
+              </tal:block>
+            </tal:block>
+            </td>
+          </div>
+        </tr>
+      </span>
+    </span>
+    <tr tal:condition="widgets/passport|nothing" 
+        tal:define="cell widgets/passport|nothing;">
+      <tal:block tal:define="widget cell/widget;
+      wid widget/getWidgetId;
+      err python:ds.getError(wid);
+      err_mapping python:ds.getErrorMapping(wid);
+      is_required python: widget.is_required and creation and ('create' not in widget.readonly_layout_modes);
+      tooltip_id python:wid + '_help';
+      widget_css_class widget/widget_css_class|nothing;
+      css_class python:test(err, 'row error','row')"
+      >
+        <div tal:attributes="class widget_css_class;
+        id python:widget.getHtmlWidgetId()+'_widget';"
+        >
+          <td>
+            <div class="label" tal:condition="widget/label_edit"
+                 tal:attributes="class python:test(is_required, 'label required','label')">
+              <label tal:content="widget/label_edit"
+                     tal:attributes="for cell/widget_input_area_id|nothing;">label</label>:
+            </div>
+            <button type="button" class="tooltipControl"
+                    tal:condition="widget/help"
+                    tal:attributes="onclick python:'toggleElementVisibility(\'%s\')' % tooltip_id;"> ? </button>
+          </td>
+          <td>
+            <span class="field">
+              <div tal:replace="structure cell/widget_rendered"/>
+            </span>
+            <div class="tooltipArea" style="visibility: hidden;"
+                 tal:condition="widget/help"
+                 tal:attributes="id tooltip_id;
+                 onclick python:'showElement(false, \'%s\')' % tooltip_id;"
+                 >
+              <tal:block tal:content="widget/help">This is the help for this field
+              </tal:block>
+            </div>
+            <tal:block condition="err">
+              <tal:block define="msg python:cpsmcat(err, mapping=err_mapping)">
+                <br /><em style="color: red"
+                          tal:content="msg">err</em>
+              </tal:block>
+            </tal:block>
+          </td>
+        </div>
+      </tal:block>
+    </tr>
+  </table>
+</metal:block>
