Extension BlogThis: Added translation support
[vanilla-miry.git] / themes / account_password_form.php
blob518ca56110e99d08b1398139132394e131fcf191
1 <?php
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().'
8 </div>';
9 } else {
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">
14 <fieldset>
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');
24 echo '<ul>
25 <li>
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>
29 </li>
30 <li>
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>
34 </li>
35 <li>
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>
39 </li>
40 </ul>';
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>
47 </div>
48 </form>
49 </fieldset>
50 </div>';