diff --git a/core/util.inc.php b/core/util.inc.php index 358dbeb0..7b51be91 100644 --- a/core/util.inc.php +++ b/core/util.inc.php @@ -218,13 +218,14 @@ function make_http($link) { /** * Make a form tag with relevant auth token and stuff + * (Added optional Form ID field for helping jquery.) * * @retval string */ -function make_form($target, $method="POST", $multipart=False) { +function make_form($target, $method="POST", $multipart=False, $form_id="") { global $user; $auth = $user->get_auth_html(); - $extra = ""; + $extra = empty($form_id) ? '' : " id='$form_id'"; if($multipart) { $extra .= " enctype='multipart/form-data'"; } diff --git a/ext/image/theme.php b/ext/image/theme.php index e1554af4..c42ff5c5 100644 --- a/ext/image/theme.php +++ b/ext/image/theme.php @@ -10,7 +10,7 @@ class ImageIOTheme { $i_image_id = int_escape($image_id); $html = " - ".make_form(make_link("image_admin/delete"))." + ".make_form(make_link("image_admin/delete"),'POST',false,'delete_image')."