summaryrefslogtreecommitdiff
path: root/tests/FunctionalTests/tickets/protected/pages/Ticket722.php
blob: 91759fb059565ef66fc2f36b2b11d14b14264539 (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
<?php

prado::using ('System.Web.UI.ActiveControls.*');

class Ticket722 extends TPage
{
	public function changeState ($sender, $param)
	{
		$state=$this->InPlaceTextBox->getReadOnly();
		$this->InPlaceTextBox->setReadOnly(!$state);
		$sender->setText($state?"Change to Read Only":"Change to Editable");
		$this->InPlaceTextBox->setText($state?$this->getText():$this->getText().' [Read Only]');
	}
	
	public function onTextChanged ($sender, $param)
	{
		$this->setText($sender->getText());
	}
	
	public function setText ($value)
	{
		$this->setViewState('text', $value, "Editable Text");
	}
	
	public function getText ()
	{
		return $this->getViewState('text', "Editable Text");
	}
}
?>