From 270282e3a26b21184a2051995cb5b9a2755b823d Mon Sep 17 00:00:00 2001 From: wei <> Date: Sat, 18 Feb 2006 23:41:16 +0000 Subject: Update some javascript code. --- .../quickstart/protected/pages/Advanced/I18N.page | 4 + .../Controls/Samples/TCompareValidator/Home.page | 10 ++- .../Samples/TEmailAddressValidator/Home.page | 8 +- .../Samples/TRegularExpressionValidator/Home.page | 21 ++--- .../Controls/Samples/TValidationSummary/Home.page | 89 ++++++++++++++++++---- 5 files changed, 100 insertions(+), 32 deletions(-) (limited to 'demos/quickstart/protected/pages') diff --git a/demos/quickstart/protected/pages/Advanced/I18N.page b/demos/quickstart/protected/pages/Advanced/I18N.page index 1bb5a9a0..db97c25c 100644 --- a/demos/quickstart/protected/pages/Advanced/I18N.page +++ b/demos/quickstart/protected/pages/Advanced/I18N.page @@ -134,6 +134,9 @@ $message = localize("There are {num_users} users online.", array('num_users'=>$n

Where the second parameter in localize takes an associative array with the key as the substitution to find in the text and replaced it with the associated value. The localize function does not solve the problem of localizing languages that have plural forms, the solution is to use TChoiceFormat.

+

The following sample demonstrates the basics of localization in Prado.

+ +

I18N Components

TTranslate

@@ -225,4 +228,5 @@ is "One Apple". If the Value was "2", then it will show "Two Apples".Any non-empty combinations of the delimiters of square and round brackets are acceptable. The string chosen for display depends on the Value property. The Value is evaluated for each set until the Value is found to belong to a particular set.

+ \ No newline at end of file diff --git a/demos/quickstart/protected/pages/Controls/Samples/TCompareValidator/Home.page b/demos/quickstart/protected/pages/Controls/Samples/TCompareValidator/Home.page index 7abed86a..ab99436a 100644 --- a/demos/quickstart/protected/pages/Controls/Samples/TCompareValidator/Home.page +++ b/demos/quickstart/protected/pages/Controls/Samples/TCompareValidator/Home.page @@ -1,6 +1,8 @@

TCompareValidator Samples

+

Note:TCompareValidator will start +to validate only if both inputs are not empty.

@@ -9,8 +11,8 @@ Compare validator with default settings:
- - + + - - + +

TEmailAddressValidator Samples

+

Note:TEmailAddressValidator will start +to validate only if the input is not empty.

@@ -9,7 +11,7 @@ Email address validator with default settings:
- + - + - +

TRegularExpressionValidator Samples

- +

Note:TRegularExpressionValidator will start +to validate only if the input is not empty.

@@ -9,12 +10,12 @@ Regular expression validator with default settings: @@ -24,13 +25,13 @@ Regular expression validator with default settings: Regular expression validator with client-side validation disabled: @@ -40,13 +41,13 @@ Regular expression validator with client-side validation disabled: Regular expression validator with focus-on-error enabled and dynamic display: diff --git a/demos/quickstart/protected/pages/Controls/Samples/TValidationSummary/Home.page b/demos/quickstart/protected/pages/Controls/Samples/TValidationSummary/Home.page index 75ca9c52..5ac143ae 100644 --- a/demos/quickstart/protected/pages/Controls/Samples/TValidationSummary/Home.page +++ b/demos/quickstart/protected/pages/Controls/Samples/TValidationSummary/Home.page @@ -2,24 +2,83 @@

TValidationSummary Samples

-
- + + RegularExpression="\d+" + Text="Only digits are allowed." />
- + + RegularExpression="\d+" + Text="Only digits are allowed." />
- + + RegularExpression="\d+" + Text="Only digits are allowed." />
- - - - - + ErrorMessage="a password is required." /> + +
+ +
+ + +
+ +
+ + + + +
+ Sign In + +
+ Login Name: + + + +
+ +
+ Password: + + +
+ + +
+ +
-
-Required field validator with default settings: - - - + +
+ Create New Account + +
+ Username: + + +
+
+ Password + +
- -
+ \ No newline at end of file -- cgit v1.2.3