コード例 #1
0
 /**
  * function __construct
  * <pre>
  * Initialize the object.
  * </pre>
  * @param $pathModuleRoot [STRING] The path to this module's root directory
  * @param $viewer [OBJECT] The viewer object.
  * @param $formAction [STRING] The action on a form submit
  * @param $initVar [INTEGER] Value used to initialize the dataManager
  * @return [void]
  */
 function __construct($pathModuleRoot, $viewer, $formAction, $initVar)
 {
     // NOTE: be sure to call the parent constructor before trying to
     //       use the ->formXXX arrays...
     parent::__construct($formAction, FormProcessor_ViewPageFields::FORM_FIELDS, '');
     $this->pathModuleRoot = $pathModuleRoot;
     $this->viewer = $viewer;
     $this->formAction = $formAction;
     $this->initVar = $initVar;
     // figure out the important fields for the dataManager
     $fieldsOfInterest = implode(',', $this->formFields);
     $this->dataManager = new RowManager_PageManager($initVar);
     //        $this->dataManager->setFieldsOfInterest( $fieldsOfInterest );
     //        $this->formValues = $this->dataManager->getArrayOfValues();
     // now initialize the labels for this page
     // start by loading the default field labels for this Module
     $languageID = $viewer->getLanguageID();
     $seriesKey = moduleRAD::MULTILINGUAL_SERIES_KEY;
     $pageKey = moduleRAD::MULTILINGUAL_PAGE_FIELDS;
     $this->labels = new XMLObject_MultilingualManager($languageID, $seriesKey, $pageKey);
     // load the site default form link labels
     $this->labels->loadPageLabels(SITE_LABEL_SERIES_SITE, SITE_LABEL_PAGE_FORM_LINKS);
     // then load the page specific labels for this page
     $pageKey = FormProcessor_ViewPageFields::MULTILINGUAL_PAGE_KEY;
     $this->labels->loadPageLabels($seriesKey, $pageKey);
 }
コード例 #2
0
 /**
  * function __construct
  * <pre>
  * Initialize the object.
  * </pre>
  * @param $pathModuleRoot [STRING] The path to the module's root dir.
  * @param $viewer [OBJECT] The viewer object.
  * @return [void]
  */
 function __construct($pathModuleRoot, $viewer, $formAction, $sortBy)
 {
     // NOTE: be sure to call the parent constructor before trying to
     //       use the ->formXXX arrays...
     $fieldList = '';
     //FormProcessor_ManageSuperAdmin::FORM_FIELDS;
     $fieldTypes = '';
     //FormProcessor_ManageSuperAdmin::FORM_FIELD_TYPES;
     $displayFields = '';
     //FormProcessor_ManageSuperAdmin::DISPLAY_FIELDS;
     parent::__construct($formAction, '', '');
     // initialzie the object values
     $this->pathModuleRoot = $pathModuleRoot;
     $this->viewer = $viewer;
     // now initialize the labels for this page
     // start by loading the default field labels for this Module
     $languageID = $viewer->getLanguageID();
     $seriesKey = modulecim_sch::MULTILINGUAL_SERIES_KEY;
     $pageKey = page_MySchedule::MULTILINGUAL_PAGE_KEY;
     $this->labels = new MultilingualManager($languageID, $seriesKey, $pageKey);
     // init the person id
     // figure out the viewer's person ID
     $accessManager = new RowManager_AccessManager();
     $accessManager->loadByViewerID($this->viewer->getViewerID());
     $this->personID = $accessManager->getPersonID();
     echo "Your person ID is:" . $this->personID . "<br/>";
     // set the schedule id
     $scheduleManager = new RowManager_ScheduleManager();
     $scheduleManager->setPersonID($this->personID);
     $scheduleList = new ListIterator($scheduleManager);
     $scheduleList->setFirst();
     $this->scheduleID = -1;
     if ($scheduleList->moveNext()) {
         $schManager = $scheduleList->getCurrent(new RowManager_ScheduleManager());
         $this->scheduleID = $schManager->getScheduleID();
         echo "Schedule ID:" . $this->scheduleID . "<br/>";
     } else {
         echo "ERROR finding schedule id.<br/>";
     }
 }
コード例 #3
0
 /**
  * function isDataValid
  * <pre>
  * Verifies the returned data is valid. Because this page is made up of 
  * sub-pages we just need to figure out the appropriate isDataValid() call
  * </pre>
  * @return [BOOL]
  */
 function isDataValid()
 {
     $isValid = parent::isDataValid();
     return $isValid;
 }
コード例 #4
0
 /**
  * function setLinks
  * <pre>
  * Sets the value of the linkValues array.
  * </pre>
  * @param $links [ARRAY] Array of Link Values
  * @return [void]
  */
 function setLinks($links, $scholarshipLinks, $cashTransLinks, $ccTransLinks)
 {
     parent::setLinks($links);
     $this->scholarship_subPage->setLinks($scholarshipLinks);
     $this->cashTrans_subPage->setLinks($cashTransLinks);
     $this->ccTrans_subPage->setLinks($ccTransLinks);
 }
コード例 #5
0
 /**
  * function isDataValid
  * <pre>
  * Verifies the returned data is valid.
  * </pre>
  * @return [BOOL]
  */
 function isDataValid()
 {
     $isValid = parent::isDataValid();
     // Make sure that module name doesn't already exist...
     if ($isValid) {
         $isValid = $this->dataManager->isUniqueModuleName($this->formValues['module_name']);
         $this->formErrors['module_name'] = $this->labels->getLabel('[error_UniqueModuleName]');
     }
     // now return result
     return $isValid;
 }
コード例 #6
0
 /**
  * function isDataValid
  * <pre>
  * Verifies the returned data is valid.
  * </pre>
  * @return [BOOL]
  */
 function isDataValid()
 {
     $isValid = parent::isDataValid();
     // do NOT allow starting freq. range value to be less than ending value
     //          if ($this->formValues['freq_value_id'] > $this->formValues['freq_value_id_2'])
     //          {
     // 	         $isValid = false;
     // 	         $this->formErrors[ 'freq_value_id' ] = 'Starting range value must be greater than or equal to the ending range value.';
     //          }
     /*
      * check here for specific cases not covered by simple Field
      * Definitions.
      */
     // Example : error checking
     // NOTE:  a custom error label [error_UniqueModuleName] is used
     // for the error.  This error label is created in the Page Labels
     // form.
     // Make sure that module name doesn't already exist...
     //        if ($isValid) {
     //            $isValid = $this->dataManager->isUniqueModuleName();
     //            $this->formErrors[ 'module_name' ] = $this->labels->getLabel( '[error_UniqueModuleName]');
     ///        }
     // now return result
     return $isValid;
 }
コード例 #7
0
 /**
  * function setLinks
  * <pre>
  * Sets the value of the linkValues array.
  * </pre>
  * @param $links [ARRAY] Array of Link Values
  * @return [void]
  */
 function setLinks($links, $cashTransLinks, $ccTransLinks, $disabledLink)
 {
     $this->cashTrans_form->setLinks($cashTransLinks);
     $this->ccTrans_form->setLinks($ccTransLinks);
     $dataAccessManager = new RowManager_EditCampusAssignmentManager();
     $dataAccessManager->setPersonID($this->person_id);
     $dataAccessManager->setCampusID($this->campus_id);
     $dataAccessManager->setSortOrder($this->sortBy);
     $dataList = $dataAccessManager->getListIterator();
     $displayedValues = $dataList->getDataList();
     // calculate total paid already
     $scholarshipTotal = $this->getScholarshipsTotal();
     $cashTotal = $this->getCashPaidTotal();
     $ccTotal = $this->getCCtransTotal();
     $cashOwed = $this->getCashOwedTotal();
     $totalPaid = $scholarshipTotal + $cashTotal + $ccTotal;
     //          echo "<br>scholarships = ".$scholarshipTotal;
     //          echo "<br>cash total = ".$cashTotal;
     //          echo "<br>cc total = ".$ccTotal;
     // disallow the 'continue' link if total paid (+ recorded as owed) is less than event deposit for this person
     $deposit = $this->getEventDeposit();
     if ($deposit == "NOT YET DETERMINED" || $totalPaid + $cashOwed < $deposit) {
         $baseLink = $disabledLink;
         //cashTransLinks['sortBy'];
         // 			   $baseLink = str_replace( modulecim_reg::CASHTRANS_ID.'=', '', $baseLink);
         $links['cont'] = $baseLink;
         $this->linkLabels['cont'] = $this->labels->getLabel('[Disabled]');
     }
     //   		          echo print_r($this->linkValues,true);
     parent::setLinks($links);
 }
コード例 #8
0
 /**
  * function isDataValid
  * <pre>
  * Verifies the returned data is valid.
  * </pre>
  * @return [BOOL]
  */
 function isDataValid()
 {
     $isValid = parent::isDataValid();
     /*
      * check here for specific cases not covered by simple Field
      * Definitions.
      */
     // Example : error checking
     // NOTE:  a custom error label [error_UniqueModuleName] is used
     // for the error.  This error label is created in the Page Labels
     // form.
     // Make sure that module name doesn't already exist...
     //        if ($isValid) {
     //            $isValid = $this->dataManager->isUniqueModuleName();
     //            $this->formErrors[ 'module_name' ] = $this->labels->getLabel( '[error_UniqueModuleName]');
     ///        }
     // now return result
     return $isValid;
 }
コード例 #9
0
ファイル: AdminBox.php プロジェクト: andrewroth/c4c_intranet
 /**
  * function prepareTemplate
  * <pre>
  * This method prepares the template object for returning AdminBox data.
  * </pre>
  * @return [void]
  */
 function prepareTemplate($path)
 {
     // call the FormProcessor's prepare Template function.
     parent::prepareTemplate($path);
     // store any additional link Columns
     $this->template->set('linkColumns', $this->linkColumns);
     // store the current op type
     $this->template->set('opType', $this->opType);
     /*
      * List related Template variables :
      */
     // store the field names being displayed
     $fieldNames = explode(',', $this->displayFields);
     $this->template->set('dataFieldList', $fieldNames);
 }
コード例 #10
0
 /**
  * function isDataValid
  * <pre>
  * Verifies the returned data is valid. Because this page is made up of 
  * sub-pages we just need to figure out the appropriate isDataValid() call
  * </pre>
  * @return [BOOL]
  */
 function isDataValid()
 {
     $isValid = parent::isDataValid();
     // now return result
     return $isValid;
 }
コード例 #11
0
 /**
  * function setFormAction
  * <pre>
  * Sets the value of the Form Action Link.
  * </pre>
  * @param $link [STRING] The HREF link for the continue link
  * @return [void]
  */
 function setFormAction($link, $topFormLinks, $bottomFormLinks)
 {
     parent::setFormAction($link);
     $this->instructions_form->setFormAction($topFormLinks);
     $this->editfields_form->setFormAction($bottomFormLinks);
 }
コード例 #12
0
 /**
  * function isDataValid
  * <pre>
  * Verifies the returned data is valid.
  * </pre>
  * @return [BOOL]
  */
 function isDataValid()
 {
     $isValid = parent::isDataValid();
     // Make sure that state var name doesn't already exist...
     if ($isValid) {
         $currentName = $this->formValues['statevar_name'];
         $isValid = $this->dataManager->isUniqueName($currentName, $this->module_id);
         if (!$isValid) {
             $this->formErrors['statevar_name'] = $this->labels->getLabel('[error_UniqueName]');
         }
     }
     // now return result
     return $isValid;
 }
コード例 #13
0
 /**
  * function setFormFieldsToTemplate
  * <pre>
  * Stores the fields into the Template object. This one is updated to 
  * add fields by each rowItem's primary ID...
  * </pre>
  * @return [void]
  */
 function setFormFieldsToTemplate()
 {
     // for each rowItem in family ...
     $this->rowManager->setFirst();
     while ($rowItem = $this->rowManager->getNext()) {
         parent::setFormFieldsToTemplate($rowItem->getPrimaryKeyValue());
     }
     // next rowItem
 }
コード例 #14
0
 /**
  * function isDataValid
  * <pre>
  * Verifies the returned data is valid.
  * </pre>
  * @return [BOOL]
  */
 function isDataValid()
 {
     $isValid = parent::isDataValid();
     /*
      * check here for specific cases not covered by simple Field
      * Definitions.
      */
     if ($isValid) {
         $name = $this->formValues['page_name'];
         $isValid = $this->dataManager->isUniqueName($name, $this->module_id);
         if (!$isValid) {
             $this->formErrors['page_name'] = $this->labels->getLabel('[error_UniqueName]');
         }
     }
     // now return result
     return $isValid;
 }
コード例 #15
0
 /**
  * function isDataValid
  * <pre>
  * Verifies the returned data is valid.
  * </pre>
  * @return [BOOL]
  */
 function isDataValid()
 {
     $isValid = parent::isDataValid();
     /*
      * check here for specific cases not covered by simple Field
      * Definitions.
      */
     if ($isValid) {
         $userID = $this->formValues['viewer_userID'];
         if (!$this->dataManager->isUniqueUserID($userID)) {
             $isValid = false;
             $this->formErrors['viewer_userID'] = $this->labels->getLabel('[error_uniqueUserID]');
         }
     }
     // now return result
     return $isValid;
 }
コード例 #16
0
 /**
  * function isDataValid
  * <pre>
  * Verifies the returned data is valid.
  * </pre>
  * @return [BOOL]
  */
 function isDataValid()
 {
     $isValid = parent::isDataValid();
     /*
      * check here for specific cases not covered by simple Field
      * Definitions.
      */
     // Example : error checking
     // NOTE:  a custom error label [error_UniqueModuleName] is used
     // for the error.  This error label is created in the Page Labels
     // form.
     // Make sure that module name doesn't already exist...
     if ($isValid) {
         $pword = $this->formValues['viewer_passWord'];
         $pword2 = $this->formValues['pword2'];
         if ($pword != $pword2) {
             $isValid = false;
             $this->formErrors['viewer_passWord'] = $this->labels->getLabel('[error_passwordMatch]');
         }
         $userID = $this->formValues['viewer_userID'];
         if (!$this->dataManager->isUniqueUserID($userID)) {
             $isValid = false;
             $this->formErrors['viewer_userID'] = $this->labels->getLabel('[error_uniqueUserID]');
         }
     }
     // now return result
     return $isValid;
 }
コード例 #17
0
 /**
  * function setFormAction
  * <pre>
  * Sets the value of the Form Action Link.
  * </pre>
  * @param $link [STRING] The HREF link for the continue link
  * @return [void]
  */
 function setFormAction($link, $topFormLinks, $bottomFormLinks)
 {
     parent::setFormAction($link);
     $this->basic_form->setFormAction($topFormLinks);
     if ($this->has_activity_form == true) {
         $this->optional_sheduled_activity_form->setFormAction($bottomFormLinks);
     }
     // 		 $this->approval_form->setFormAction($bottomFormLinks);
 }
コード例 #18
0
 /**
  * function setLinks
  * <pre>
  * Sets the value of the linkValues array.
  * </pre>
  * @param $links [ARRAY] Array of Link Values
  * @return [void]
  */
 function setLinks($links)
 {
     $this->activity_list->setLinks($links);
     //   		          echo print_r($this->linkValues,true);
     parent::setLinks($links);
 }
コード例 #19
0
 /**
  * function isDataValid
  * <pre>
  * Verifies the returned data is valid.
  * </pre>
  * @return [BOOL]
  */
 function isDataValid()
 {
     $isValid = parent::isDataValid();
     /*
      * check here for specific cases not covered by simple Field
      * Definitions.
      */
     if ($isValid) {
         $pword = $this->formValues['viewer_passWord'];
         $pword2 = $this->formValues['pword2'];
         if ($pword != $pword2) {
             $isValid = false;
             $this->formErrors['viewer_passWord'] = $this->labels->getLabel('[error_passwordMatch]');
             $this->formErrors['pword2'] = $this->labels->getLabel('[error_passwordMatch]');
         }
     }
     // now return result
     return $isValid;
 }