Small addition for giving forms unique IDs. Mainly so that javascript has
something to hook onto.
This commit is contained in:
parent
6c3e91e01c
commit
3a4aea45d5
@ -218,13 +218,14 @@ function make_http($link) {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Make a form tag with relevant auth token and stuff
|
* Make a form tag with relevant auth token and stuff
|
||||||
|
* (Added optional Form ID field for helping jquery.)
|
||||||
*
|
*
|
||||||
* @retval string
|
* @retval string
|
||||||
*/
|
*/
|
||||||
function make_form($target, $method="POST", $multipart=False) {
|
function make_form($target, $method="POST", $multipart=False, $form_id="") {
|
||||||
global $user;
|
global $user;
|
||||||
$auth = $user->get_auth_html();
|
$auth = $user->get_auth_html();
|
||||||
$extra = "";
|
$extra = empty($form_id) ? '' : " id='$form_id'";
|
||||||
if($multipart) {
|
if($multipart) {
|
||||||
$extra .= " enctype='multipart/form-data'";
|
$extra .= " enctype='multipart/form-data'";
|
||||||
}
|
}
|
||||||
|
@ -10,7 +10,7 @@ class ImageIOTheme {
|
|||||||
|
|
||||||
$i_image_id = int_escape($image_id);
|
$i_image_id = int_escape($image_id);
|
||||||
$html = "
|
$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='hidden' name='image_id' value='$i_image_id'>
|
||||||
<input type='submit' value='Delete'>
|
<input type='submit' value='Delete'>
|
||||||
</form>
|
</form>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user