This repository has been archived on 2024-09-05. You can view files and clone it, but cannot push or open issues or pull requests.
shimmie2/ext/image/theme.php

30 lines
755 B
PHP
Raw Normal View History

<?php
class ImageIOTheme extends Themelet {
/**
* Display a link to delete an image
* (Added inline Javascript to confirm the deletion)
*/
2019-05-28 16:31:20 +00:00
public function get_deleter_html(int $image_id): string {
$html = "
".make_form(make_link("image/delete"))."
<input type='hidden' name='image_id' value='$image_id' />
<input type='submit' value='Delete' onclick='return confirm(\"Delete the image?\");' />
</form>
";
2011-09-03 20:45:56 +00:00
return $html;
}
2014-04-25 02:29:29 +00:00
/**
* Display link to replace the image
*/
2019-05-28 16:31:20 +00:00
public function get_replace_html(int $image_id): string {
$html = make_form(make_link("image/replace"))."
<input type='hidden' name='image_id' value='$image_id' />
<input type='submit' value='Replace' />
</form>";
return $html;
}
}