예제 #1
0
파일: index.php 프로젝트: alcf/chms
 protected function Form_Create()
 {
     $this->lblHomeAddress = new QLabel($this);
     $this->lblHomeAddress->HtmlEntities = false;
     $this->lblMailingAddress = new QLabel($this);
     $this->lblMailingAddress->Name = 'Mailing Address';
     $this->lblMailingAddress->HtmlEntities = false;
     $this->lblEmailAddress = new QLabel($this);
     $this->lblEmailAddress->Name = 'Email Address';
     $this->lblBulkEmail = new QLabel($this);
     $this->lblBulkEmail->Name = 'ALCF Email Announcements';
     $this->lblMobilePhone = new QLabel($this);
     $this->lblMobilePhone->Name = 'Mobile Phone';
     $this->lblDateOfBirth = new QLabel($this);
     $this->lblDateOfBirth->Name = 'Date of Birth';
     $this->lblGender = new QLabel($this);
     $this->lblGender->Name = 'Gender';
     $this->lblUsername = new QLabel($this);
     $this->lblUsername->Name = 'my.alcf Login Username';
     $this->lblQuestion = new QLabel($this);
     $this->lblQuestion->Name = 'Security Question';
     $this->lblAnswer = new QLabel($this);
     $this->lblAnswer->Name = 'Your Answer';
     $this->lblAnswer->Text = '••••••••';
     $this->lblAnswer->HtmlEntities = false;
     $this->lblPassword = new QLabel($this);
     $this->lblPassword->Name = 'Password';
     $this->lblPassword->Text = '••••••••';
     $this->lblPassword->HtmlEntities = false;
     $this->btnAddress = new QButton($this);
     $this->btnAddress->CssClass = 'primary';
     $this->btnAddress->Text = 'Edit Address Information';
     $this->btnAddress->AddAction(new QClickEvent(), new QAjaxAction('btnAddress_Click'));
     $this->btnContact = new QButton($this);
     $this->btnContact->CssClass = 'primary';
     $this->btnContact->Text = 'Edit Contact Information';
     $this->btnContact->AddAction(new QClickEvent(), new QAjaxAction('btnContact_Click'));
     $this->btnPersonal = new QButton($this);
     $this->btnPersonal->CssClass = 'primary';
     $this->btnPersonal->Text = 'Edit Personal Information';
     $this->btnPersonal->AddAction(new QClickEvent(), new QAjaxAction('btnPersonal_Click'));
     $this->btnSecurity = new QButton($this);
     $this->btnSecurity->CssClass = 'primary';
     $this->btnSecurity->Text = 'Edit Login Information';
     $this->btnSecurity->AddAction(new QClickEvent(), new QAjaxAction('btnSecurity_Click'));
     $this->dlgEdit_Setup('Address');
     $this->dlgEdit_Setup('Contact');
     $this->dlgEdit_Setup('Personal');
     $this->dlgEdit_Setup('Security');
     $this->mctPerson = new PersonMetaControl($this->dlgPersonal, QApplication::$PublicLogin->Person);
     $this->dtxDateOfBirth = $this->mctPerson->dtxDateOfBirth_Create();
     $this->calDateOfBirth = $this->mctPerson->calDateOfBirth_Create();
     $this->lstGender = $this->mctPerson->lstGender_Create();
     $this->lstGender->AddAction(new QEnterKeyEvent(), new QTerminateAction());
     $this->dtxDateOfBirth->AddAction(new QEnterKeyEvent(), new QTerminateAction());
     if ($this->mctPerson->Person->DobGuessedFlag || $this->mctPerson->Person->DobYearApproximateFlag) {
         $this->dtxDateOfBirth->Text = null;
     }
     $this->Refresh();
     // Set Post 2016 Attribute by default if someone logs in that isn't set
     $isPost2016 = false;
     $attributeArray = $this->mctPerson->Person->GetAttributeValueArray();
     foreach ($attributeArray as $objAttribute) {
         if ($objAttribute->Attribute->Name == 'Post-2016') {
             $isPost2016 = true;
             break;
         }
     }
     if (!$isPost2016) {
         $objAttribute = new Attribute();
         $objAttribute->Name = 'Post-2016';
         $objAttribute->AttributeDataTypeId = AttributeDataType::Checkbox;
         $objAttribute->Save();
         $this->mctPerson->Person->SetAttribute($objAttribute, true);
     }
 }
예제 #2
0
파일: index.php 프로젝트: NewRoute/paypal
     }
     break;
 case 'savecat':
     USES_paypal_class_category();
     $C = new Category($_POST['cat_id']);
     if (!$C->Save($_POST)) {
         $content .= PAYPAL_popupMsg($LANG_PP['invalid_form']);
         $view = 'editcat';
     } else {
         $view = 'catlist';
     }
     break;
 case 'saveopt':
     USES_paypal_class_attribute();
     $Attr = new Attribute($_POST['attr_id']);
     if (!$Attr->Save($_POST)) {
         $content .= PAYPAL_popupMsg($LANG_PP['invalid_form']);
     }
     if (isset($_POST['attr_id']) && !empty($_POST['attr_id'])) {
         // Updating an existing option, return to the list
         $view = 'attributes';
     } else {
         $view = 'editattr';
     }
     break;
 case 'deleteopt':
     USES_paypal_class_attribute();
     // attr_id could be via $_GET or $_POST
     $Attr = new Attribute($_REQUEST['attr_id']);
     $Attr->Delete();
     $view = 'attributes';