jquery deletion was deleting the wrong image if there were multiple delete buttons on one page (eg, on the report image page); also it stands out awkwardly being the only bit of jquery UI on the site. Moving to jquery UI across the site might happen later, but for now I just want to get a release out...
		
			
				
	
	
		
			36 lines
		
	
	
		
			855 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			36 lines
		
	
	
		
			855 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
| <?php
 | |
| class ImageIOTheme {
 | |
| 	/**
 | |
| 	 * Display a link to delete an image
 | |
| 	 * (Added inline Javascript to confirm the deletion)
 | |
| 	 *
 | |
| 	 * @param $image_id The image to delete
 | |
| 	 */
 | |
| 	public function get_deleter_html(/*int*/ $image_id) {
 | |
| 		global $config;
 | |
| 
 | |
| 		$html = "
 | |
| 			".make_form(make_link("image_admin/delete"))."
 | |
| 				<input type='hidden' name='image_id' value='$image_id' />
 | |
| 				<input type='submit' value='Delete' onclick='return confirm(\"Delete the image?\");' />
 | |
| 			</form>
 | |
| 		";
 | |
| 		
 | |
| 		return $html;
 | |
| 	}
 | |
| 	
 | |
| 	/**
 | |
| 	 * Display link to replace the image
 | |
| 	 *
 | |
| 	 * @param $image_id The image to replace
 | |
| 	 */
 | |
| 	public function get_replace_html(/*int*/ $image_id) {
 | |
| 		$html = make_form(make_link("image_admin/replace"))."
 | |
| 					<input type='hidden' name='image_id' value='$image_id' />
 | |
| 					<input type='submit' value='Replace' />
 | |
| 				</form>";
 | |
| 		return $html;
 | |
| 	}
 | |
| }
 | |
| ?>
 |