File tree Expand file tree Collapse file tree
pygeoapi/templates/collections/items Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -52,7 +52,7 @@ <h1>{% for l in data['links'] if l.rel == 'collection' %} {{ l['title'] }} {% en
5252 < div class ="col-sm-12 ">
5353 < input class ="form-check-input " onchange ="checkSpatialFilter() " type ="checkbox " id ="spatial_filter_check ">
5454 < label class ="form-check-label " for ="spatial_filter_check "> Spatial filter</ label >
55- < button type ="button " class ="btn btn-primary " onclick ="submitForm(); "> Search</ button >
55+ < button type ="submit " class ="btn btn-primary " onclick ="submitForm(); "> Search</ button >
5656 < button type ="reset " class ="btn btn-secondary " onclick ="document.getElementById('searchForm').reset(); "> Reset</ button >
5757 </ div >
5858 </ div >
@@ -192,6 +192,7 @@ <h1>{% for l in data['links'] if l.rel == 'collection' %} {{ l['title'] }} {% en
192192
193193 document . getElementById ( "q" ) . addEventListener ( "keydown" , function ( event ) {
194194 if ( event . key === "Enter" ) {
195+ event . preventDefault ( ) ;
195196 submitForm ( ) ;
196197 }
197198 } ) ;
@@ -288,6 +289,9 @@ <h1>{% for l in data['links'] if l.rel == 'collection' %} {{ l['title'] }} {% en
288289 setRectangle ( map . getBounds ( ) . pad ( - 0.95 ) ) ;
289290 }
290291 }
292+
293+ var form = document . getElementById ( "searchForm" ) ;
294+ form . addEventListener ( "submit" , submitForm ) ;
291295 { % endif % }
292296 </ script >
293297{% endif %}
You can’t perform that action at this time.
0 commit comments