public function __construct($objParentObject, $strControlId = null) { // Call the Parent try { parent::__construct($objParentObject, $strControlId); } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } $this->strTemplate = __NARRO_INCLUDES__ . '/narro/panel/NarroUserRegisterPanel.tpl.php'; $this->lblMessage = new QLabel($this); $this->lblMessage->HtmlEntities = false; $this->txtUsername = new QTextBox($this, 'username'); $this->txtUsername->Required = true; $this->txtRealname = new QTextBox($this, 'name'); $this->txtRealname->Required = false; $this->txtEmail = new QTextBox($this, 'email'); $this->txtEmail->Required = true; $this->txtPassword = new QTextBox($this, 'password'); $this->txtPassword->TextMode = QTextMode::Password; $this->btnRegister = new QButton($this); $this->btnRegister->Text = t('Register'); $this->btnRegister->PrimaryButton = true; $this->btnRegister->CausesValidation = true; $this->btnRegister->AddAction(new QClickEvent(), new QServerControlAction($this, 'btnRegister_Click')); }
public function __construct($objParentObject, $strClosePanelMethod, $objInventoryTransaction = null, $strControlId = null) { // Call the Parent try { parent::__construct($objParentObject, $strControlId); } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } // Call SetupInventoryTransaction to either Load/Edit Existing or Create New $this->SetupInventoryTransaction($objInventoryTransaction); $this->strClosePanelMethod = $strClosePanelMethod; // Create/Setup Controls for InventoryTransaction's Data Fields $this->lblInventoryTransactionId_Create(); $this->lstInventoryLocation_Create(); $this->lstTransaction_Create(); $this->txtQuantity_Create(); $this->lstSourceLocation_Create(); $this->lstDestinationLocation_Create(); $this->lstCreatedByObject_Create(); $this->calCreationDate_Create(); $this->lstModifiedByObject_Create(); $this->lblModifiedDate_Create(); // Create/Setup ListBoxes (if applicable) via Unique ReverseReferences and ManyToMany References // Create/Setup Button Action controls $this->btnSave_Create(); $this->btnCancel_Create(); $this->btnDelete_Create(); }
public function __construct($objParentObject, $objNarroLanguage = null, $strControlId = null) { // Call the Parent try { parent::__construct($objParentObject, $strControlId); } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } $this->strTemplate = __NARRO_INCLUDES__ . '/narro/panel/NarroLanguageEditPanel.tpl.php'; // Call SetupNarroLanguage to either Load/Edit Existing or Create New $this->SetupNarroLanguage($objNarroLanguage); // Create/Setup Controls for NarroLanguage's Data Fields $this->txtLanguageName_Create(); $this->txtLanguageCode_Create(); $this->txtCountryCode_Create(); $this->txtDialectCode_Create(); $this->txtEncoding_Create(); $this->lstTextDirection_Create(); $this->txtSpecialCharacters_Create(); $this->txtPluralForm_Create(); $this->chkActive_Create(); // Create/Setup ListBoxes (if applicable) via Unique ReverseReferences and ManyToMany References // Create/Setup Button Action controls $this->btnSave_Create(); $this->btnCancel_Create(); $this->btnDelete_Create(); }
public function __construct($objParentObject, $strClosePanelMethod, $objPerson = null, $strControlId = null) { // Call the Parent try { parent::__construct($objParentObject, $strControlId); } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } // Call SetupPerson to either Load/Edit Existing or Create New $this->SetupPerson($objPerson); $this->strClosePanelMethod = $strClosePanelMethod; // Create/Setup Controls for Person's Data Fields $this->lblId_Create(); $this->lstPersonType_Create(); $this->txtUsername_Create(); $this->txtPassword_Create(); $this->txtFirstName_Create(); $this->txtLastName_Create(); $this->txtEmail_Create(); $this->chkDisplayRealNameFlag_Create(); $this->chkDisplayEmailFlag_Create(); $this->chkOptInFlag_Create(); $this->chkDonatedFlag_Create(); $this->txtLocation_Create(); $this->txtCountryId_Create(); $this->txtUrl_Create(); $this->calRegistrationDate_Create(); // Create/Setup ListBoxes (if applicable) via Unique ReverseReferences and ManyToMany References // Create/Setup Button Action controls $this->btnSave_Create(); $this->btnCancel_Create(); $this->btnDelete_Create(); }
public function __construct($objParentObject, $strClosePanelMethod, $objAddress = null, $strControlId = null) { // Call the Parent try { parent::__construct($objParentObject, $strControlId); } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } // Call SetupAddress to either Load/Edit Existing or Create New $this->SetupAddress($objAddress); $this->strClosePanelMethod = $strClosePanelMethod; // Create/Setup Controls for Address's Data Fields $this->lblAddressId_Create(); $this->lstCompany_Create(); $this->txtShortDescription_Create(); $this->lstCountry_Create(); $this->txtAddress1_Create(); $this->txtAddress2_Create(); $this->txtCity_Create(); $this->lstStateProvince_Create(); $this->txtPostalCode_Create(); $this->lstCreatedByObject_Create(); $this->calCreationDate_Create(); $this->lstModifiedByObject_Create(); $this->lblModifiedDate_Create(); // Create/Setup ListBoxes (if applicable) via Unique ReverseReferences and ManyToMany References $this->lstAddressCustomFieldHelper_Create(); // Create/Setup Button Action controls $this->btnSave_Create(); $this->btnCancel_Create(); $this->btnDelete_Create(); }
public function __construct($objParentObject, $strClosePanelMethod, $objContact = null, $strControlId = null) { // Call the Parent try { parent::__construct($objParentObject, $strControlId); } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } // Call SetupContact to either Load/Edit Existing or Create New $this->SetupContact($objContact); $this->strClosePanelMethod = $strClosePanelMethod; // Create/Setup Controls for Contact's Data Fields $this->lblContactId_Create(); $this->lstCompany_Create(); $this->lstAddress_Create(); $this->txtFirstName_Create(); $this->txtLastName_Create(); $this->txtTitle_Create(); $this->txtEmail_Create(); $this->txtPhoneOffice_Create(); $this->txtPhoneHome_Create(); $this->txtPhoneMobile_Create(); $this->txtFax_Create(); $this->txtDescription_Create(); $this->lstCreatedByObject_Create(); $this->calCreationDate_Create(); $this->lstModifiedByObject_Create(); $this->lblModifiedDate_Create(); // Create/Setup ListBoxes (if applicable) via Unique ReverseReferences and ManyToMany References // Create/Setup Button Action controls $this->btnSave_Create(); $this->btnCancel_Create(); $this->btnDelete_Create(); }
public function __construct($objParentObject, $strClosePanelMethod, $objAuditScan = null, $strControlId = null) { // Call the Parent try { parent::__construct($objParentObject, $strControlId); } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } // Call SetupAuditScan to either Load/Edit Existing or Create New $this->SetupAuditScan($objAuditScan); $this->strClosePanelMethod = $strClosePanelMethod; // Create/Setup Controls for AuditScan's Data Fields $this->lblAuditScanId_Create(); $this->lstAudit_Create(); $this->lstLocation_Create(); $this->txtEntityId_Create(); $this->txtCount_Create(); $this->txtSystemCount_Create(); // Create/Setup ListBoxes (if applicable) via Unique ReverseReferences and ManyToMany References // Create/Setup Button Action controls $this->btnSave_Create(); $this->btnCancel_Create(); $this->btnDelete_Create(); }
public function __construct(NarroProject $objProject, NarroLanguage $objLanguage, $objParentObject, $strControlId = null) { // Call the Parent try { parent::__construct($objParentObject, $strControlId); } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } $this->objProject = $objProject; $this->objLanguage = $objLanguage; $this->pnlTranslationSource = new QTabs($this); $objDirectoryPanel = new NarroDirectorySourcePanel($objProject, $objLanguage, $this->pnlTranslationSource); $objDirectoryPanel->Directory = $this->objProject->DefaultTranslationPath; new NarroUploadSourcePanel($objProject, $objLanguage, $this->pnlTranslationSource); new NarroWebSourcePanel($objProject, $objLanguage, $this->pnlTranslationSource); new NarroProjectSourcePanel($objProject, $objLanguage, $this->pnlTranslationSource); new NarroLanguageSourcePanel($objProject, $objLanguage, $this->pnlTranslationSource); if (NarroUtils::CanExec('/usr/bin/hg --help')) { new NarroMercurialSourcePanel($objProject, $objLanguage, $this->pnlTranslationSource); } if (NarroUtils::CanExec('/usr/bin/svn --help')) { new NarroSvnSourcePanel($objProject, $objLanguage, $this->pnlTranslationSource); } $this->pnlTranslationSource->Headers = array(t('On this server'), t('On my computer'), t('On the web'), t('Another project'), t('Another language'), t('Mercurial'), t('SVN')); }
public function __construct($objParentObject, $objProject, $strMethodCallBack, $strControlId = null) { // First, let's call the Parent's __constructor try { parent::__construct($objParentObject, $strControlId); } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } // Next, we set the local project object $this->objProject = $objProject; // Let's record the reference to the form's MethodCallBack // See note in ProjectViewPanel for more on this. $this->strMethodCallBack = $strMethodCallBack; // Let's set up the other local child control // Notice that we define the child controls' parents to be "this", which is this ProjectEditPanel object. $this->txtName = new QTextBox($this, 'txtProjectName'); $this->txtName->Text = $objProject->Name; $this->txtName->Name = 'Project Name'; $this->txtName->Required = true; $this->txtName->CausesValidation = true; // We need to add some Enter and Esc key Events on the Textbox $this->txtName->AddAction(new QEnterKeyEvent(), new QAjaxControlAction($this, 'btnSave_Click')); $this->txtName->AddAction(new QEnterKeyEvent(), new QTerminateAction()); $this->txtName->AddAction(new QEscapeKeyEvent(), new QAjaxControlAction($this, 'btnCancel_Click')); $this->txtName->AddAction(new QEscapeKeyEvent(), new QTerminateAction()); $this->btnSave = new QButton($this); $this->btnSave->Text = 'Save'; $this->btnSave->AddAction(new QClickEvent(), new QAjaxControlAction($this, 'btnSave_Click')); $this->btnSave->CausesValidation = true; $this->btnCancel = new QButton($this); $this->btnCancel->Text = 'Cancel'; $this->btnCancel->AddAction(new QClickEvent(), new QAjaxControlAction($this, 'btnCancel_Click')); }
public function __construct($objParentObject, $strClosePanelMethod, $objFile = null, $strControlId = null) { // Call the Parent try { parent::__construct($objParentObject, $strControlId); } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } // Call SetupFile to either Load/Edit Existing or Create New $this->SetupFile($objFile); $this->strClosePanelMethod = $strClosePanelMethod; // Create/Setup Controls for File's Data Fields $this->lblId_Create(); $this->lstDirectory_Create(); $this->txtPath_Create(); $this->txtDeprecatedMajorVersion_Create(); $this->txtDeprecatedMinorVersion_Create(); $this->txtDeprecatedBuild_Create(); // Create/Setup ListBoxes (if applicable) via Unique ReverseReferences and ManyToMany References // Create/Setup Button Action controls $this->btnSave_Create(); $this->btnCancel_Create(); $this->btnDelete_Create(); }
public function __construct($objParentObject, $strClosePanelMethod, $objCompany = null, $strControlId = null) { // Call the Parent try { parent::__construct($objParentObject, $strControlId); } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } // Call SetupCompany to either Load/Edit Existing or Create New $this->SetupCompany($objCompany); $this->strClosePanelMethod = $strClosePanelMethod; // Create/Setup Controls for Company's Data Fields $this->lblCompanyId_Create(); $this->lstAddress_Create(); $this->txtShortDescription_Create(); $this->txtWebsite_Create(); $this->txtTelephone_Create(); $this->txtFax_Create(); $this->txtEmail_Create(); $this->txtLongDescription_Create(); $this->lstCreatedByObject_Create(); $this->calCreationDate_Create(); $this->lstModifiedByObject_Create(); $this->lblModifiedDate_Create(); // Create/Setup ListBoxes (if applicable) via Unique ReverseReferences and ManyToMany References $this->lstCompanyCustomFieldHelper_Create(); // Create/Setup Button Action controls $this->btnSave_Create(); $this->btnCancel_Create(); $this->btnDelete_Create(); }
public function __construct($objParentObject, Project $objProject, $strControlId = null) { try { parent::__construct($objParentObject, $strControlId); // Watch out for template later gonna talk about it, // need a trick to look good // (insert the child content as row in table already present for Master // close colums -insert row - insert child - close row - open column // </td> <tr><td> render content of this child </td> </tr> <td> ) $this->Template = 'records.summary.tpl.php'; // Setting local the Msster QDataGrid to refresh on // Saves on the Child DataGrid.. $this->objParentObject = $objParentObject; $this->objProject = $objProject; // Create the child DataGrid as a normal QDataGrid $this->dtgRecordsSummary = new QDataGrid($this); // pagination $this->dtgRecordsSummary->Paginator = new QPaginator($this->dtgRecordsSummary); $this->dtgRecordsSummary->ItemsPerPage = 5; $this->dtgRecordsSummary->SetDataBinder('dtgRecordsSummary_Bind', $this); // Add some data to show... $this->dtgRecordsSummary->CreateCallableColumn('Person', [$this, 'render_PersonColumn']); $col = $this->dtgRecordsSummary->CreateNodeColumn('Id', QQN::Person()->Id); $col->CellStyler->Width = 120; } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } }
public function __construct($objParentObject, $strClosePanelMethod, $objAttachment = null, $strControlId = null) { // Call the Parent try { parent::__construct($objParentObject, $strControlId); } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } // Call SetupAttachment to either Load/Edit Existing or Create New $this->SetupAttachment($objAttachment); $this->strClosePanelMethod = $strClosePanelMethod; // Create/Setup Controls for Attachment's Data Fields $this->lblAttachmentId_Create(); $this->lstEntityQtype_Create(); $this->txtEntityId_Create(); $this->txtFilename_Create(); $this->txtTmpFilename_Create(); $this->txtFileType_Create(); $this->txtPath_Create(); $this->txtSize_Create(); $this->lstCreatedByObject_Create(); $this->calCreationDate_Create(); // Create/Setup ListBoxes (if applicable) via Unique ReverseReferences and ManyToMany References // Create/Setup Button Action controls $this->btnSave_Create(); $this->btnCancel_Create(); $this->btnDelete_Create(); }
public function __construct($objParentObject, $strClosePanelMethod, $objCustomField = null, $strControlId = null) { // Call the Parent try { parent::__construct($objParentObject, $strControlId); } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } // Call SetupCustomField to either Load/Edit Existing or Create New $this->SetupCustomField($objCustomField); $this->strClosePanelMethod = $strClosePanelMethod; // Create/Setup Controls for CustomField's Data Fields $this->lblCustomFieldId_Create(); $this->lstCustomFieldQtype_Create(); $this->lstDefaultCustomFieldValue_Create(); $this->txtShortDescription_Create(); $this->chkActiveFlag_Create(); $this->chkRequiredFlag_Create(); $this->lstCreatedByObject_Create(); $this->calCreationDate_Create(); $this->lstModifiedByObject_Create(); $this->lblModifiedDate_Create(); // Create/Setup ListBoxes (if applicable) via Unique ReverseReferences and ManyToMany References // Create/Setup Button Action controls $this->btnSave_Create(); $this->btnCancel_Create(); $this->btnDelete_Create(); }
public function __construct($objNarroUser, $objParentObject, $strControlId = null) { // Call the Parent try { parent::__construct($objParentObject, $strControlId); } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } $this->strTemplate = __NARRO_INCLUDES__ . '/narro/panel/NarroUserEditPanel.tpl.php'; $this->objNarroUser = $objNarroUser; // Create/Setup Controls for NarroUser's Data Fields $this->txtUsername_Create(); $this->txtPassword_Create(); $this->txtEmail_Create(); $this->txtRealname_Create(); // Create/Setup ListBoxes (if applicable) via Unique ReverseReferences and ManyToMany References // Create/Setup Button Action controls $this->btnSave_Create(); $this->btnCancel_Create(); $this->btnDelete_Create(); $this->lblMessage = new QLabel($this); $this->lblMessage->DisplayStyle = QDisplayStyle::Block; $this->lblMessage->Visible = false; }
public function __construct($objParentObject, $strControlId = null) { parent::__construct($objParentObject, $strControlId); $this->blnAutoRenderChildren = true; $this->strTemplate = dirname(__FILE__) . '/' . __CLASS__ . '.tpl.php'; $this->txtSearch = new QTextBox($this); $this->txtSearch->Name = t('Text'); $this->txtSearch->AddAction(new QEnterKeyEvent(), new QAjaxControlAction($this, 'txtSearch_KeyUp')); $this->txtSearch->SetCustomAttribute('autocomplete', 'off'); $this->btnClear = new QImageButton($this); $this->btnClear->AlternateText = t('Clear'); $this->btnClear->ToolTip = $this->btnClear->AlternateText; $this->btnClear->CssClass = 'clear_button'; $this->btnClear->ImageUrl = __NARRO_IMAGE_ASSETS__ . '/clear.png'; $this->btnClear->AddAction(new QClickEvent(), new QAjaxControlAction($this, 'btnClear_Click')); $this->lstLanguage = new QListBox($this); $arrLanguages = NarroLanguage::LoadAllActive(QQ::OrderBy(QQN::NarroLanguage()->LanguageName)); foreach ($arrLanguages as $objLanguage) { $this->lstLanguage->AddItem(t($objLanguage->LanguageName), $objLanguage->LanguageId, $objLanguage->LanguageCode == QApplication::$TargetLanguage->LanguageCode); } $this->btnSearch = new QImageButton($this); $this->btnSearch->AlternateText = t('Search'); $this->btnSearch->ToolTip = $this->btnSearch->AlternateText; $this->btnSearch->CssClass = 'clear_button'; $this->btnSearch->ImageUrl = __NARRO_IMAGE_ASSETS__ . '/search.png'; $this->btnSearch->AddAction(new QClickEvent(), new QAjaxControlAction($this, 'txtSearch_KeyUp')); $this->dtgSuggestion = new NarroSuggestionDataGrid($this); $this->dtgSuggestion->ShowHeader = false; $this->dtgSuggestion->MetaAddColumn(QQN::NarroSuggestion()->SuggestionValue); $this->dtgSuggestion->AdditionalClauses = array(QQ::LimitInfo(20), QQ::OrderBy(QQN::NarroSuggestion()->Text->TextCharCount)); $this->btnClear_Click(); }
public function __construct($objParentObject, $strClosePanelMethod, $objReceipt = null, $strControlId = null) { // Call the Parent try { parent::__construct($objParentObject, $strControlId); } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } // Call SetupReceipt to either Load/Edit Existing or Create New $this->SetupReceipt($objReceipt); $this->strClosePanelMethod = $strClosePanelMethod; // Create/Setup Controls for Receipt's Data Fields $this->lblReceiptId_Create(); $this->lstTransaction_Create(); $this->lstFromCompany_Create(); $this->lstFromContact_Create(); $this->lstToContact_Create(); $this->lstToAddress_Create(); $this->txtReceiptNumber_Create(); $this->calDueDate_Create(); $this->calReceiptDate_Create(); $this->chkReceivedFlag_Create(); $this->lstCreatedByObject_Create(); $this->calCreationDate_Create(); $this->lstModifiedByObject_Create(); $this->lblModifiedDate_Create(); // Create/Setup ListBoxes (if applicable) via Unique ReverseReferences and ManyToMany References // Create/Setup Button Action controls $this->btnSave_Create(); $this->btnCancel_Create(); $this->btnDelete_Create(); }
public function __construct($objParentObject, $objPerson, $strMethodCallBack, $strControlId = null) { // Call the Parent try { parent::__construct($objParentObject, $strControlId); } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } // Let's record the reference to the form's MethodCallBack // See note in ProjectViewPanel for more on this. $this->strMethodCallBack = $strMethodCallBack; // Call SetupPerson to either Load/Edit Existing or Create New $this->SetupPerson($objPerson); // Create/Setup Controls for Person's Data Fields $this->lblId_Create(); $this->txtFirstName_Create(); $this->txtLastName_Create(); // Create/Setup ListBoxes (if applicable) via Unique ReverseReferences and ManyToMany References $this->lstLogin_Create(); $this->lstProjectsAsTeamMember_Create(); // Create/Setup Button Action controls $this->btnSave_Create(); $this->btnCancel_Create(); }
public function __construct($objParentObject, $strClosePanelMethod, $objAsset = null, $strControlId = null) { // Call the Parent try { parent::__construct($objParentObject, $strControlId); } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } // Call SetupAsset to either Load/Edit Existing or Create New $this->SetupAsset($objAsset); $this->strClosePanelMethod = $strClosePanelMethod; // Create/Setup Controls for Asset's Data Fields $this->lblAssetId_Create(); $this->lstAssetModel_Create(); $this->lstLocation_Create(); $this->txtAssetCode_Create(); $this->txtImagePath_Create(); $this->chkCheckedOutFlag_Create(); $this->chkReservedFlag_Create(); $this->lstCreatedByObject_Create(); $this->calCreationDate_Create(); $this->lstModifiedByObject_Create(); $this->lblModifiedDate_Create(); // Create/Setup ListBoxes (if applicable) via Unique ReverseReferences and ManyToMany References // Create/Setup Button Action controls $this->btnSave_Create(); $this->btnCancel_Create(); $this->btnDelete_Create(); }
public function __construct($objParentObject, $strClosePanelMethod, $intId = null, $strControlId = null) { // Call the Parent try { parent::__construct($objParentObject, $strControlId); } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } // Setup Callback and Template $this->strTemplate = 'PeopledetailsEditPanel.tpl.php'; $this->strClosePanelMethod = $strClosePanelMethod; // Construct the PeopledetailsMetaControl // MAKE SURE we specify "$this" as the MetaControl's (and thus all subsequent controls') parent $this->mctPeopledetails = PeopledetailsMetaControl::Create($this, $intId); // Call MetaControl's methods to create qcontrols based on Peopledetails's data fields $this->lblId = $this->mctPeopledetails->lblId_Create(); $this->txtFullName = $this->mctPeopledetails->txtFullName_Create(); $this->txtAddress = $this->mctPeopledetails->txtAddress_Create(); $this->txtPhone = $this->mctPeopledetails->txtPhone_Create(); $this->txtEmail = $this->mctPeopledetails->txtEmail_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 QAjaxControlAction($this, 'btnSave_Click')); $this->btnSave->CausesValidation = $this; $this->btnCancel = new QButton($this); $this->btnCancel->Text = QApplication::Translate('Cancel'); $this->btnCancel->AddAction(new QClickEvent(), new QAjaxControlAction($this, '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('Peopledetails') . '?')); $this->btnDelete->AddAction(new QClickEvent(), new QAjaxControlAction($this, 'btnDelete_Click')); $this->btnDelete->Visible = $this->mctPeopledetails->EditMode; }
public function __construct($objParentObject, $strControlId = null, $intEntityQtypeId = null, $intEntityId = null) { parent::__construct($objParentObject, $strControlId); $this->intAttachmentCount = Attachment::CountByEntityQtypeIdEntityId($intEntityQtypeId, $intEntityId); if ($this->intAttachmentCount > 0) { $this->strTemplate = __DOCROOT__ . __SUBDIRECTORY__ . '/common/QAttachments.tpl.php'; $this->lblAttachments_Create(); $this->pnlAttachments = new QPanel($this); $this->pnlAttachments->strTemplate = __DOCROOT__ . __SUBDIRECTORY__ . '/common/attachments.tpl.php'; $this->pnlAttachments->Display = false; $this->objAttachmentArray = Attachment::LoadArrayByEntityQtypeIdEntityId($intEntityQtypeId, $intEntityId); $this->arrAttachments = array(); foreach ($this->objAttachmentArray as $key => $objAttachment) { $strAttachment = sprintf('<strong><a href="' . __PHP_ASSETS__ . '/download.php?tmp_filename=%s&attachment_id=%s" target="_blank" style="color:blue;">%s</a></strong> (%s bytes) %s by %s ', $objAttachment->TmpFilename, $objAttachment->AttachmentId, $objAttachment->Filename, $objAttachment->Size, $objAttachment->CreationDate, $objAttachment->CreatedByObject->__toStringFullName()); $lblDelete = new QLabel($this->pnlAttachments); $lblDelete->Text = 'Delete<br/>'; $lblDelete->ForeColor = '#555555'; $lblDelete->FontUnderline = true; $lblDelete->SetCustomStyle('cursor', 'pointer'); $lblDelete->HtmlEntities = false; $lblDelete->ActionParameter = $objAttachment->AttachmentId; $lblDelete->AddAction(new QClickEvent(), new QConfirmAction('Are you sure you want to delete this attachment?')); $lblDelete->AddAction(new QClickEvent(), new QServerControlAction($this, 'lblDelete_Click')); QApplication::AuthorizeControl($objAttachment, $lblDelete, 3); $this->arrAttachments[$key]['strAttachment'] = $strAttachment; $this->arrAttachments[$key]['lblDelete'] = $lblDelete; } } else { $this->Display = false; } }
public function __construct($objParentObject, $strClosePanelMethod, $objRoleEntityQtypeBuiltInAuthorization = null, $strControlId = null) { // Call the Parent try { parent::__construct($objParentObject, $strControlId); } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } // Call SetupRoleEntityQtypeBuiltInAuthorization to either Load/Edit Existing or Create New $this->SetupRoleEntityQtypeBuiltInAuthorization($objRoleEntityQtypeBuiltInAuthorization); $this->strClosePanelMethod = $strClosePanelMethod; // Create/Setup Controls for RoleEntityQtypeBuiltInAuthorization's Data Fields $this->lblRoleEntityBuiltInId_Create(); $this->lstRole_Create(); $this->lstEntityQtype_Create(); $this->lstAuthorization_Create(); $this->chkAuthorizedFlag_Create(); $this->lstCreatedByObject_Create(); $this->calCreationDate_Create(); $this->lstModifiedByObject_Create(); $this->lblModifiedDate_Create(); // Create/Setup ListBoxes (if applicable) via Unique ReverseReferences and ManyToMany References // Create/Setup Button Action controls $this->btnSave_Create(); $this->btnCancel_Create(); $this->btnDelete_Create(); }
public function __construct(QcodoClass $objClass, $objParentControl, $strControlId = null) { parent::__construct($objParentControl, $strControlId); $this->objQcodoClass = $objClass; $this->strTemplate = 'ClassPanel.tpl.php'; $this->strUrl = 'http://' . $_SERVER['HTTP_HOST'] . '/index.php/' . $this->objQcodoClass->Name; $this->strShortDescriptionHtml = $this->objQcodoClass->ShortDescriptionAsHtml; if (!$this->strShortDescriptionHtml) { $this->strShortDescriptionHtml = '<span style="color: #888888;"><i>No description entered yet.</i></span>'; } $this->strLongDescriptionHtml = QWriteBox::DisplayHtml($this->objQcodoClass->ExtendedDescription, 'writebox_code'); $this->strVersion = 'Qcodo >= ' . $this->objQcodoClass->FirstVersion; if ($this->objQcodoClass->LastVersion) { $this->strVersion .= ' - Deprecated as of ' . $this->objQcodoClass->LastVersion; } $this->strParentClassArray[$objClass->Id] = $objClass->DisplayName; $objParentClass = $objClass->ParentQcodoClass; while ($objParentClass) { $this->strParentClassArray[$objParentClass->Id] = $objParentClass->DisplayName; $objParentClass = $objParentClass->ParentQcodoClass; } $this->strParentClassArray = array_reverse($this->strParentClassArray, true); foreach ($this->objQcodoClass->GetChildQcodoClassArray(QQ::Clause(QQ::OrderBy(QQN::QcodoClass()->Name))) as $objChildClass) { $this->strChildClassArray[$objChildClass->Id] = $objChildClass->DisplayName; } if (QApplication::$Login) { $this->strEditLink = '<div class="edit_link" title="Edit" onclick="document.location=\'/edit_class.php/'; $this->strEditLink .= $this->objQcodoClass->Id; $this->strEditLink .= '\'">EDIT</div>'; } }
public function __construct($objParentObject, $strControlId = null) { // Call the Parent try { parent::__construct($objParentObject, $strControlId); } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } $this->strTemplate = __NARRO_INCLUDES__ . '/narro/panel/NarroProjectListPanel.tpl.php'; $this->colProjectName_Create(); $this->colLastActivity_Create(); $this->colPercentTranslated_Create(); $this->dtgProjectList_Create(); $this->dtgProjectList->AddColumn($this->colProjectName); $this->dtgProjectList->AddColumn($this->colLastActivity); $this->dtgProjectList->AddColumn($this->colPercentTranslated); $colWordCount = new QDataGridColumn(t('Word count')); $colWordCount->Html = '<?=number_format($_ITEM->CountAllWordsByLanguage())?>'; $colWordCount->HorizontalAlign = QHorizontalAlign::Right; // $this->dtgProjectList->AddColumn($colWordCount); $this->dtgProjectList->SortColumnIndex = 1; $this->dtgProjectList->SortDirection = 1; $this->txtSearch_Create(); $this->btnSearch_Create(); $this->btnAdd_Create(); }
public function __construct($objParentObject, $strControlId = null, StewardshipBatch $objBatch, StewardshipStack $objStack = null, $strUrlHashArgument1 = null, $strUrlHashArgument2 = null, $strUrlHashArgument3 = null) { try { parent::__construct($objParentObject, $strControlId); } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } $this->strTemplate = dirname(__FILE__) . '/' . get_class($this) . '.tpl.php'; $this->objBatch = $objBatch; $this->objStack = $objStack; $this->strUrlHashArgument = $strUrlHashArgument1; $this->strUrlHashArgument2 = $strUrlHashArgument2; $this->strUrlHashArgument3 = $strUrlHashArgument3; $this->btnSave = new QButton($this); $this->btnSave->Text = 'Save'; $this->btnSave->CssClass = 'primary'; $this->btnSave->AddAction(new QClickEvent(), new QAjaxControlAction($this, 'btnSave_Click')); $this->btnSave->CausesValidation = $this; $this->btnCancel = new QLinkButton($this); $this->btnCancel->Text = 'Cancel'; $this->btnCancel->CssClass = 'cancel'; $this->btnCancel->AddAction(new QClickEvent(), new QAjaxControlAction($this, 'btnCancel_Click')); $this->btnCancel->AddAction(new QClickEvent(), new QTerminateAction()); $this->SetupPanel(); }
public function __construct($objParentObject, $strClosePanelMethod, $objShippingAccount = null, $strControlId = null) { // Call the Parent try { parent::__construct($objParentObject, $strControlId); } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } // Call SetupShippingAccount to either Load/Edit Existing or Create New $this->SetupShippingAccount($objShippingAccount); $this->strClosePanelMethod = $strClosePanelMethod; // Create/Setup Controls for ShippingAccount's Data Fields $this->lblShippingAccountId_Create(); $this->lstCourier_Create(); $this->txtShortDescription_Create(); $this->txtAccessId_Create(); $this->txtAccessCode_Create(); $this->lstCreatedByObject_Create(); $this->calCreationDate_Create(); $this->lstModifiedByObject_Create(); $this->lblModifiedDate_Create(); // Create/Setup ListBoxes (if applicable) via Unique ReverseReferences and ManyToMany References // Create/Setup Button Action controls $this->btnSave_Create(); $this->btnCancel_Create(); $this->btnDelete_Create(); }
public function __construct($objParentObject, $strClosePanelMethod, $objCategory = null, $strControlId = null) { // Call the Parent try { parent::__construct($objParentObject, $strControlId); } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } // Call SetupCategory to either Load/Edit Existing or Create New $this->SetupCategory($objCategory); $this->strClosePanelMethod = $strClosePanelMethod; // Create/Setup Controls for Category's Data Fields $this->lblCategoryId_Create(); $this->txtShortDescription_Create(); $this->txtLongDescription_Create(); $this->txtImagePath_Create(); $this->chkAssetFlag_Create(); $this->chkInventoryFlag_Create(); $this->lstCreatedByObject_Create(); $this->calCreationDate_Create(); $this->lstModifiedByObject_Create(); $this->lblModifiedDate_Create(); // Create/Setup ListBoxes (if applicable) via Unique ReverseReferences and ManyToMany References // Create/Setup Button Action controls $this->btnSave_Create(); $this->btnCancel_Create(); $this->btnDelete_Create(); }
public function __construct($objParentObject, $strClosePanelMethod, $objUserAccount = null, $strControlId = null) { // Call the Parent try { parent::__construct($objParentObject, $strControlId); } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } // Call SetupUserAccount to either Load/Edit Existing or Create New $this->SetupUserAccount($objUserAccount); $this->strClosePanelMethod = $strClosePanelMethod; // Create/Setup Controls for UserAccount's Data Fields $this->lblUserAccountId_Create(); $this->txtFirstName_Create(); $this->txtLastName_Create(); $this->txtUsername_Create(); $this->txtPasswordHash_Create(); $this->txtEmailAddress_Create(); $this->chkActiveFlag_Create(); $this->chkAdminFlag_Create(); $this->chkPortableAccessFlag_Create(); $this->txtPortableUserPin_Create(); $this->lstRole_Create(); $this->lstCreatedByObject_Create(); $this->calCreationDate_Create(); $this->lstModifiedByObject_Create(); $this->lblModifiedDate_Create(); // Create/Setup ListBoxes (if applicable) via Unique ReverseReferences and ManyToMany References // Create/Setup Button Action controls $this->btnSave_Create(); $this->btnCancel_Create(); $this->btnDelete_Create(); }
public function __construct($objParentObject, $strClosePanelMethod, $objQcodoClass = null, $strControlId = null) { // Call the Parent try { parent::__construct($objParentObject, $strControlId); } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } // Call SetupQcodoClass to either Load/Edit Existing or Create New $this->SetupQcodoClass($objQcodoClass); $this->strClosePanelMethod = $strClosePanelMethod; // Create/Setup Controls for QcodoClass's Data Fields $this->lblId_Create(); $this->lstParentQcodoClass_Create(); $this->lstInterface_Create(); $this->lstClassGroup_Create(); $this->txtName_Create(); $this->chkAbstractFlag_Create(); $this->chkEnumerationFlag_Create(); $this->txtFirstVersion_Create(); $this->txtLastVersion_Create(); $this->txtShortDescription_Create(); $this->txtExtendedDescription_Create(); $this->lstFile_Create(); // Create/Setup ListBoxes (if applicable) via Unique ReverseReferences and ManyToMany References // Create/Setup Button Action controls $this->btnSave_Create(); $this->btnCancel_Create(); $this->btnDelete_Create(); }
public function __construct($objUser, $objParentObject, $strControlId = null) { // Call the Parent try { parent::__construct($objParentObject, $strControlId); } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } $this->objUser = $objUser; if (QApplication::GetUserId() == NarroUser::ANONYMOUS_USER_ID) { QApplication::Redirect(NarroLink::ProjectList()); exit; } if (isset($_SERVER['HTTP_REFERER']) && !strstr($_SERVER['HTTP_REFERER'], 'login.php') && strstr($_SERVER['HTTP_REFERER'], __HTTP_URL__) && !strstr($_SERVER['HTTP_REFERER'], basename(__FILE__)) && $_SERVER['HTTP_REFERER'] != '') { $this->txtPreviousUrl = $_SERVER['HTTP_REFERER']; } $this->lblMessage = new QLabel($this); $this->lblMessage->Text = t('Here you can set your preferences.'); $this->lblMessage->DisplayStyle = QDisplayStyle::Block; $this->btnSave = new QButton($this); $this->btnSave->Text = t('Save'); $this->btnSave->PrimaryButton = true; $this->btnSave->AddAction(new QClickEvent(), new QServerControlAction($this, 'btnSave_Click')); $this->btnCancel = new QButton($this); $this->btnCancel->Text = t('Cancel'); $this->btnCancel->AddAction(new QClickEvent(), new QServerControlAction($this, 'btnCancel_Click')); if ($this->objUser->Data == '' && $this->objUser->UserId != NarroUser::ANONYMOUS_USER_ID) { $this->lblMessage->Text = t('You don\'t have any preferences set. Please set your preferences and save them.'); $this->lblMessage->ForeColor = 'red'; } }