diff options
author | Simon Rettberg | 2020-10-20 11:01:44 +0200 |
---|---|---|
committer | Simon Rettberg | 2020-10-20 11:01:44 +0200 |
commit | 6e3ddb4d23d8740fa6b6ce8920717a3cd2bb090c (patch) | |
tree | b8f09b9c7612a9bce32b6dca2c9e07c4f575e4cd /modules-available/locationinfo | |
parent | [systemstatus] Add main-warning hook for low disk space (diff) | |
download | slx-admin-6e3ddb4d23d8740fa6b6ce8920717a3cd2bb090c.tar.gz slx-admin-6e3ddb4d23d8740fa6b6ce8920717a3cd2bb090c.tar.xz slx-admin-6e3ddb4d23d8740fa6b6ce8920717a3cd2bb090c.zip |
[baseconfig_bwlp/locationinfo] Add SLX_TTY_SWITCH
This will be used (to be implemented client side) to diallow tty
switching from within the X session, as the exam mode currently already
does.
References #3793
Diffstat (limited to 'modules-available/locationinfo')
8 files changed, 39 insertions, 10 deletions
diff --git a/modules-available/locationinfo/inc/locationinfo.inc.php b/modules-available/locationinfo/inc/locationinfo.inc.php index 5a66f15a..80b8e66a 100644 --- a/modules-available/locationinfo/inc/locationinfo.inc.php +++ b/modules-available/locationinfo/inc/locationinfo.inc.php @@ -126,6 +126,7 @@ class LocationInfo 'browser' => 'slx-browser', 'interactive' => 0, 'bookmarks' => '', + 'allow-tty' => '', ); } return array(); diff --git a/modules-available/locationinfo/inc/locationinfohooks.inc.php b/modules-available/locationinfo/inc/locationinfohooks.inc.php index 15c4dc19..b0596c10 100644 --- a/modules-available/locationinfo/inc/locationinfohooks.inc.php +++ b/modules-available/locationinfo/inc/locationinfohooks.inc.php @@ -61,6 +61,9 @@ class LocationInfoHooks if (!empty($data['bookmarks'])) { ConfigHolder::add('SLX_BROWSER_BOOKMARKS', $data['bookmarks'], 1000); } + if ($data['allow-tty'] === 'yes' || $data['allow-tty'] === 'no') { + ConfigHolder::add('SLX_TTY_SWITCH', $data['allow-tty'], 1000); + } } else { // Not URL panel ConfigHolder::add('SLX_BROWSER_URL', 'http://' . $_SERVER['SERVER_ADDR'] . '/panel/' . $panelUuid); diff --git a/modules-available/locationinfo/lang/de/messages.json b/modules-available/locationinfo/lang/de/messages.json index bcaf687d..fe024d44 100644 --- a/modules-available/locationinfo/lang/de/messages.json +++ b/modules-available/locationinfo/lang/de/messages.json @@ -1,9 +1,5 @@ { "config-saved": "Einstellungen erfolgreich gespeichert.", - "ignored-invalid-end": "Eintrag mit ung\u00fcltiger Endzeit ignoriert", - "ignored-invalid-range": "Eintrag mit ung\u00fcltiger Range ignoriert", - "ignored-invalid-start": "Eintrag mit ung\u00fcltiger Startzeit ignoriert", - "ignored-line-no-days": "Eintrag ohne ausgew\u00e4hlte Tage ignoriert", "invalid-backend-type": "Ung\u00fcltiger Backend-Typ '{{0}}'", "invalid-panel-id": "Ung\u00fcltige Panel-ID '{{0}}'", "invalid-panel-type": "Ung\u00fcltiger Panel-Typ '{{0}}'", diff --git a/modules-available/locationinfo/lang/de/template-tags.json b/modules-available/locationinfo/lang/de/template-tags.json index 42d6c936..443f5ae2 100644 --- a/modules-available/locationinfo/lang/de/template-tags.json +++ b/modules-available/locationinfo/lang/de/template-tags.json @@ -1,5 +1,7 @@ { "lang_addServer": "Server", + "lang_allowTtySwitch": "Wechsel auf Textkonsole erlauben", + "lang_allowTtySwitchTooltip": "Legt fest, ob ein wechsel auf die Textkonsole mittels Strg-Alt-F1 erlaubt ist", "lang_autoScale": "Auto Tage", "lang_autoscaleTooltip": "Berechnet anhand der Bildschirmbreite die optimale Anzahl an Tagen, die der Kalender anzeigt", "lang_backend": "Backend", @@ -36,7 +38,6 @@ "lang_editUrlPanelHints": "Hier k\u00f6nnen Sie konfigurieren, welche URL das Panel aufrufen soll. Dies erm\u00f6glicht Ihnen z.B. in Eingangsbereichen aktuelle Meldungen der Hochschule oder sonstige Webseiten anzuzeigen.", "lang_entryName": "Name", "lang_error": "Fehler", - "lang_expertMode": "Expertenmodus", "lang_for": "f\u00fcr", "lang_fourLocsHint": "Hier k\u00f6nnen Sie bis zu vier Orte ausw\u00e4hlen, die in diesem Panel angezeigt werden.", "lang_free": "Ge\u00f6ffnet", @@ -152,6 +153,7 @@ "lang_urlPanel": "URL-Panel", "lang_urlTooltip": "URL die aufgerufen wird", "lang_urlWhitelist": "Whitelist", + "lang_useDefault": "Vorgabe f\u00fcr Raum\/Rechner verwenden", "lang_useRoomplanner": "Rechner z\u00e4hlen", "lang_vertical": "Vertikaler Modus", "lang_verticalTooltip": "Legt fest, ob Kalender und Raum \u00fcbereinander angezeigt werden sollen", diff --git a/modules-available/locationinfo/lang/en/messages.json b/modules-available/locationinfo/lang/en/messages.json index 5111a408..c459f1ee 100644 --- a/modules-available/locationinfo/lang/en/messages.json +++ b/modules-available/locationinfo/lang/en/messages.json @@ -1,9 +1,5 @@ { "config-saved": "Config successfully saved.", - "ignored-invalid-end": "Ignored entry with invalid end time", - "ignored-invalid-range": "Ignored entry with invalid range", - "ignored-invalid-start": "Ignored entry with invalid start time", - "ignored-line-no-days": "Ignored entry with no days selected", "invalid-backend-type": "Invalid backend type '{{0}}'", "invalid-panel-id": "Invalid panel id '{{0}}'", "invalid-panel-type": "Invalid panel type '{{0}}'", diff --git a/modules-available/locationinfo/lang/en/template-tags.json b/modules-available/locationinfo/lang/en/template-tags.json index c95208af..0ebae3f9 100644 --- a/modules-available/locationinfo/lang/en/template-tags.json +++ b/modules-available/locationinfo/lang/en/template-tags.json @@ -1,5 +1,7 @@ { "lang_addServer": "Server", + "lang_allowTtySwitch": "Allow switching to text console", + "lang_allowTtySwitchTooltip": "Set whether the user can switch to the text console via Ctrl-Alt-F1", "lang_autoScale": "Auto Days", "lang_autoscaleTooltip": "Calculates the optimum amount of days to show from the display width", "lang_backend": "Backend", @@ -36,7 +38,6 @@ "lang_editUrlPanelHints": "Here you can define which URL is opened by the panel. This enables you to show news about your university or any other website.", "lang_entryName": "Name", "lang_error": "Error", - "lang_expertMode": "Expert mode", "lang_for": "for", "lang_fourLocsHint": "You can pick up to four locations that will be shown in this panel.", "lang_free": "Open", @@ -152,6 +153,7 @@ "lang_urlPanel": "URL panel", "lang_urlTooltip": "URL which is shown by the panel", "lang_urlWhitelist": "Whitelist", + "lang_useDefault": "Use setting from location\/machine", "lang_useRoomplanner": "Count PCs", "lang_vertical": "Vertical mode", "lang_verticalTooltip": "Defines whether the room and calendar are shown above each other", diff --git a/modules-available/locationinfo/page.inc.php b/modules-available/locationinfo/page.inc.php index 8032642d..845398f0 100644 --- a/modules-available/locationinfo/page.inc.php +++ b/modules-available/locationinfo/page.inc.php @@ -356,6 +356,7 @@ class Page_LocationInfo extends Page 'browser' => Request::post('browser', 'slx-browser', 'string'), 'interactive' => Request::post('interactive', '0', 'bool'), 'bookmarks' => $bookmarkString ? $bookmarkString : '', + 'allow-tty' => Request::post('allow-tty', '', 'string'), ); return array('config' => $conf, 'locationids' => []); } @@ -982,6 +983,7 @@ class Page_LocationInfo extends Page 'browser' => $config['browser'], 'interactive_checked' => $config['interactive'] ? 'checked' : '', 'bookmarks' => $bookmarksArray, + 'allow-tty_' . $config['allow-tty'] . '_checked' => 'checked', )); } else { Render::addTemplate('page-config-panel-summary', array( diff --git a/modules-available/locationinfo/templates/page-config-panel-url.html b/modules-available/locationinfo/templates/page-config-panel-url.html index 86915729..8d4d7148 100644 --- a/modules-available/locationinfo/templates/page-config-panel-url.html +++ b/modules-available/locationinfo/templates/page-config-panel-url.html @@ -71,6 +71,33 @@ <div class="list-group-item"> <div class="row"> <div class="col-sm-3"> + <label>{{lang_allowTtySwitch}}</label> + </div> + <div class="col-sm-7"> + <div class="radio"> + <input id="tty1" type="radio" name="allow-tty" {{allow-tty__checked}} value=""> + <label for="tty1">{{lang_useDefault}}</label> + </div> + <div class="radio"> + <input id="tty2" type="radio" name="allow-tty" {{allow-tty_yes_checked}} value="yes"> + <label for="tty2">{{lang_yes}}</label> + </div> + <div class="radio"> + <input id="tty3" type="radio" name="allow-tty" {{allow-tty_no_checked}} value="no"> + <label for="tty3">{{lang_no}}</label> + </div> + </div> + <div class="col-sm-2"> + <p class="btn btn-static helptext" title="{{lang_allowTtySwitchTooltip}}"> + <span class="glyphicon glyphicon-question-sign"></span> + </p> + </div> + </div> + </div> + + <div class="list-group-item"> + <div class="row"> + <div class="col-sm-3"> <label for="input-reload">{{lang_reloadIntervalMins}}</label> </div> <div class="col-sm-7"> |