Changeset 13920


Ignore:
Timestamp:
13 Jun 2016, 00:25:45 (8 years ago)
Author:
uli
Message:

Add file upload part in edit_scores page.

Looks like it is essential to also set a proper enctype
explicitly. Otherwise uploaded files are not sent, at least in tests.

The file input section was copied verbatim from datacenter upload
templates and might be improvable.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/branches/uli-scores-upload/src/waeup/kofa/students/browser_templates/editscorespage.pt

    r13896 r13920  
    1 <form  i18n:domain="waeup.kofa"  method="POST">
     1<form  i18n:domain="waeup.kofa"  method="POST" enctype="multipart/form-data">
    22  <br />
    33
     
    1515    </thead>
    1616    <tbody>
    17         <tr tal:repeat="ticket view/tickets">
     17      <tr tal:repeat="ticket view/tickets">
    1818      <td tal:content="ticket/student/matric_number">MATRIC_NUMBER</td>
    1919      <td tal:content="ticket/student/student_id">STUDENT ID</td>
     
    3232          tal:content="ticket/score">SCORE</td>
    3333        </tr>
     34
     35      <tr>
     36        <td i18n:translate="">
     37          Set scores from CSV file:
     38        </td>
     39        <td>
     40          <div class="input-group half">
     41            <div class="input-group-btn">
     42              <div class="btn btn-default btn-file">
     43                Select&hellip;
     44                <input type="file" name="uploadfile:file" />
     45              </div>
     46            </div>
     47            <input type="text" class="form-control" readonly />
     48          </div>
     49        </td>
     50      </tr>
     51
    3452    </tbody>
    3553  </table>
Note: See TracChangeset for help on using the changeset viewer.