summaryrefslogtreecommitdiff
path: root/tests/FunctionalTests/tickets/protected/pages/Ticket722.php
blob: 71bf2841966e9d3b0a5cf1f054ccbb8957347d33 (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
<?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");
	}
}