summaryrefslogtreecommitdiff
path: root/tests/FunctionalTests/tickets/protected/pages/Ticket603.php
blob: 138ffbd4bf9edf8ce5c16a915589f6c7a61e9ee8 (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 Ticket603 extends TPage
{
	protected $_isHtml;

	public function onLoad($param) {
		parent::onLoad($param);
		$this->_isHtml = true;
	}

	public function switchContentTypeClicked( $sender, $param ) {
		$this->_isHtml = !$this->_isHtml;
		if ( $this->_isHtml ) {
			$this->EditHtmlTextBox->EnableVisualEdit = true;
			$this->EditHtmlTextBox->Text = '<b>somehtml</b>';
		} else {
			$this->EditHtmlTextBox->EnableVisualEdit = false;
			$this->EditHtmlTextBox->Text = 'plai bla bla';
		}
	}

	public function switchContentTypeCallback( $sender, $param ) {
		$this->ContentPanel->render( $param->NewWriter );
	}
}

?>