Small addition for giving forms unique IDs. Mainly so that javascript has

something to hook onto.
This commit is contained in:
green-ponies (jgen) 2011-08-12 21:56:48 -04:00
parent 6c3e91e01c
commit 3a4aea45d5
2 changed files with 4 additions and 3 deletions

View File

@ -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'";
}

View File

@ -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')."
<input type='hidden' name='image_id' value='$i_image_id'>
<input type='submit' value='Delete'>
</form>