summaryrefslogtreecommitdiff
path: root/framework/Wsat/pages
diff options
context:
space:
mode:
Diffstat (limited to 'framework/Wsat/pages')
-rw-r--r--framework/Wsat/pages/TWsatGenerateAR.page2
-rw-r--r--framework/Wsat/pages/TWsatHome.page34
-rw-r--r--framework/Wsat/pages/TWsatLogin.php1
-rw-r--r--framework/Wsat/pages/TWsatScaffolding.page25
-rw-r--r--framework/Wsat/pages/TWsatScaffolding.php13
5 files changed, 44 insertions, 31 deletions
diff --git a/framework/Wsat/pages/TWsatGenerateAR.page b/framework/Wsat/pages/TWsatGenerateAR.page
index c41d03a5..53ccc167 100644
--- a/framework/Wsat/pages/TWsatGenerateAR.page
+++ b/framework/Wsat/pages/TWsatGenerateAR.page
@@ -1,7 +1,7 @@
<com:TContent ID="Content">
<div class="section_title">Active Record Classes Generator</div>
<div class="green_panel" style="text-align: left; font-size: 14px; margin: 15px 5px">
- <label>This generator generates an AR class for the specified database table.</label><br/>
+ <label>This tool generates an AR class for the specified database table.</label><br/>
<label>Fields with <b style="color: red">*</b> are required.</label>
<hr/>
<div style="font-size: 12px; font-style: italic">
diff --git a/framework/Wsat/pages/TWsatHome.page b/framework/Wsat/pages/TWsatHome.page
index e8796ccd..2f65a541 100644
--- a/framework/Wsat/pages/TWsatHome.page
+++ b/framework/Wsat/pages/TWsatHome.page
@@ -1,17 +1,25 @@
<com:TContent ID="Content">
- <label style="font-size: 18px; font-weight: bold">Welcome to the Web Site Administration Tool</label>
+ <label style="font-size: 18px; font-weight: bold">Welcome to the Web Site Administration Tool</label>
- <div style="margin-top: 25px"><b>Application Dir:</b> <%= Prado::getPathOfNamespace('Application') %></div>
+ <div style="margin-top: 25px"><b>Application Dir:</b> <%= Prado::getPathOfNamespace('Application') %></div>
- <br/>
- <table>
- <tr style="background-color: #cccccc">
- <td style="padding: 5px; width: 100px">
- <com:THyperLink NavigateUrl="<%= $this->Service->constructUrl('TWsatGenerateAR') %>" Text="AR Classes" />
- </td>
- <td style="padding: 5px">
- Enables you to generate all Active Record Classes with relations included.
- </td>
- </tr>
- </table>
+ <br/>
+ <table>
+ <tr style="background-color: #cccccc">
+ <td style="padding: 5px; width: 100px">
+ <com:THyperLink NavigateUrl="<%= $this->Service->constructUrl('TWsatGenerateAR') %>" Text="AR Classes" />
+ </td>
+ <td style="padding: 5px">
+ Enables you to generate all Active Record Classes with relations included.
+ </td>
+ </tr>
+ <tr style="background-color: #cccccc">
+ <td style="padding: 5px; width: 100px">
+ <com:THyperLink NavigateUrl="<%= $this->Service->constructUrl('TWsatScaffolding') %>" Text="Scaffolding" />
+ </td>
+ <td style="padding: 5px">
+ Enables you to generate a completed CRUD based in DB tables. It allow to choose bootstrap for the view generation.
+ </td>
+ </tr>
+ </table>
</com:TContent>
diff --git a/framework/Wsat/pages/TWsatLogin.php b/framework/Wsat/pages/TWsatLogin.php
index 051937d7..7aa90740 100644
--- a/framework/Wsat/pages/TWsatLogin.php
+++ b/framework/Wsat/pages/TWsatLogin.php
@@ -17,7 +17,6 @@ class TWsatLogin extends TPage
if ($this->IsValid)
{
$this->Session["wsat_password"] = $this->getService()->getPassword();
-
$url = $this->Service->constructUrl('TWsatHome');
$this->Response->redirect($url);
}
diff --git a/framework/Wsat/pages/TWsatScaffolding.page b/framework/Wsat/pages/TWsatScaffolding.page
index bcf4d276..a3ebffd5 100644
--- a/framework/Wsat/pages/TWsatScaffolding.page
+++ b/framework/Wsat/pages/TWsatScaffolding.page
@@ -1,12 +1,19 @@
<com:TContent ID="Content">
- <div class="section_title">Scaffolding Generator</div>
-
- <div>
- <com:TPanel ID="tableNames"/>
- </div>
+ <div class="section_title">Scaffolding Generator</div>
- <div style="text-align: center; width: 400px">
- <com:TButton Text="Preview" OnClick="preview" Visible="false" />
- <com:TButton Text="Generate" OnClick="generate" />
- </div>
+ <div>
+ <com:TPanel ID="tableNames" GroupingText="Select tables to generate CRUD for:" Width="400px"/>
+ </div>
+
+ <div class="form_row">
+ <com:TLabel Text="Output Folder:" ForControl="output_folder" style="margin-right: 8px"/>
+ <com:TTextBox ID="output_folder" Text="Application.pages" CssClass="in_text" />
+ <label style="color: red">*</label>
+ <com:TRequiredFieldValidator ControlToValidate="output_folder" Text="Output folder cannot be blank." Display="Dynamic" />
+ </div>
+
+ <div style="text-align: center; width: 400px">
+ <com:TButton Text="Preview" OnClick="preview" Visible="false" />
+ <com:TButton Text="Generate" OnClick="generate" />
+ </div>
</com:TContent>
diff --git a/framework/Wsat/pages/TWsatScaffolding.php b/framework/Wsat/pages/TWsatScaffolding.php
index 7352b2ae..9bbeec3a 100644
--- a/framework/Wsat/pages/TWsatScaffolding.php
+++ b/framework/Wsat/pages/TWsatScaffolding.php
@@ -17,10 +17,7 @@ class TWsatScaffolding extends TPage
public function onInit($param)
{
parent::onInit($param);
- if (!$this->IsPostBack)
- {
- $this->startVisual();
- }
+ $this->startVisual();
}
private function startVisual()
@@ -29,11 +26,12 @@ class TWsatScaffolding extends TPage
foreach ($scf_generator->getAllTableNames() as $tableName)
{
$dynChb = new TCheckBox();
- $dynChb->ID = $tableName;
+ $dynChb->ID = "cb_$tableName";
$dynChb->Text = ucfirst($tableName);
$dynChb->Checked = true;
+ $this->registerObject("cb_$tableName", $dynChb);
$this->tableNames->getControls()->add($dynChb);
-
+ $this->tableNames->getControls()->add("</br>");
}
}
@@ -42,7 +40,8 @@ class TWsatScaffolding extends TPage
if ($this->IsValid)
{
$scf_generator = new TWsatScaffoldingGenerator();
- $scf_generator->renderAllTablesInformation();
+ // echo $this->cb_student->Text;
+ // $scf_generator->renderAllTablesInformation();
}
}