Fixed minor things and added missing file
[vanilla-miry.git] / themes / settings_applicants_form.php
blob750b3c5e3e3bf86ead8f54e1dc8ad82a09002460
1 <?php
2 // Note: This file is included from the library/People/People.Control.ApplicantsForm.php control.
4 echo '<div id="Form" class="Account Extensions Applicants">';
5 if ($this->PostBackAction == 'ProcessApplicants' && $this->Context->WarningCollector->Count() == 0) echo '<div id="Success">'.$this->Context->GetDefinition('ChangesSaved').'</div>';
6 echo '<fieldset>
7 <legend>'.$this->Context->GetDefinition('MembershipApplicants').'</legend>
8 '.$this->Get_Warnings().'
9 '.$this->Get_PostBackForm('frmApplicants').'
10 <p>'.$this->Context->GetDefinition('ApplicantsNotes').'</p>
12 <ul>';
13 if ($this->Context->Database->RowCount($this->ApplicantData) > 0) {
14 echo '<li class="CheckController"><p>'.$this->Context->GetDefinition('Check') ." <a href=\"./\" onclick=\"CheckAll('ApplicantID'); return false;\">".$this->Context->GetDefinition('All').'</a>, ' ." <a href=\"./\" onclick=\"CheckNone('ApplicantID'); return false;\">".$this->Context->GetDefinition('None').'</a></p></li>';
16 $ApplicantList = '';
17 $Applicant = $this->Context->ObjectFactory->NewContextObject($this->Context, 'User');
18 while ($Row = $this->Context->Database->GetRow($this->ApplicantData)) {
19 $Applicant->Clear();
20 $Applicant->GetPropertiesFromDataSet($Row);
21 $Applicant->FormatPropertiesForDisplay();
23 $ApplicantList .= '<li class="Enabled">
24 <h3>
25 '.GetDynamicCheckBox(
26 'ApplicantID[]',
27 $Applicant->UserID,
29 '',
30 $Applicant->Name,
31 '',
32 'ApplicantID'.$Applicant->UserID).'
33 <span class="Applied"><a href="'.GetUrl($this->Context->Configuration, 'account.php', '', 'u', $Applicant->UserID).'">'.TimeDiff($this->Context, $Applicant->DateFirstVisit, mktime()).'</a></span>
34 <span class="EmailAddress">'.FormatHyperlink('mailto:'.$Applicant->Email).'</span>';
36 $this->DelegateParameters['Applicant'] = &$Applicant;
37 $this->DelegateParameters['ApplicantList'] = &$ApplicantList;
38 $this->CallDelegate('PostEmailAddress');
40 $ApplicantList .= '</h3>
41 <p>'.$Applicant->Discovery.'</p>
42 </li>';
44 echo $ApplicantList;
45 } else {
46 echo '<li class="NoApplicants"><p>'.$this->Context->GetDefinition('NoApplicants').'</p></li>';
48 echo '</ul>';
49 if ($this->Context->Database->RowCount($this->ApplicantData) > 0) {
50 echo '<div class="Approve">
51 <input type="submit" name="btnSubmit" value="'.$this->Context->GetDefinition('ApproveForMembership').'" class="Button SubmitButton" />
52 <input type="submit" name="btnSubmit" value="'.$this->Context->GetDefinition('DeclineForMembership').'" class="Button SubmitButton" />
53 </div>';
55 echo '</form>
56 </fieldset>
57 </div>';