From 3bd0d2779534221af0db22e5b5bc86faaa3b2957 Mon Sep 17 00:00:00 2001 From: Malf Furious Date: Fri, 11 Mar 2016 22:25:00 -0500 Subject: Populate admin setting fields on page load Added logic to set initial state of fields on the setting modal's admin tab --- app/model/common.mod.php | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'app/model/common.mod.php') diff --git a/app/model/common.mod.php b/app/model/common.mod.php index cbcbd4b..a0bf6ae 100644 --- a/app/model/common.mod.php +++ b/app/model/common.mod.php @@ -2,6 +2,7 @@ require_once "model/master.mod.php"; require_once "class/form.class.php"; +require_once "class/setting.class.php"; class CommonModel extends MasterModel { @@ -19,6 +20,26 @@ class CommonModel extends MasterModel return "glyphicon glyphicon-user"; } + /* + * Default action + */ + function common_deflt() + { + global $_SCROTT; + + /* Admin settings tab */ + if ($_SCROTT['settSSL'] != "neither") + { + $this->common_settingAdminSettSSLChecked[$_SCROTT['settSSL']] = "checked"; + $this->common_settingAdminSettSSLDisabled = "disabled"; + } + else + $this->common_settingAdminSettSSLChecked[Setting::settSSL()] = "checked"; + + if (Setting::allowPublicSignup()) + $this->common_settingAdminAllowPublicSignupChecked = "checked"; + } + /* * Handle form submissions from common views */ -- cgit v1.2.3