Exemple #1
0
 public function pxyEmailMessage_Click($strFormId, $strControlId, $strParameter)
 {
     $objEmailMessageRoute = EmailMessageRoute::Load($strParameter);
     if ($objEmailMessageRoute && $objEmailMessageRoute->GroupId == $this->objGroup->Id) {
         $this->objSelectedEmailMessageRoute = $objEmailMessageRoute;
         $this->dlgEmailMessage->ShowDialogBox();
     }
 }
 public function ShowDialogBox()
 {
     if (!$this->btnCancel) {
         $this->btnCancel = new QLinkButton($this);
         $this->btnCancel->Text = 'Cancel';
         $this->btnCancel->CssClass = 'cancel';
         $this->dtgPeople = new PersonDataGrid($this);
         $this->dtgPeople->Paginator = new QPaginator($this->dtgPeople);
         $this->dtgPeople->MetaAddColumn('LastName', 'Name=Name', 'Html=<?= $_CONTROL->ParentControl->RenderName($_ITEM); ?>', 'HtmlEntities=false', 'Width=220px', 'FontSize=11px');
         $this->dtgPeople->MetaAddColumn('PrimaryAddressText', 'Name=Primary Address and City', 'Html=<?= $_ITEM->PrimaryAddressText . ", " . $_ITEM->PrimaryCityText; ?>', 'Width=310px', 'FontSize=11px');
         $this->dtgPeople->MetaAddColumn('PrimaryPhoneText', 'Name=Phone', 'Width=80px', 'FontSize=10px');
         $this->dtgPeople->AddColumn(new QDataGridColumn('Select', '<?= $_CONTROL->ParentControl->RenderSelect($_ITEM, $_CONTROL->CurrentRowIndex); ?>', 'HtmlEntities=false', 'Width=120px'));
         $this->dtgPeople->SetDataBinder('dtgPeople_Bind', $this);
         $this->dtgPeople->NoDataHtml = '<p>Enter in a search criteria above.</p>';
         $this->dtgPeople->SortColumnIndex = 0;
         $this->dtgPeople->ItemsPerPage = 20;
         //$this->AddAction(new QInsertKeyEvent(), new QAjaxControlAction($this, 'btnSelect_Click'));
         //$this->dtgPeople->AddAction(new QInsertKeyEvent(), new QAjaxControlAction($this, 'btnSelect_Click'));
         $this->txtName = new QTextBox($this);
         $this->txtName->Name = 'Name';
         $this->txtName->AddAction(new QChangeEvent(), new QAjaxControlAction($this, 'dtgPeople_Refresh'));
         $this->txtName->AddAction(new QEnterKeyEvent(), new QAjaxControlAction($this, 'dtgPeople_Refresh'));
         $this->txtName->AddAction(new QEnterKeyEvent(), new QTerminateAction());
         $this->txtFirstName = new QTextBox($this);
         $this->txtFirstName->Name = 'First Name';
         $this->txtFirstName->AddAction(new QChangeEvent(), new QAjaxControlAction($this, 'dtgPeople_Refresh'));
         $this->txtFirstName->AddAction(new QEnterKeyEvent(), new QAjaxControlAction($this, 'dtgPeople_Refresh'));
         $this->txtFirstName->AddAction(new QEnterKeyEvent(), new QTerminateAction());
         $this->txtLastName = new QTextBox($this);
         $this->txtLastName->Name = 'Last Name';
         $this->txtLastName->AddAction(new QChangeEvent(), new QAjaxControlAction($this, 'dtgPeople_Refresh'));
         $this->txtLastName->AddAction(new QEnterKeyEvent(), new QAjaxControlAction($this, 'dtgPeople_Refresh'));
         $this->txtLastName->AddAction(new QEnterKeyEvent(), new QTerminateAction());
         $this->txtPhone = new QTextBox($this);
         $this->txtPhone->Name = 'Phone';
         $this->txtPhone->AddAction(new QChangeEvent(), new QAjaxControlAction($this, 'dtgPeople_Refresh'));
         $this->txtPhone->AddAction(new QEnterKeyEvent(), new QAjaxControlAction($this, 'dtgPeople_Refresh'));
         $this->txtPhone->AddAction(new QEnterKeyEvent(), new QTerminateAction());
         $this->txtAddress = new QTextBox($this);
         $this->txtAddress->Name = 'Address';
         $this->txtAddress->AddAction(new QChangeEvent(), new QAjaxControlAction($this, 'dtgPeople_Refresh'));
         $this->txtAddress->AddAction(new QEnterKeyEvent(), new QAjaxControlAction($this, 'dtgPeople_Refresh'));
         $this->txtAddress->AddAction(new QEnterKeyEvent(), new QTerminateAction());
         $this->txtCity = new QTextBox($this);
         $this->txtCity->Name = 'City';
         $this->txtCity->AddAction(new QChangeEvent(), new QAjaxControlAction($this, 'dtgPeople_Refresh'));
         $this->txtCity->AddAction(new QEnterKeyEvent(), new QAjaxControlAction($this, 'dtgPeople_Refresh'));
         $this->txtCity->AddAction(new QEnterKeyEvent(), new QTerminateAction());
         $this->pnlPerson = new QPanel($this);
         $this->pnlPerson->Template = dirname(__FILE__) . '/StewardshipSelectPersonPanel.tpl.php';
         $this->pnlPerson->CssClass = 'section personSection';
         $this->pxyViewPerson = new QControlProxy($this);
         $this->pxyViewPerson->AddAction(new QClickEvent(), new QAjaxControlAction($this, 'pxyViewPerson_Click'));
         $this->pxyViewPerson->AddAction(new QClickEvent(), new QTerminateAction());
         $this->btnSelect = new QButton($this);
         $this->btnSelect->Text = 'Select';
         $this->btnSelect->CssClass = 'primary';
         $this->btnSelect->AddAction(new QClickEvent(), new QAjaxControlAction($this, 'btnSelect_Click'));
         $this->lblOr = new QLabel($this);
         $this->lblOr->Text = ' &nbsp;or&nbsp; ';
         $this->lblOr->HtmlEntities = false;
         $this->pxySelectPerson = new QControlProxy($this);
         $this->pxySelectPerson->AddAction(new QClickEvent(), new QAjaxControlAction($this, 'pxySelectPerson_Click'));
         $this->pxySelectPerson->AddAction(new QClickEvent(), new QTerminateAction());
         if (!$this->objContribution->Id && is_file($this->objContribution->TempPath)) {
             $this->imgCheckImage = new TiffImageControl($this);
             $this->imgCheckImage->ImagePath = $this->objContribution->TempPath;
             $this->imgCheckImage->Width = '424';
             $this->imgCheckImage->AddAction(new QClickEvent(), new QJavaScriptAction("OpenInNewWindow('" . $this->objContribution->ViewLargeUrl . "');"));
         } else {
             if ($this->objContribution->Id && is_file($this->objContribution->Path)) {
                 $this->imgCheckImage = new TiffImageControl($this);
                 $this->imgCheckImage->ImagePath = $this->objContribution->Path;
                 $this->imgCheckImage->Width = '424';
                 $this->imgCheckImage->AddAction(new QClickEvent(), new QJavaScriptAction("OpenInNewWindow('" . $this->objContribution->ViewLargeUrl . "');"));
             }
         }
         $this->imgHistoricCheckImage = new TiffImageControl($this);
         $this->imgHistoricCheckImage->ImagePath = __DOCROOT__ . __IMAGE_ASSETS__ . '/no_check_image.tiff';
         $this->imgHistoricCheckImage->Width = '212';
         $this->imgHistoricCheckImage->Height = '100';
         $this->pxyViewCheckImage = new QControlProxy($this);
         $this->pxyViewCheckImage->AddAction(new QClickEvent(), new QAjaxControlAction($this, 'pxyViewCheckImage_Click'));
         $this->pxyViewCheckImage->AddAction(new QClickEvent(), new QTerminateAction());
     }
     $this->btnCancel->RemoveAllActions(QClickEvent::EventName);
     // If no one has been selected AND we are scanning a check, cancel should redirect back to scan
     if ($this->objParentControl->blnScanFlag && !$this->objParentControl->mctContribution->StewardshipContribution->Person) {
         $this->btnCancel->AddAction(new QClickEvent(), new QHideDialogBox($this));
         $this->btnCancel->AddAction(new QClickEvent(), new QJavaScriptAction("document.location='#" . $this->objParentControl->objStack->StackNumber . "/view/scan';"));
         $this->btnCancel->AddAction(new QClickEvent(), new QTerminateAction());
         // If no one has been selected AND we are NEW, cancel should redirect to the main
     } else {
         if (!$this->objParentControl->mctContribution->EditMode && !$this->objParentControl->mctContribution->StewardshipContribution->Person) {
             $this->btnCancel->AddAction(new QClickEvent(), new QHideDialogBox($this));
             $this->btnCancel->AddAction(new QClickEvent(), new QJavaScriptAction("document.location='#" . $this->objParentControl->objStack->StackNumber . "';"));
             $this->btnCancel->AddAction(new QClickEvent(), new QTerminateAction());
             // Otherwise, Cancel should just close the dbox
         } else {
             $this->btnCancel->AddAction(new QClickEvent(), new QHideDialogBox($this));
             $this->btnCancel->AddAction(new QClickEvent(), new QTerminateAction());
         }
     }
     $this->objSelectedPerson = $this->objContribution->Person;
     $this->pnlPerson_Refresh();
     $this->txtName->Text = null;
     $this->txtPhone->Text = null;
     $this->txtAddress->Text = null;
     $this->txtCity->Text = null;
     $this->dtgPeople_Refresh(null, null, null);
     parent::ShowDialogBox();
     $this->txtName->Focus();
 }
 public function ShowDialogBox()
 {
     parent::ShowDialogBox();
     $this->pnlValueDisplay->Text = $this->fltValue ? $this->fltValue : 0;
     $this->fltInternalValue = 0;
     $this->blnNextClears = true;
     $this->strCurrentOperation = null;
 }