Ejemplo n.º 1
0
Archivo: region.php Proyecto: alcf/chms
 protected function Form_Create()
 {
     // Use the CreateFromPathInfo shortcut (this can also be done manually using the GrowthGroupLocationMetaControl constructor)
     // MAKE SURE we specify "$this" as the MetaControl's (and thus all subsequent controls') parent
     $this->mctGrowthGroupLocation = GrowthGroupLocationMetaControl::CreateFromPathInfo($this);
     $this->strPageTitle = 'Growth Groups - Edit Region';
     // Call MetaControl's methods to create qcontrols based on GrowthGroupLocation's data fields
     $this->lblId = $this->mctGrowthGroupLocation->lblId_Create();
     $this->txtLocation = $this->mctGrowthGroupLocation->txtLocation_Create();
     $this->txtLongitude = $this->mctGrowthGroupLocation->txtLongitude_Create();
     $this->txtLatitude = $this->mctGrowthGroupLocation->txtLatitude_Create();
     $this->txtZoom = $this->mctGrowthGroupLocation->txtZoom_Create();
     // Create Buttons and Actions on this Form
     $this->btnSave = new QButton($this);
     $this->btnSave->Text = QApplication::Translate('Save');
     $this->btnSave->AddAction(new QClickEvent(), new QAjaxAction('btnSave_Click'));
     $this->btnSave->CausesValidation = true;
     $this->btnCancel = new QButton($this);
     $this->btnCancel->Text = QApplication::Translate('Cancel');
     $this->btnCancel->AddAction(new QClickEvent(), new QAjaxAction('btnCancel_Click'));
     $this->btnDelete = new QButton($this);
     $this->btnDelete->Text = QApplication::Translate('Delete');
     $this->btnDelete->AddAction(new QClickEvent(), new QConfirmAction(QApplication::Translate('Are you SURE you want to DELETE this') . ' ' . QApplication::Translate('GrowthGroupLocation') . '?'));
     $this->btnDelete->AddAction(new QClickEvent(), new QAjaxAction('btnDelete_Click'));
     $this->btnDelete->Visible = false;
 }
 /**
  * Static Helper Method to Create using QueryString arguments
  *
  * @param mixed $objParentObject QForm or QPanel which will be using this GrowthGroupLocationMetaControl
  * @param QMetaControlCreateType $intCreateType rules governing GrowthGroupLocation object creation - defaults to CreateOrEdit
  * @return GrowthGroupLocationMetaControl
  */
 public static function CreateFromQueryString($objParentObject, $intCreateType = QMetaControlCreateType::CreateOrEdit)
 {
     $intId = QApplication::QueryString('intId');
     return GrowthGroupLocationMetaControl::Create($objParentObject, $intId, $intCreateType);
 }