File tree Expand file tree Collapse file tree
ietf/secr/templates/proceedings Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -83,7 +83,7 @@ <h2>Slides <span class="highlight">NEW! Drag and drop to re-order sl
8383
8484 < div class ="inline-related ">
8585 < h2 > Upload Materials</ h2 >
86- < form enctype ="multipart/form-data " action =". " method ="post ">
86+ < form id =" upload_materials_form " enctype ="multipart/form-data " action =". " method ="post ">
8787 < table class ="center " id ="proceedings-upload-table ">
8888 {{ form.as_table }}
8989 </ table >
Original file line number Diff line number Diff line change @@ -211,4 +211,15 @@ $(document).ready(function() {
211211 init_proceedings_upload ( ) ;
212212 }
213213
214+ // validate form upload form before uploading file
215+ if ( $ ( '#upload_materials_form' ) . length ) {
216+ $ ( '#upload_materials_form' ) . submit ( function ( ) {
217+ var x = $ ( '#id_slide_name' ) . val ( ) ;
218+ if ( x == null || x == "" )
219+ {
220+ $ ( '#id_slide_name' ) . before ( '<ul class="errorlist"><li>This field is required.</li></ul>' ) ;
221+ return false ;
222+ }
223+ } ) ;
224+ }
214225} ) ;
You can’t perform that action at this time.
0 commit comments