Changeset 740 for trunk/grails-app/views
- Timestamp:
- Jul 28, 2010, 2:37:09 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/grails-app/views/importer/index_simple.gsp
r732 r740 10 10 <meta name="layout" content="main"/> 11 11 <title>Importer wizard (simple)</title> 12 <link rel="stylesheet" href="${resource(dir: 'css', file: 'importer.css')}"/> 12 13 13 14 <g:javascript library="jquery" plugin="jquery"/> … … 53 54 } 54 55 } 56 57 $(document).ready(function() { 58 59 $('#simplewizardform').submit(function() { 60 if ($('#file').val() == "") { 61 alert ("Please choose your Excel file to import."); 62 return false 63 } else 64 if ($('#entity').val() == "") { 65 $('#datatemplate').addClass("validationfail"); 66 return false 67 } else 68 $('#simplewizardform').submit(); 69 70 return false; 71 }); 72 }); 73 55 74 </g:javascript> 56 75 </head> … … 58 77 <h1>Importer wizard (simple)</h1> 59 78 <p>You can import your Excel data to the server by choosing a file from your local harddisk in the form below.</p> 60 < g:formcontroller="importer" method="post" action="upload_simple" enctype="multipart/form-data">79 <form id="simplewizardform" controller="importer" method="post" action="upload_simple" enctype="multipart/form-data"> 61 80 <table border="0"> 62 81 <tr> … … 65 84 </td> 66 85 <td width="100px"> 67 <input type="file" name="importfile"/>86 <input id="file" type="file" name="importfile"/> 68 87 </td> 69 88 </tr> … … 107 126 <g:select 108 127 name="entity" 128 id="entity" 109 129 from="${entities}" 110 130 optionValue="${{it.value.name}}" … … 119 139 <tr> 120 140 <td> 121 Choose type of data template:141 <div id="datatemplate">Choose type of data template:</div> 122 142 </td> 123 143 <td> … … 133 153 </tr> 134 154 </table> 135 </ g:form>155 </form> 136 156 137 157 </body>
Note: See TracChangeset
for help on using the changeset viewer.