forked from Public/pics
		
	The ConfirmDelete page now uses parts of the photopage. The Confirmation dialog is its own template which is based on Alert. The database now updates the album thumb to the most recent addition to the album, when the album thumb asset is being deleted. When there are no pictures left in the album 0 will be set.
		
			
				
	
	
		
			30 lines
		
	
	
		
			664 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			30 lines
		
	
	
		
			664 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
<?php
 | 
						|
/*****************************************************************************
 | 
						|
 * WarningDialog.php
 | 
						|
 * Defines the WarningDialog template.
 | 
						|
 *
 | 
						|
 * Kabuki CMS (C) 2013-2015, Aaron van Geffen
 | 
						|
 *****************************************************************************/
 | 
						|
 | 
						|
class WarningDialog extends Alert
 | 
						|
{
 | 
						|
	protected $buttons;
 | 
						|
 | 
						|
	public function __construct($title = '', $message = '', $buttons = [])
 | 
						|
	{
 | 
						|
		parent::__construct($title, $message);
 | 
						|
		$this->buttons = $buttons;
 | 
						|
	}
 | 
						|
 | 
						|
	protected function additional_alert_content()
 | 
						|
	{
 | 
						|
		$this->addButtons();
 | 
						|
	}
 | 
						|
 | 
						|
	private function addButtons()
 | 
						|
	{
 | 
						|
		foreach ($this->buttons as $button)
 | 
						|
			$button->html_content();
 | 
						|
	}
 | 
						|
}
 |