1
0
Fork 0
mirror of https://github.com/Yetangitu/ampache synced 2025-10-03 17:59:21 +02:00

Fix dynamic page form submit when form action is javascript

This commit is contained in:
Afterster 2015-06-05 07:28:03 +02:00
parent 5f06a444ed
commit d930718c8f
2 changed files with 19 additions and 17 deletions

View file

@ -92,6 +92,7 @@ $(function() {
var postData = $(this).serializeArray();
var formURL = $(this).attr("action");
if (formURL.indexOf('javascript:') !== 0) {
$.ajax(
{
url : formURL,
@ -110,6 +111,7 @@ $(function() {
e.preventDefault();
}
}
});
$(window).bind('hashchange', function(){

View file

@ -30,7 +30,7 @@ if (!Core::is_session_started()) {
<h4><?php echo T_('Filters'); ?></h4>
<div class="sb3">
<?php if (in_array('starts_with',$allowed_filters)) { ?>
<form id="multi_alpha_filter_form" method="post" action="javascript:void(0);">
<form id="multi_alpha_filter_form" action="javascript:void(0);">
<label id="multi_alpha_filterLabel" for="multi_alpha_filter"><?php echo T_('Starts With'); ?></label>
<input type="text" id="multi_alpha_filter" name="multi_alpha_filter" value="<?php $browse->set_catalog($_SESSION['catalog']); echo scrub_out($browse->get_filter('starts_with'));?>" onKeyUp="delayRun(this, '400', 'ajaxState', '<?php echo Ajax::url('?page=browse&action=browse&browse_id=' . $browse->id . '&key=starts_with'); ?>', 'multi_alpha_filter');">
</form>