diff options
author | Malf Furious <m@lfurio.us> | 2016-03-11 22:25:00 -0500 |
---|---|---|
committer | Malf Furious <m@lfurio.us> | 2016-03-27 20:16:32 -0400 |
commit | 3bd0d2779534221af0db22e5b5bc86faaa3b2957 (patch) | |
tree | f51a1466cdadae7a8768e68607caf38bb76cc57e /app/model/common.mod.php | |
parent | 2bf97f71f42bc68b076114834cc65466e9133b9c (diff) | |
download | scrott-3bd0d2779534221af0db22e5b5bc86faaa3b2957.tar.gz scrott-3bd0d2779534221af0db22e5b5bc86faaa3b2957.zip |
Populate admin setting fields on page load
Added logic to set initial state of fields on the setting modal's admin tab
Diffstat (limited to 'app/model/common.mod.php')
-rw-r--r-- | app/model/common.mod.php | 21 |
1 files changed, 21 insertions, 0 deletions
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 { @@ -20,6 +21,26 @@ class CommonModel extends MasterModel } /* + * 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 */ function common_handleFormSubmissions($input) |