Use chickpea listen_form function in map_form.html

This commit is contained in:
Yohan Boniface 2012-11-26 11:42:03 +01:00
parent 4d4989a775
commit a92eafe9ac

View file

@ -16,18 +16,5 @@
</form> </form>
<script type="text/javascript"> <script type="text/javascript">
$("#map_edit").on("submit", function (e) { L.Util.Xhr.listen_form('map_edit');
e.preventDefault();
L.Util.Xhr.submit_form("map_edit", {
'callback': function (data) {
if (data.redirect) {
window.location = data.redirect;
}
else {
$("#map_edit").parent().empty().append(data.html);
}
},
'dataType': 'json'
});
});
</script> </script>