2 // Note: This file is included from the library/Vanilla/Vanilla.Control.PasswordForm.php class.
4 if ($this->Context
->Session
->UserID
!= $this->User
->UserID
&& !$this->Context
->Session
->User
->Permission('PERMISSION_EDIT_USERS')) {
5 $this->Context
->WarningCollector
->Add($this->Context
->GetDefinition('PermissionError'));
6 echo '<div id="Form" class="Account Password">
7 '.$this->Get_Warnings().'
10 $this->PostBackParams
->Set('PostBackAction', 'ProcessPassword');
11 $this->PostBackParams
->Set('u', $this->User
->UserID
);
12 $Required = $this->Context
->GetDefinition('Required');
13 echo '<div id="Form" class="Account Password">
15 <legend>'.$this->Context
->GetDefinition('ChangeYourPassword').'</legend>';
17 $this->CallDelegate('PreWarningsRender');
19 echo $this->Get_Warnings()
20 .$this->Get_PostBackForm('frmAccountPassword');
22 $this->CallDelegate('PreInputsRender');
26 <label for="txtOldPassword">'.$this->Context
->GetDefinition('YourOldPassword').' <small>'.$Required.'</small></label>
27 <input type="password" name="OldPassword" value="'.$this->User
->OldPassword
.'" maxlength="100" class="SmallInput" id="txtOldPassword" />
28 <p class="Description">'.$this->Context
->GetDefinition('YourOldPasswordNotes').'</p>
31 <label for="txtNewPassword">'.$this->Context
->GetDefinition('YourNewPassword').' <small>'.$Required.'</small></label>
32 <input type="password" name="NewPassword" value="'.$this->User
->NewPassword
.'" maxlength="100" class="SmallInput" id="txtNewPassword" />
33 <p class="Description">'.$this->Context
->GetDefinition('YourNewPasswordNotes').'</p>
36 <label for="txtConfirmPassword">'.$this->Context
->GetDefinition('YourNewPasswordAgain').' <small>'.$Required.'</small></label>
37 <input type="password" name="ConfirmPassword" value="'.$this->User
->ConfirmPassword
.'" maxlength="100" class="SmallInput" id="txtConfirmPassword" />
38 <p class="Description">'.$this->Context
->GetDefinition('YourNewPasswordAgainNotes').'</p>
42 $this->CallDelegate('PreButtonsRender');
44 echo '<div class="Submit">
45 <input type="submit" name="btnSave" value="'.$this->Context
->GetDefinition('Save').'" class="Button SubmitButton" />
46 <a href="'.GetUrl($this->Context
->Configuration
, "account.php", "", "u", $this->User
->UserID
).'" class="CancelButton">'.$this->Context
->GetDefinition('Cancel').'</a>