summaryrefslogtreecommitdiffstats
path: root/inc
diff options
context:
space:
mode:
authorSimon Rettberg2019-10-17 15:55:05 +0200
committerSimon Rettberg2019-10-17 15:55:05 +0200
commit0064f98651c627387115e84e7632f9eceff5d4c3 (patch)
treebf06e04bc6bde06f322631945be7b7d5ec5108db /inc
parent[serversetup-bwlp-ipxe/minilinux] Further improvements (diff)
downloadslx-admin-0064f98651c627387115e84e7632f9eceff5d4c3.tar.gz
slx-admin-0064f98651c627387115e84e7632f9eceff5d4c3.tar.xz
slx-admin-0064f98651c627387115e84e7632f9eceff5d4c3.zip
[serversetup-bwlp-ipxe] UI/UX tweaks
* Decluttered bootentry View in menu editor * Show details for hook bootentry in menu editor * Buttons for "save and reload" in menu/bootentry editor
Diffstat (limited to 'inc')
-rw-r--r--inc/util.inc.php12
1 files changed, 12 insertions, 0 deletions
diff --git a/inc/util.inc.php b/inc/util.inc.php
index 06cd8981..3d912f80 100644
--- a/inc/util.inc.php
+++ b/inc/util.inc.php
@@ -513,6 +513,18 @@ SADFACE;
}
/**
+ * Return localized strings for yes or no depending on $bool
+ * @param bool $bool Input to evaluate
+ * @return string Yes or No, in user's selected language
+ */
+ public static function boolToString($bool)
+ {
+ if ($bool)
+ return Dictionary::translate('lang_yes', true);
+ return Dictionary::translate('lang_no', true);
+ }
+
+ /**
* Format a duration, in seconds, into a readable string.
* @param int $seconds The number to format
* @param int $showSecs whether to show seconds, or rather cut after minutes