[29855] | 1 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
---|
| 2 | <%
|
---|
| 3 | String inputOptionsDisplay;
|
---|
| 4 | String inputOptionsVisibility;
|
---|
| 5 | String hiddenInputOptions;
|
---|
| 6 | if (request.getAttribute("options") != null && request.getAttribute("options").equals("true")) {
|
---|
| 7 | inputOptionsDisplay = "block";
|
---|
| 8 | inputOptionsVisibility = "visible";
|
---|
| 9 | hiddenInputOptions = "true";
|
---|
| 10 | } else {
|
---|
| 11 | inputOptionsDisplay = "none";
|
---|
| 12 | inputOptionsVisibility = "hidden";
|
---|
| 13 | hiddenInputOptions = "false";
|
---|
| 14 | }
|
---|
| 15 | String checkPreserveMacrons;
|
---|
| 16 | if (request.getAttribute("preserveMacrons") != null && !request.getAttribute("preserveMacrons").equals("true")) {
|
---|
| 17 | checkPreserveMacrons = "";
|
---|
| 18 | } else {
|
---|
| 19 | checkPreserveMacrons = "checked";
|
---|
| 20 | }
|
---|
| 21 | %>
|
---|
| 22 |
|
---|
| 23 | <html>
|
---|
| 24 | <head>
|
---|
| 25 | <%@page contentType="text/html" pageEncoding="UTF-8"%>
|
---|
| 26 | <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
---|
| 27 | <title>The MÄori Macron Restoration Service</title>
|
---|
| 28 | <link href="../../css/css.css" rel="stylesheet" type="text/css" />
|
---|
| 29 | <script src="../../js/js.js" type="text/javascript"></script>
|
---|
| 30 |
|
---|
| 31 | <style type="text/css">
|
---|
| 32 | <% if (request.getAttribute("file") != null) {%>
|
---|
| 33 | fieldset#download-file, li#download-tab {
|
---|
| 34 | display: block;
|
---|
| 35 | visibility: visible;
|
---|
| 36 | }
|
---|
| 37 | fieldset#restore-by-input, fieldset#restore-by-upload {
|
---|
| 38 | display: none;
|
---|
| 39 | visibility: hidden;
|
---|
| 40 | }
|
---|
| 41 | <% } else {%>
|
---|
| 42 | fieldset#restore-by-input {
|
---|
| 43 | display: block;
|
---|
| 44 | visibility: visible;
|
---|
| 45 | }
|
---|
| 46 | fieldset#restore-by-upload, fieldset#download-file, li#download-tab {
|
---|
| 47 | display: none;
|
---|
| 48 | visibility: hidden;
|
---|
| 49 | }
|
---|
| 50 | <% }%>
|
---|
| 51 |
|
---|
| 52 |
|
---|
| 53 |
|
---|
| 54 |
|
---|
| 55 | </style>
|
---|
| 56 |
|
---|
| 57 | </head>
|
---|
| 58 |
|
---|
| 59 | <body>
|
---|
| 60 | <jsp:include page="header.jsp" />
|
---|
| 61 |
|
---|
| 62 | <div id="content">
|
---|
| 63 | <ul id="tabset_tabs">
|
---|
| 64 | <%
|
---|
| 65 | String inputTabClass, uploadTabClass, downloadTabClass;
|
---|
| 66 | inputTabClass = uploadTabClass = downloadTabClass = "";
|
---|
| 67 | if (request.getAttribute("file") != null) {
|
---|
| 68 | downloadTabClass = "selected";
|
---|
| 69 | } else {
|
---|
| 70 | inputTabClass = "selected";
|
---|
| 71 | }
|
---|
| 72 | %>
|
---|
| 73 | <li id="input-tab" class="<%=inputTabClass%>"> <a href="javascript:toggleTabs('restore-by-input');"> <span>TÄpiri TohutÅ i te</span> TÄurunga</a> </li>
|
---|
| 74 | <li id="upload-tab" class="<%=uploadTabClass%>"> <a href="javascript:toggleTabs('restore-by-upload');"> <span>TÄpiri TohutÅ i te</span> KÅnae Tuku Atu</a> </li>
|
---|
| 75 | <li id="download-tab" class="<%=downloadTabClass%>"> <a href="javascript:void()"> <span>Whakaora ki te</span> KÅnae Tukuake</a> </li>
|
---|
| 76 | </ul>
|
---|
| 77 |
|
---|
| 78 | <div id="fields">
|
---|
| 79 | <fieldset id="restore-by-input">
|
---|
| 80 | <legend class="tabset_label">TÄpiri TohutÅ i te TÄurunga</legend>
|
---|
| 81 | <form action="../servlet/DirectInput" method="post" >
|
---|
| 82 | <p class="instructions">Tuhia ngÄ kÅrero</p>
|
---|
| 83 | <textarea name="fragment" cols="80" rows="18" id="fragment"><%= request.getAttribute("fragment") != null ? request.getAttribute("fragment") : ""%></textarea>
|
---|
| 84 | <fieldset>
|
---|
| 85 | <legend class="more-options">
|
---|
| 86 | <a href="javascript:toggleOptions();">
|
---|
| 87 | <img id="input-more-options-icon" src="../../images/arrow-closed.png" alt="Advanced Options Icon"></img>
|
---|
| 88 | NgÄ KÅwhiringa ArÄ Atu AnÅ
|
---|
| 89 | </a>
|
---|
| 90 | </legend>
|
---|
| 91 | <div id="input-options" class="options" style="display: <%=inputOptionsDisplay%>; visibility: <%=inputOptionsVisibility%>;">
|
---|
| 92 | <table>
|
---|
| 93 | <tr>
|
---|
| 94 | <td>
|
---|
| 95 | <input name="preserveExistingMacrons" type="checkbox" value="true" <%=checkPreserveMacrons%>></input>
|
---|
| 96 | <label>Pupuritia ngÄ tohutÅ tÄ«ariari</label>
|
---|
| 97 | </td>
|
---|
| 98 | </tr>
|
---|
| 99 | </table>
|
---|
| 100 | </div>
|
---|
| 101 | </fieldset>
|
---|
| 102 | <input type="hidden" name="lang" value="mi" />
|
---|
| 103 | <input id="hidden-input-options" type="hidden" name="options" value="<%= hiddenInputOptions%>" />
|
---|
| 104 | <p class="submit_button">
|
---|
| 105 | <input title="Submit to add macrons" type="submit" value="TÄpiri TohutÅ" />
|
---|
| 106 | </p>
|
---|
| 107 | </form>
|
---|
| 108 | </fieldset>
|
---|
| 109 |
|
---|
| 110 | <fieldset id="restore-by-upload">
|
---|
| 111 | <legend class="tabset_label">TÄpiri tohutÅ i te kÅnae tuku atu</legend>
|
---|
| 112 | <form action="../servlet/FileUpload" method="post" enctype="multipart/form-data">
|
---|
| 113 | <p class="instructions">KÅwhiritia tÄtehi kÅnae hei tukuake</p>
|
---|
| 114 | <p>
|
---|
| 115 | <label>KÅnae:</label>
|
---|
| 116 | <input type="file" id="uploaded_file" name="file" />
|
---|
| 117 | </p>
|
---|
| 118 | <fieldset>
|
---|
| 119 | <legend class="more-options">
|
---|
| 120 | <a href="javascript:toggleOptions();">
|
---|
| 121 | <img id="upload-more-options-icon" src="../../images/arrow-closed.png" alt="Advanced Options Icon"></img>
|
---|
| 122 | NgÄ KÅwhiringa ArÄ Atu AnÅ
|
---|
| 123 | </a>
|
---|
| 124 | </legend>
|
---|
| 125 | <div id="upload-options" class="options" style="display: <%=inputOptionsDisplay%>; visibility: <%=inputOptionsVisibility%>;">
|
---|
| 126 | <table>
|
---|
| 127 | <tr>
|
---|
| 128 | <th><label>Whakawaehere PÅ«Ähua:</label></th>
|
---|
| 129 | <td><select id="upload-charset" name="charsetEncoding">
|
---|
| 130 | <option value="(detect automatically)" selected="selected">(kimi aunoa)</option>
|
---|
| 131 | <option value="utf-8">utf-8 (Unicode)</option>
|
---|
| 132 | <option value="utf-16">utf-16 (Unicode)</option>
|
---|
| 133 | </select></td>
|
---|
| 134 | </tr>
|
---|
| 135 | <tr>
|
---|
| 136 | <th><label>Momo Tuhinga:</label></th>
|
---|
| 137 | <td><select id="upload-doctype" name="fileType">
|
---|
| 138 | <option value="(detect automatically)" selected="selected">(kimi aunoa)</option>
|
---|
| 139 | <option value=".docx">Microsoft Office Word 2007 (.docx)</option>
|
---|
| 140 | <option value=".odt">Open Office Word (.odt)</option>
|
---|
| 141 | <option value=".txt">Text (.txt)</option>
|
---|
| 142 | </select></td>
|
---|
| 143 | </tr>
|
---|
| 144 | <tr>
|
---|
| 145 | <td>
|
---|
| 146 | <input name="preserveExistingMacrons" type="checkbox" value="true" <%=checkPreserveMacrons%>></input>
|
---|
| 147 | <label>Pupuritia ngÄ tohutÅ tÄ«ariari</label>
|
---|
| 148 | </td>
|
---|
| 149 | </tr>
|
---|
| 150 | </table>
|
---|
| 151 | </div>
|
---|
| 152 | </fieldset>
|
---|
| 153 | <input type="hidden" name="lang" value="mi" />
|
---|
| 154 | <input id="hidden-upload-options" type="hidden" name="options" value="<%= hiddenInputOptions%>" />
|
---|
| 155 | <p class="submit_button">
|
---|
| 156 | <input title="Submit to add macrons" type="submit" value="Tiki KÅnae" />
|
---|
| 157 | </p>
|
---|
| 158 | <p class="notes">Hei whakamÅhio: E Ähei ana ngÄ tuhinga Microsoft Word 2007, ngÄ tuhinga Open Office Text me ngÄ tuhinga kuputuhi hoki.</p>
|
---|
| 159 | </form>
|
---|
| 160 | </fieldset>
|
---|
| 161 |
|
---|
| 162 | <fieldset id="download-file">
|
---|
| 163 | <legend class="tabset_label">Whakaora ki te KÅnae Tukuake</legend>
|
---|
| 164 | <form action="../servlet/Download" method="post" >
|
---|
| 165 | <p class="instructions">TÄputa:</p>
|
---|
| 166 | <div id="options" class="options">
|
---|
| 167 | <table>
|
---|
| 168 | <tr>
|
---|
| 169 | <th><label>KÅnae:</label></th>
|
---|
| 170 | <td><label><%= request.getAttribute("filename")%></label></td>
|
---|
| 171 | </tr>
|
---|
| 172 | <tr>
|
---|
| 173 | <th><label>Whakawaehere PÅ«Ähua:</label></th>
|
---|
| 174 | <td><label><%= request.getAttribute("charsetEncoding")%></label></td>
|
---|
| 175 | </tr>
|
---|
| 176 | <tr>
|
---|
| 177 | <th><label>Momo Tuhinga:</label></th>
|
---|
| 178 | <td><label><%= request.getAttribute("fileType")%></label></td>
|
---|
| 179 | </tr>
|
---|
| 180 | </table>
|
---|
| 181 | </div>
|
---|
| 182 | <%
|
---|
| 183 | String downloadFilePath = request.getAttribute("file") != null ? ((java.io.File) request.getAttribute("file")).getAbsolutePath() : null;
|
---|
| 184 | %>
|
---|
| 185 | <input type="hidden" id="filepath" name="filepath" value="<%=downloadFilePath%>" />
|
---|
| 186 | <input type="hidden" id="filename" name="filename" value="<%= request.getAttribute("filename")%>" />
|
---|
| 187 | <p class="submit_button">
|
---|
| 188 | <input title="Download File" type="submit" value="Tikiake KÅnae" />
|
---|
| 189 | </p>
|
---|
| 190 | </form>
|
---|
| 191 | </fieldset>
|
---|
| 192 | </div>
|
---|
| 193 | </div>
|
---|
| 194 |
|
---|
| 195 | <jsp:include page="footer.jsp" />
|
---|
| 196 | </body>
|
---|
| 197 | </html>
|
---|