2 // Note: This file is included from the library/Vanilla/Vanilla.Control.IdentityForm.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 Identity">
7 '.$this->Get_Warnings().'
10 $this->PostBackParams
->Set('PostBackAction', 'ProcessIdentity');
11 $this->PostBackParams
->Set('u', $this->User
->UserID
);
12 $this->PostBackParams
->Set('LabelValuePairCount', (count($this->User
->Attributes
) > 0?
count($this->User
->Attributes
):1), 1, 'LabelValuePairCount');
13 $Required = $this->Context
->GetDefinition('Required');
14 echo '<div id="Form" class="Account Identity">
16 <legend>'.$this->Context
->GetDefinition('ChangePersonalInfo').'</legend>';
18 $this->CallDelegate('PreWarningsRender');
20 echo $this->Get_Warnings()
21 .$this->Get_PostBackForm('frmAccountPersonal');
23 $this->CallDelegate('PreInputsRender');
25 echo '<h2>'.$this->Context
->GetDefinition('DefineYourAccountProfile').'</h2>
27 if ($this->Context
->Configuration
['ALLOW_NAME_CHANGE'] == "1") {
29 <label for="txtUsername">'.$this->Context
->GetDefinition('YourUsername').' <small>'.$Required.'</small></label>
30 <input type="text" name="Name" value="'.$this->User
->Name
.'" maxlength="20" class="SmallInput" id="txtUsername" />
31 <p class="Description">'.$this->Context
->GetDefinition('YourUsernameNotes').'</p>
34 if ($this->Context
->Configuration
['USE_REAL_NAMES'] == "1") {
36 <label for="txtFirstName">'.$this->Context
->GetDefinition('YourFirstName').'</label>
37 <input type="text" name="FirstName" value="'.$this->User
->FirstName
.'" maxlength="50" class="SmallInput" id="txtFirstName" />
38 <p class="Description">'.$this->Context
->GetDefinition('YourFirstNameNotes').'</p>
41 <label for="txtLastName">'.$this->Context
->GetDefinition('YourLastName').'</label>
42 <input type="text" name="LastName" value="'.$this->User
->LastName
.'" maxlength="50" class="SmallInput" id="txtLastName" />
43 <p class="Description">
44 '.$this->Context
->GetDefinition('YourLastNameNotes').'
45 <span>'.GetDynamicCheckBox('ShowName', 1, $this->User
->ShowName
, '', $this->Context
->GetDefinition('MakeRealNameVisible')).'</span>
49 if ($this->Context
->Configuration
['ALLOW_EMAIL_CHANGE'] == '1') {
51 <label for="txtEmail">'.$this->Context
->GetDefinition('YourEmailAddress').' <small>'.$Required.'</small></label>
52 <input type="text" name="Email" value="'.$this->User
->Email
.'" maxlength="200" class="SmallInput" id="txtEmail" />
53 <p class="Description">
54 '.$this->Context
->GetDefinition('YourEmailAddressNotes').'
55 <span>'.GetDynamicCheckBox('UtilizeEmail', 1, $this->User
->UtilizeEmail
, '', $this->Context
->GetDefinition('CheckForVisibleEmail')).'</span>
60 <p class="Description">
61 <span>'.GetDynamicCheckBox('UtilizeEmail', 1, $this->User
->UtilizeEmail
, '', $this->Context
->GetDefinition('CheckForVisibleEmail')).'</span>
66 <label for="txtPicture">'.$this->Context
->GetDefinition('AccountPicture').'</label>
67 <input type="text" name="Picture" value="'.$this->User
->Picture
.'" maxlength="255" class="SmallInput" id="txtPicture" />
68 <p class="Description">
69 '.$this->Context
->GetDefinition('AccountPictureNotes').'
73 <label for="txtIcon">'.$this->Context
->GetDefinition('Icon').'</label>
74 <input type="text" name="Icon" value="'.$this->User
->Icon
.'" maxlength="255" class="SmallInput" id="txtIcon" />
75 <p class="Description">
76 '.$this->Context
->GetDefinition('IconNotes').'
81 // Add the extension customization settings
83 while (list($Key, $Value) = each($this->Context
->Configuration
)) {
84 if (strpos($Key, 'CUSTOMIZATION_') !== false) {
85 $Description = $this->Context
->GetDefinition($Key.'_DESCRIPTION');
86 $Customizations .= '<li>
87 <label for="'.$Key.'">'.$this->Context
->GetDefinition($Key).'</label>
88 <input id="'.$Key.'" type="text" name="'.$Key.'" value="'.ForceIncomingString($Key, $this->User
->Customization($Key)).'" maxlength="255" class="SmallInput" />
89 '.($Description != $Key.'_DESCRIPTION' ?
'<p class="Description">'.$Description.'</p>' : '').'
93 // If some customizations were found, write them out now
94 if ($Customizations != '') {
95 echo '<h2>'.$this->Context
->GetDefinition('OtherSettings').'</h2>
101 $this->CallDelegate('PreCustomInputsRender');
103 echo '<h2>'.$this->Context
->GetDefinition('AddCustomInformation').'</h2>
104 <p class="Description">'.$this->Context
->GetDefinition('AddCustomInformationNotes').'</p>
105 <ul id="CustomInfo" class="clearfix">';
107 if (count($this->User
->Attributes
) > 0) {
108 $AttributeCount = count($this->User
->Attributes
);
109 for ($i = 0; $i < $AttributeCount; $i++
) {
111 echo '<li>'.$this->Context
->GetDefinition('Label').'</li>
112 <li>'.$this->Context
->GetDefinition('Value').'</li>';
114 echo '<li><input type="text" name="Label'.$CurrentItem.'" value="'.$this->User
->Attributes
[$i]['Label'].'" maxlength="20" class="LVLabelInput" /></li>
115 <li><input type="text" name="Value'.$CurrentItem.'" value="'.$this->User
->Attributes
[$i]['Value'].'" maxlength="200" class="LVValueInput" /></li>';
119 echo '<li>'.$this->Context
->GetDefinition('Label').'</li>
120 <li>'.$this->Context
->GetDefinition('Value').'</li>
121 <li><input type="text" name="Label'.$CurrentItem.'" value="" maxlength="20" class="LVLabelInput" /></li>
122 <li><input type="text" name="Value'.$CurrentItem.'" value="" maxlength="200" class="LVValueInput" /></li>';
126 $this->CallDelegate('PreButtonsRender');
128 echo '<p><a href="javascript:AddLabelValuePair();">'.$this->Context
->GetDefinition('AddLabelValuePair').'</a></p>
130 <input type="submit" name="btnSave" value="'.$this->Context
->GetDefinition('Save').'" class="Button SubmitButton" />
131 <a href="'.GetUrl($this->Context
->Configuration
, 'account.php', '', 'u', $this->User
->UserID
).'" class="CancelButton">'.$this->Context
->GetDefinition('Cancel').'</a>