Ejemplo n.º 1
0
Archivo: index.php Proyecto: alcf/chms
 protected function Form_Create()
 {
     $this->lstReports = new QListBox($this);
     $this->lstReports->Name = 'Reports';
     $this->lstReports->AddAction(new QChangeEvent(), new QAjaxAction('lstReports_Change'));
     // Add each report based on the privileges of the current logged in user
     $this->lstReports->AddItem('- Select a Report -');
     if (QApplication::IsLoginHasPermission(PermissionType::AddNewIndividual)) {
         $this->lstReports->AddItem('New Members Report', 'newMembers.php');
         $this->lstReports->AddItem('Exiting Members Report', 'exitMembers.php');
         $this->lstReports->AddItem('Volunteer Report', 'volunteers.php');
         $this->lstReports->AddItem('Attendees Report', 'Attendees.php');
         $this->lstReports->AddItem('Geography Report', 'churchGeography.php');
     }
     $this->lstReports->AddItem('Church Ethnicity Report', 'churchEthnicity.php');
     if (QApplication::IsLoginHasPermission(PermissionType::AccessConfidentialNotes)) {
         $this->lstReports->AddItem('Confidential Notes Report', 'confidentialNotes.php');
     }
 }
Ejemplo n.º 2
0
Archivo: view.php Proyecto: alcf/chms
 protected function Form_Create()
 {
     // Setup Household Object
     $this->objHousehold = Household::Load(QApplication::PathInfo(0));
     if (!$this->objHousehold) {
         QApplication::Redirect('/households/');
     }
     $this->strPageTitle .= $this->objHousehold->Name;
     // Setup DataGrids
     $this->dtgMembers = new HouseholdParticipationDataGrid($this);
     $this->dtgMembers->MetaAddColumn('Role', 'Width=80px', 'Html=<?= $_ITEM->RoleToDisplay; ?>');
     $this->dtgMembers->MetaAddColumn(QQN::HouseholdParticipation()->Person->FirstName, 'Name=Name', 'Html=<?= $_ITEM->Person->LinkHtml; ?>', 'HtmlEntities=false', 'Width=300px');
     $this->dtgMembers->MetaAddColumn(QQN::HouseholdParticipation()->Person->PrimaryEmail->Address, 'Name=Email', 'Width=250px');
     $this->dtgMembers->MetaAddColumn(QQN::HouseholdParticipation()->Person->PrimaryPhone->Number, 'Name=Phone', 'Width=290px');
     $this->dtgMembers->GetColumn(0)->OrderByClause = null;
     $this->dtgMembers->GetColumn(1)->OrderByClause = null;
     $this->dtgMembers->GetColumn(2)->OrderByClause = null;
     $this->dtgMembers->GetColumn(3)->OrderByClause = null;
     $this->dtgMembers->SetDataBinder('dtgMembers_Bind');
     $this->dtgHomeAddresses = new QDataGrid($this);
     $this->dtgHomeAddresses->AddColumn(new QDataGridColumn('', '<?= $_FORM->RenderHomeAddressType($_ITEM); ?>', 'HtmlEntities=false', 'Width=60px'));
     $this->dtgHomeAddresses->AddColumn(new QDataGridColumn('Address', '<?= $_FORM->RenderHomeAddress($_ITEM); ?>', 'HtmlEntities=false', 'Width=235px'));
     $this->dtgHomeAddresses->AddColumn(new QDataGridColumn('City, State', '<?= $_ITEM->City . ", " . $_ITEM->State; ?>', 'Width=160px'));
     $this->dtgHomeAddresses->AddColumn(new QDataGridColumn('Zip', '<?= $_ITEM->ZipCode; ?>', 'Width=90px'));
     $this->dtgHomeAddresses->AddColumn(new QDataGridColumn('Phone', '<?= $_FORM->RenderHomePhone($_ITEM); ?>', 'Width=105px'));
     $this->dtgHomeAddresses->AddColumn(new QDataGridColumn('', '<?= $_ITEM->InvalidFlag ? "<img src=\\"/assets/images/marker_invalid.png\\" title=\\"Invalid Address\\"/>" : null; ?>', 'Width=54px', 'HtmlEntities=false'));
     $this->dtgHomeAddresses->SetDataBinder('dtgHomeAddresses_Bind', $this);
     $this->pxySetCurrentHomeAddress = new QControlProxy($this);
     $this->pxySetCurrentHomeAddress->AddAction(new QClickEvent(), new QAjaxAction('pxySetCurrentHomeAddress_Click'));
     $this->pxySetCurrentHomeAddress->AddAction(new QClickEvent(), new QTerminateAction());
     // Display Stewardship Preferences?
     if (QApplication::IsLoginHasPermission(PermissionType::AccessStewardship)) {
         $this->lblStewardship = new QLabel($this);
         $this->lblStewardship->HtmlEntities = false;
         $this->lblStewardship_Refresh();
         $this->pxyStewardship = new QControlProxy($this);
         $this->pxyStewardship->AddAction(new QClickEvent(), new QAjaxAction('pxyStewardship_Click'));
         $this->pxyStewardship->AddAction(new QClickEvent(), new QTerminateAction());
     }
 }
 protected function SetupPanel()
 {
     if (!QApplication::IsLoginHasPermission(PermissionType::EditMembershipStatus)) {
         $this->strTemplate = null;
         QApplication::ExecuteJavaScript('document.location = "#general";');
         return;
     }
     $this->dtgMemberships = new QDataGrid($this);
     if (QApplication::IsLoginHasPermission(PermissionType::EditMembershipStatus)) {
         $this->dtgMemberships->AddColumn(new QDataGridColumn('Edit', '<?= $_CONTROL->ParentControl->RenderEdit($_ITEM); ?>', 'HtmlEntities=false'));
     }
     $this->dtgMemberships->AddColumn(new QDataGridColumn('Membership Started', '<?= $_ITEM->DateStart->__toString("MMMM D, YYYY"); ?>'));
     $this->dtgMemberships->AddColumn(new QDataGridColumn('Membership Ended', '<?= $_CONTROL->ParentControl->RenderMembershipEnded($_ITEM); ?>', 'HtmlEntities=false'));
     $this->dtgMemberships->AddColumn(new QDataGridColumn('Reason', '<?= $_ITEM->TerminationReason; ?>'));
     $this->dtgMemberships->SetDataBinder('dtgMemberships_Bind', $this);
     $strdebug = sprintf("MembershipStatusTypeID = %d", $this->objPerson->MembershipStatusTypeId);
     // Add a "Add a New Membership" button if applicable
     if (QApplication::IsLoginHasPermission(PermissionType::EditMembershipStatus) && !$this->objPerson->CurrentMembershipInfo) {
         $this->btnAdd = new QButton($this);
         $this->btnAdd->AddAction(new QClickEvent(), new QAjaxControlAction($this, 'btnAdd_Click'));
     }
 }
Ejemplo n.º 4
0
 protected function SetupPanel()
 {
     $this->btnToggle = new QLinkButton($this);
     $this->btnToggle->Text = 'Toggle';
     $this->btnToggle->CssClass = 'cancel';
     $this->btnToggle->AddAction(new QClickEvent(), new QConfirmAction('Are you SURE you want to toggle this person\'s login status?'));
     $this->btnToggle->AddAction(new QClickEvent(), new QAjaxControlAction($this, 'btnToggle_Click'));
     $this->btnToggle->AddAction(new QClickEvent(), new QTerminateAction());
     if ($this->objPerson->PublicLogin && QApplication::IsLoginHasPermission(PermissionType::ManageOnlineAccounts)) {
         $this->btnRemove = new QLinkButton($this);
         $this->btnRemove->CssClass = 'delete';
         $this->btnRemove->Text = 'Remove Account';
         $this->btnRemove->AddAction(new QClickEvent(), new QConfirmAction('Are you SURE you want to PERMAMENTLY REMOVE THIS PERSON\'S ACCOUNT?!?!  Only do this if you ABSOULTELY KNOW what you are doing.'));
         $this->btnRemove->AddAction(new QClickEvent(), new QAjaxControlAction($this, 'btnRemove_Click'));
         $this->btnRemove->AddAction(new QClickEvent(), new QTerminateAction());
         $this->btnResetPassword = new QLinkButton($this);
         $this->btnResetPassword->CssClass = 'cancel';
         $this->btnResetPassword->Text = 'Reset Password';
         $this->btnResetPassword->AddAction(new QClickEvent(), new QConfirmAction('Are you SURE you want to RESET this user\'s password?  Only do this if the person has specifically requested you to do so.'));
         $this->btnResetPassword->AddAction(new QClickEvent(), new QAjaxControlAction($this, 'btnResetPassword_Click'));
         $this->btnResetPassword->AddAction(new QClickEvent(), new QTerminateAction());
     }
 }
 protected function SetupPanel()
 {
     // Ensure the User is allowed to Edit Memberships
     if (!QApplication::IsLoginHasPermission(PermissionType::EditMembershipStatus)) {
         return $this->ReturnTo('#general/view_membership');
     }
     // Get and Validate the Membership Object
     $this->objMembership = Membership::Load($this->strUrlHashArgument);
     if (!$this->objMembership) {
         // Trying to create a NEW membership
         // Let's make sure this person doesn't have a current membership
         if ($this->objPerson->CurrentMembershipInfo) {
             return $this->ReturnTo('#general/view_membership');
         }
         $this->objMembership = new Membership();
         $this->objMembership->Person = $this->objPerson;
         $this->blnEditMode = false;
         $this->btnSave->Text = 'Create';
     } else {
         // Ensure the Membership object belongs to the person
         if ($this->objMembership->PersonId != $this->objPerson->Id) {
             return $this->ReturnTo('#general/view_membership');
         }
         $this->blnEditMode = true;
         $this->btnSave->Text = 'Update';
         $this->btnDelete = new QLinkButton($this);
         $this->btnDelete->Text = 'Delete';
         $this->btnDelete->CssClass = 'delete';
         $this->btnDelete->AddAction(new QClickEvent(), new QConfirmAction('Are you SURE you want to permenantly DELETE this record?'));
         $this->btnDelete->AddAction(new QClickEvent(), new QAjaxControlAction($this, 'btnDelete_Click'));
         $this->btnDelete->AddAction(new QClickEvent(), new QTerminateAction());
     }
     // Create Controls
     $this->dtxDateStart = new QDateTimeTextBox($this);
     $this->dtxDateStart->Name = 'Membership Started';
     $this->dtxDateStart->Required = true;
     $this->dtxDateStart->Text = $this->objMembership->DateStart ? $this->objMembership->DateStart->__toString() : null;
     $this->calDateStart = new QCalendar($this, $this->dtxDateStart);
     $this->dtxDateEnd = new QDateTimeTextBox($this);
     $this->dtxDateEnd->Name = 'Membership Ended';
     $this->dtxDateEnd->Text = $this->objMembership->DateEnd ? $this->objMembership->DateEnd->__toString() : null;
     $this->dtxDateEnd->AddAction(new QBlurEvent(), new QAjaxControlAction($this, 'dtxDateEnd_Blur'));
     $this->calDateEnd = new QCalendar($this, $this->dtxDateEnd);
     $this->dtxDateStart->RemoveAllActions(QClickEvent::EventName);
     $this->dtxDateEnd->RemoveAllActions(QClickEvent::EventName);
     $this->lstTermination = new QListBox($this);
     $this->lstTermination->Name = 'Reason for Termination';
     $this->lstTermination->AddItem('- Select One -', null);
     if ($strTerminationReasons = Registry::GetValue('membership_termination_reason')) {
         foreach (explode(',', $strTerminationReasons) as $strReason) {
             $strReason = trim($strReason);
             $this->lstTermination->AddItem($strReason, $strReason, strtolower($strReason) == strtolower($this->objMembership->TerminationReason));
         }
     }
     $this->lstTermination->AddItem('- Other... -', -1);
     // Setup "Other" textbox
     $this->txtTermination = new QTextBox($this);
     $this->txtTermination->Name = '&nbsp;';
     // Pre-Select "Other" if applicable
     if ($this->objMembership->TerminationReason && is_null($this->lstTermination->SelectedValue)) {
         $this->lstTermination->SelectedValue = -1;
         $this->txtTermination->Text = $this->objMembership->TerminationReason;
     }
     // Setup and Call Actions
     $this->lstTermination->AddAction(new QChangeEvent(), new QAjaxControlAction($this, 'txtTermination_Refresh'));
     $this->txtTermination_Refresh();
     $this->dtxDateEnd_Blur();
 }
Ejemplo n.º 6
0
<?php

require __INCLUDES__ . '/header.inc.php';
?>

<h1>Confidential Notes Report</h1>
<?php 
if (QApplication::IsLoginHasPermission(PermissionType::AccessConfidentialNotes)) {
    ?>
<div class="section">
		<table>
		<tr>
			<td>View Notes From: </td>
			<td><?php 
    $this->dtxAfterValue->Render();
    ?>
&nbsp;<?php 
    $this->afterCalValue->Render();
    ?>
</td>
		</tr>
		<tr>
			<td>&nbsp;to &nbsp;</td>
			<td><?php 
    $this->dtxBeforeValue->Render();
    ?>
&nbsp;<?php 
    $this->beforeCalValue->Render();
    ?>
</td>
		</tr>
Ejemplo n.º 7
0
<?php

require __INCLUDES__ . '/header.inc.php';
?>

<h1>Member Reports</h1>

<div class="section">
<p>Possible Reports generated off the member database.</p>
<p>
	<ul>
		<li><b>New Members Report</b> - Generates a list of New Members based off a Start and end Date.</li>
		<li><b>Exiting Members Report</b> - Generates a list of Members leaving ALCF based off a Start and end Date.</li>
		<li><b>Members Ethnicity Report</b> - Generates a report of the Ethnic breakdown of the members at ALCF.</li>
	</ul>
</p>
<?php 
if (QApplication::IsLoginHasPermission(PermissionType::AddNewIndividual)) {
    ?>
		<button onclick="document.location='/individuals/reports.php'; return false;" class="primary">New Members Report</button>
		<button onclick="document.location='/individuals/report_exit_members.php'; return false;" class="primary">Exiting Members Report</button>
		<button onclick="document.location='/individuals/report_ethnicity.php'; return false;" class="primary">Members Ethnicity Report</button>
<?php 
}
?>
</div>

<?php 
require __INCLUDES__ . '/footer.inc.php';
Ejemplo n.º 8
0
<?php 
if ($objEmail = $_FORM->objPerson->PrimaryEmail) {
    _p(sprintf('<a href="mailto:%s">%s</a>', $strEmail = QApplication::HtmlEntities($objEmail->Address), $strEmail), false);
} else {
    _p('<span class="na">Not Specified</span>', false);
}
?>
		</div>
		<div class="cleaner">&nbsp;</div>
	</div>
</div>

<h3>Membership at ALCF</h3>
<div class="section">
	<?php 
if (QApplication::IsLoginHasPermission(PermissionType::EditMembershipStatus)) {
    ?>
		<div class="sectionButtons"><button class="primary" onclick="document.location='#general/view_membership'; return false;" href="#">Edit</button></div>
	<?php 
}
?>

	<div class="lvp">
		<div class="left">Membership Status</div>
		<div class="right">
<?php 
_p($_FORM->objPerson->MembershipStatus);
if ($strInfo = $_FORM->objPerson->CurrentMembershipInfo) {
    _p(', ' . $strInfo);
}
if ($strPriors = $_CONTROL->GetPriorMembershipText()) {