summaryrefslogtreecommitdiff
path: root/tests/FunctionalTests/tickets/protected/pages/Ticket278.page
blob: 8afaff229220fc2eb165cb85f4750b634e026e36 (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
38
39
40
<com:TContent ID="Content">

	<com:TLabel ForControl="text1" Text="Text 1:" />
	<com:TTextBox ID="text1" />
	<com:TRequiredFieldValidator
		ID="validator1"
		ControlToValidate="text1"
		ErrorMessage="Text 1 is required" />
	<div>
	<com:TCheckBox ID="check1" Text="More..." />
	</div>

	<com:TPanel ID="panel1" Style="display:none" >
		<com:TLabel ForControl="text2" Text="Text 2:" />
		<com:TTextBox ID="text2" />

	<com:TRequiredFieldValidator
		ID="validator2"
		ControlToValidate="text2"
		OnValidate="validator2_onValidate"
		OnPreRender="validate2_onPostValidate"
		ErrorMessage="Text 2 is required">
	<prop:ClientSide.OnValidate>
		sender.enabled = $("#<%= $this->check1->ClientID %>").get(0).checked;
	</prop:ClientSide.OnValidate>
	</com:TRequiredFieldValidator>

	</com:TPanel>

	<com:TButton ID="button1" Text="Submit!" />

	<com:TClientScript>
		jQuery( document ).ready(function() {
			jQuery("#<%= $this->check1->ClientID %>").click(function() {
				$("#<%= $this->panel1->ClientID %>").toggle();
			});
		});
	</com:TClientScript>

</com:TContent>