summaryrefslogtreecommitdiff
path: root/tests/FunctionalTests/features/protected/pages/ActiveControls/VisibleUpdate.php
blob: e01e1c0a11a91efc3b8223134c0c16dee219158f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<?php
/*
 * Created on 13/05/2006
 */

class VisibleUpdate extends TPage
{ 
	function click1($sender)
	{
		$this->label1->setText($this->getButtonState($sender));
		
		//$this->button1->setEnabled(false);
		$this->button1->setVisible(false);
	//	$this->button2->setEnabled(true);	
		$this->button2->setVisible(true);	
	}

	function click2($sender)
	{
		$this->label1->setText($this->getButtonState($sender));

	//	$this->button1->setEnabled(true);
		$this->button1->setVisible(true);
	///	$this->button2->setEnabled(false);	
		$this->button2->setVisible(false);
	}
	
	protected function getButtonState($button)
	{
		return "Before you clicked on ".$button->Text.
			", Button 1 was ".($this->button1->Enabled ? 'enabled' : 'disabled').
			" and Button 2 was ".($this->button2->Enabled ? 'enabled' : 'disabled');
	}
}