summaryrefslogtreecommitdiff
path: root/demos/blog-tutorial/protected/pages/Day1/id
diff options
context:
space:
mode:
authorctrlaltca <ctrlaltca@gmail.com>2014-08-26 16:59:21 +0200
committerctrlaltca <ctrlaltca@gmail.com>2014-08-26 16:59:21 +0200
commit74b31be9515eddfa63005d6760614badfaba9fea (patch)
tree47c952901dcb5eccd6dd8b7c6ee7e0b6bf176510 /demos/blog-tutorial/protected/pages/Day1/id
parent2b11341614ac4a15be697fa8acad07055154ac54 (diff)
parent0c5026b55cde5c104f10686afd8b441568175d38 (diff)
Merge pull request #530 from pradosoft/prado-3.2.43.2.4prado-3.2
Backports for Prado 3.2.4
Diffstat (limited to 'demos/blog-tutorial/protected/pages/Day1/id')
-rwxr-xr-xdemos/blog-tutorial/protected/pages/Day1/id/CreateContact.page31
-rwxr-xr-xdemos/blog-tutorial/protected/pages/Day1/id/Setup.page5
-rwxr-xr-xdemos/blog-tutorial/protected/pages/Day1/id/ShareLayout.page2
3 files changed, 17 insertions, 21 deletions
diff --git a/demos/blog-tutorial/protected/pages/Day1/id/CreateContact.page b/demos/blog-tutorial/protected/pages/Day1/id/CreateContact.page
index 65be6417..caee30d0 100755
--- a/demos/blog-tutorial/protected/pages/Day1/id/CreateContact.page
+++ b/demos/blog-tutorial/protected/pages/Day1/id/CreateContact.page
@@ -45,11 +45,11 @@ Kita menggunakan template untuk menghatur tata letak penyajian terhadap formulir
<h1>Contact</h1>
<p>Please fill out the following form to let me know your feedback on my blog. Thanks!</p>
-&lt;com:TForm>
+&lt;com:TForm>
<span>Your Name:</span>
&lt;com:TRequiredFieldValidator ControlToValidate="Name"
- ErrorMessage="Please provide your name."
+ ErrorMessage="Please provide your name."
Display="Dynamic" />
<br/>
&lt;com:TTextBox ID="Name" />
@@ -57,10 +57,10 @@ Kita menggunakan template untuk menghatur tata letak penyajian terhadap formulir
<br/>
<span>Your Email:</span>
&lt;com:TRequiredFieldValidator ControlToValidate="Email"
- ErrorMessage="Please provide your email address."
+ ErrorMessage="Please provide your email address."
Display="Dynamic" />
&lt;com:TEmailAddressValidator ControlToValidate="Email"
- ErrorMessage="You entered an invalid email address."
+ ErrorMessage="You entered an invalid email address."
Display="Dynamic" />
<br/>
&lt;com:TTextBox ID="Email" />
@@ -68,11 +68,11 @@ Kita menggunakan template untuk menghatur tata letak penyajian terhadap formulir
<br/>
<span>Feedback:</span>
&lt;com:TRequiredFieldValidator ControlToValidate="Feedback"
- ErrorMessage="Please provide your feedback."
+ ErrorMessage="Please provide your feedback."
Display="Dynamic" />
<br/>
-&lt;com:TTextBox ID="Feedback"
- TextMode="MultiLine"
+&lt;com:TTextBox ID="Feedback"
+ TextMode="MultiLine"
Rows="10"
Columns="40" />
@@ -99,13 +99,13 @@ Selain kontrol <tt>TTextBox</tt>, template juga menggunakan banyak kontrol valid
<com:TTextHighlighter CssClass="source" Language="prado">
<span>Your Email:</span>
-&lt;com:TRequiredFieldValidator
+&lt;com:TRequiredFieldValidator
ControlToValidate="Email"
- ErrorMessage="Please provide your email address."
+ ErrorMessage="Please provide your email address."
Display="Dynamic" />
-&lt;com:TEmailAddressValidator
+&lt;com:TEmailAddressValidator
ControlToValidate="Email"
- ErrorMessage="You entered an invalid email address."
+ ErrorMessage="You entered an invalid email address."
Display="Dynamic" />
<br/>
&lt;com:TTextBox ID="Email" />
@@ -152,28 +152,27 @@ class Contact extends TPage
/**
* Pengendali event untuk event OnClick pada tombol submit.
* @param TButton tombol yang memicu event
- * @param TEventParameter parameter event (null di sini)
+ * @param TEventParameter parameter event (null di sini)
*/
public function submitButtonClicked($sender, $param)
{
if ($this->IsValid) // memeriksa apakan validasi input berhasil
{
// mendapatkan nama pengguna, email, umpan balik dari kotak teks
- $name = $this->Name->Text;
+ $name = $this->Name->Text;
$email = $this->Email->Text;
$feedback = $this->Feedback->Text;
-
+
// mengirimkan email ke administrator dengan informasi di atas
$this->mailFeedback($name, $email, $feedback);
}
}
-
+
protected function mailFeedback($name, $email, $feedback)
{
// implementasi pengiriman email umpan balik
}
}
-?>
</com:TTextHighlighter>
<p>
diff --git a/demos/blog-tutorial/protected/pages/Day1/id/Setup.page b/demos/blog-tutorial/protected/pages/Day1/id/Setup.page
index edc469d5..45ae8cf5 100755
--- a/demos/blog-tutorial/protected/pages/Day1/id/Setup.page
+++ b/demos/blog-tutorial/protected/pages/Day1/id/Setup.page
@@ -52,7 +52,6 @@ require_once('path/to/prado.php');
$application = new TApplication;
// jalankan aplikasi dan tangani permintaan pengguna
$application->run();
-?>
</com:TTextHighlighter>
<com:InfoBox>
@@ -148,8 +147,8 @@ Untuk membuat lokasi akar direktori halaman dan mengubah nama homepage, seseoran
<?xml version="1.0" encoding="utf-8"?>
<application id="blog" mode="Debug">
<services>
- <service id="page"
- class="TPageService"
+ <service id="page"
+ class="TPageService"
BasePath="path.to.pages"
DefaultPage="NewHome"
/>
diff --git a/demos/blog-tutorial/protected/pages/Day1/id/ShareLayout.page b/demos/blog-tutorial/protected/pages/Day1/id/ShareLayout.page
index d505beed..0c40181b 100755
--- a/demos/blog-tutorial/protected/pages/Day1/id/ShareLayout.page
+++ b/demos/blog-tutorial/protected/pages/Day1/id/ShareLayout.page
@@ -66,7 +66,6 @@ File kelas <tt>MainLayout.php</tt> sangat sederhana:
class MainLayout extends TTemplateControl
{
}
-?>
</com:TTextHighlighter>
<com:InfoBox>
@@ -145,7 +144,6 @@ class Contact extends TPage
// ...
}
-?>
</com:TTextHighlighter>
<p>