summaryrefslogtreecommitdiff
path: root/tests/FunctionalTests/active-controls/protected/pages/CustomValidatorByPass.php
blob: e88f10deb9f9a60ec915ad5b9057c3744761f9a2 (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
35
36
37
<?php

class CustomValidatorByPass extends TPage
{
	public function onLoad($param)
	{

		parent::onLoad($param);

		$Client = $this->validator2->getActiveControl()->getClientSide();

		$Client->setOnLoading('$(\'loginLoader\').show();');
		$Client->setOnComplete('$(\'loginLoader\').hide();');

		//$Client->setOnValidationError('alert(\'Authentication Failed\');');
		$Client->setOnValidationSuccess('new Effect.Fade(\'loginBox\')');

	}

	public function validateUser($sender,$param)
	{
		$param->IsValid = $this->Password->Text=='test';
	}

	public function doLogin($sender,$param)
	{

		/* This isnt even getting called */
		if($this->Page->IsValid)
		{
			// Re-Render the active panel
		}

	}
}

?>