Made quite a few changes so that the code works in the server
[vanilla-miry.git] / themes / settings_language_form.php
blob359b51f68cb7c8693c3181522a51258785f96709
1 <?php
2 // Note: This file is included from the library/Vanilla/Vanilla.Control.LanguageForm.php control.
4 if (!$this->Context->Session->User->Permission('PERMISSION_MANAGE_LANGUAGE')) {
5 $this->Context->WarningCollector->Add($this->Context->GetDefinition('PermissionError'));
6 echo '<div class="SettingsForm">
7 '.$this->Get_Warnings().'
8 </div>';
9 } else {
10 $this->PostBackParams->Set('PostBackAction', 'ProcessLanguageChange');
11 echo '<div id="Form" class="Account Identity">';
12 if ($this->PostBackValidated) echo '<div id="Success">'.$this->Context->GetDefinition('LanguageChangesSaved').'</div>';
13 echo '<fieldset>
14 <legend>'.$this->Context->GetDefinition('LanguageManagement').'</legend>
15 '.$this->Get_Warnings().'
16 '.$this->Get_PostBackForm('frmLanguageChange').'
17 <ul>
18 <li>
19 <label for="ddLanguage">'.$this->Context->GetDefinition('ChangeLanguage').'</label>
20 '.$this->LanguageSelect->Get().'
21 <p class="Description">'.$this->Context->GetDefinition('ChangeLanguageNotes').'</p>
22 </li>
23 </ul>
24 <div class="Submit">
25 <input type="submit" name="btnSave" value="'.$this->Context->GetDefinition('Save').'" class="Button SubmitButton" />
26 <a href="'.GetUrl($this->Context->Configuration, $this->Context->SelfUrl).'" class="CancelButton">'.$this->Context->GetDefinition('Cancel').'</a>
27 </div>
28 </form>
29 </fieldset>
30 </div>';