Index: WAeUP_SRP/trunk/skins/waeup_default/layout_row_edit.pt
===================================================================
--- WAeUP_SRP/trunk/skins/waeup_default/layout_row_edit.pt	(revision 295)
+++ WAeUP_SRP/trunk/skins/waeup_default/layout_row_edit.pt	(revision 295)
@@ -0,0 +1,187 @@
+<tal:block define="global creation python:1" />
+<metal:block define-macro="default_edit"
+             tal:define="layout options/layout;
+             ds options/datastructure;
+             creation creation|nothing;
+             metadata metadata|nothing;
+             type_name request/type_name|nothing;
+             ti python:type_name and getattr(here.portal_types,type_name,None) or getattr(here.portal_types,here.portal_type,None);
+             creation_form python:ti and ti.getActionById('create', 'cpsdocument_create_form') or 'cpsdocument_create_form' ;
+             edit_form     python:ti and ti.getActionById('edit',   'cpsdocument_edit_form') or  'cpsdocument_edit_form';
+             metadata_form python:ti and ti.getActionById('metadata', 'cpsdocument_metadata') or 'cpsdocument_metadata';
+             formaction options/formaction;
+             first_layout options/first_layout|python:0;
+             last_layout options/last_layout|python:0;
+             is_flexible options/is_flexible;
+             cpsmcat nocall:here/translation_service;
+             results options/items;
+             "
+             >
+  <span tal:content="structure layout" tal:condition="python: 0" />
+  <form tal:condition="python: 1" action='tobereplaced' method='post' tal:attributes="action formaction"
+        enctype='multipart/form-data' class='workflow'>
+    <div class=''>
+      <div class='documentFields'>
+        <table width="100%" cellpadding="2" cellspacing="2" summary="Form layout">
+          <tr tal:repeat="item results" valign="top">
+            <td>
+        <table width="100%" cellpadding="2" cellspacing="2" summary="Form layout">
+          <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;
+              dm options/datastructure/getDataModel;
+              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;
+              widget_css_class python:test(is_flexible, 'group', widget_css_class);
+              css_class python:test(err, 'row error',
+              test(is_flexible, 'group', '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>
+            </td>
+          </tr>
+      <tr>
+        <td align="left" colspan="3">
+          <input class="standalone" type="submit" name="change" value=" Change " />
+          <input class="standalone" type="submit" name="delete" value=" Delete " />
+        </td>
+      </tr>
+        </table>
+    <table cellspacing="0" cellpadding="2" border="0" width="100%" tal:condition="nothing">
+      <tr>
+        <td align="left" valign="top">
+          &nbsp;
+        </td>
+        <td align="left" valign="top">
+          <div class="label">Type</div>
+        </td>
+        <td align="left" valign="top">
+          <div class="label">Subject</div>
+        </td>
+        <td align="left" valign="top">
+          <div class="label">Result</div>
+        </td>
+      </tr>
+      <span tal:repeat="row results" tal:condition="python: 0" tal:omit-tag="">
+        <tr tal:define="rindex repeat/row/index">
+          <td align="left" valign="top">
+            <input type="checkbox" name="keys:list" value="100" tal:attributes="value string:${repeat/row/index}"/>
+          </td>
+          <td align="left" valign="top">
+            <div class="field">
+              <input type="text" name="key_0" value="100" size="20" 
+                     tal:attributes="name string:type_${rindex};value python:row[0]" />
+            </div>
+          </td>
+          <td align="left">
+            <div class="field">
+              <input type="text" name="label_0" value="Year 1 (100 Level)" size="40" 
+                     tal:attributes="name string:subject_${rindex};value python:row[1]" />
+            </div>
+          </td>
+          <td align="left">
+            <div class="field">
+              <input type="text" name="msgid_0" value="" size="10" 
+                     tal:attributes="name string:result_${rindex};value python:row[2]" />
+            </div>
+          </td>
+        </tr>
+      </span>
+      <tr>
+        <td align="left" colspan="3">
+          <input class="standalone" type="submit" name="change" value=" Change " />
+          <input class="standalone" type="submit" name="delete" value=" Delete " />
+        </td>
+      </tr>
+    </table>
+    <table tal:condition="python:0" cellspacing="0" cellpadding="2" border="0" width="100%">
+      <tr>
+        <td align="left" valign="top" colspan="2">
+          <div>Add a new post-primary school result:</div>
+        </td>
+      </tr>
+      <tr>
+        <td align="left" valign="top">
+          &nbsp;
+        </td>
+        <td align="left" valign="top">
+          <div class="label">Type</div>
+        </td>
+        <td align="left" valign="top">
+          <div class="label">Subject</div>
+        </td>
+        <td align="left" valign="top">
+          <div class="label">Result</div>
+        </td>
+      </tr>
+      <tr>
+        <td align="left" valign="top">
+          &nbsp;
+        </td>
+        <td align="left" valign="top">
+          <div  class="field">
+            <input type="text" name="type" value="" size="20" /> 
+          </div>
+        </td>
+        <td align="left">
+          <div  class="field">
+            <input type="text" name="subject" value="" size="40" />
+          </div>
+        </td>
+        <td align="left">
+          <div  class="field">
+            <input type="text" name="result" value="" size="10" />
+          </div>
+        </td>
+      </tr>
+      <tr>
+        <td align="left" colspan="3">
+          <input class="standalone" type="submit" name="add" value=" Change/Add " />
+        </td>
+      </tr>
+    </table>
+  </form>
+</metal:block>
+  
