Made quite a few changes so that the code works in the server
[vanilla-miry.git] / themes / account_role_form.php
blob7477c79f1ac000aae7621c68abf95e258222b6f1
1 <?php
2 // Note: This file is included from the library/Vanilla/Vanilla.Control.AccountRoleForm.php class.
4 if (!$this->Context->Session->User->Permission('PERMISSION_CHANGE_USER_ROLE')) {
5 $this->Context->WarningCollector->Add($this->Context->GetDefinition('PermissionError'));
6 echo '<div id="Form" class="Account Role">
7 '.$this->Get_Warnings().'
8 </div>';
9 } else {
10 $this->PostBackParams->Set('PostBackAction', 'ProcessRole');
11 $this->PostBackParams->Set('u', $this->User->UserID);
12 $Required = $this->Context->GetDefinition('Required');
13 echo '<div id="Form" class="Account Role">
14 <fieldset>
15 <legend>'.$this->Context->GetDefinition('ChangeRole').': '.$this->User->Name.'</legend>
16 '.$this->Get_Warnings().'
17 '.$this->Get_PostBackForm('frmRole').'
18 <ul>
19 <li>
20 <label for="ddRoleID">'.$this->Context->GetDefinition('AssignToRole').' <small>'.$Required.'</small></label>
21 '.$this->RoleSelect->Get().'
22 <p class="Description">'.$this->Context->GetDefinition('AssignToRoleNotes').'</p>
23 </li>
24 <li>
25 <label for="txtNotes">'.$this->Context->GetDefinition('RoleChangeInfo').' <small>'.$Required.'</small></label>
26 <input type="text" name="Notes" id="txtNotes" value="" class="PanelInput" />
27 <p class="Description">'.$this->Context->GetDefinition('RoleChangeInfoNotes').'</p>
28 </li>
29 </ul>
30 <div class="Submit">
31 <input type="submit" name="btnSave" value="'.$this->Context->GetDefinition('ChangeRole').'" class="Button SubmitButton ChangeRoleButton" />
32 <a href="'.GetUrl($this->Context->Configuration, 'account.php', '', 'u', $this->User->UserID).'" class="CancelButton">'.$this->Context->GetDefinition('Cancel').'</a>
33 </div>
34 </form>
35 </fieldset>
36 </div>';