diff options
-rw-r--r-- | app/model/common.mod.php | 21 | ||||
-rw-r--r-- | app/view/common/setting.modal.view.php | 8 |
2 files changed, 25 insertions, 4 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) diff --git a/app/view/common/setting.modal.view.php b/app/view/common/setting.modal.view.php index 0735e3f..909eead 100644 --- a/app/view/common/setting.modal.view.php +++ b/app/view/common/setting.modal.view.php @@ -95,21 +95,21 @@ <label>HTTP(S)</label> <div class="radio"> <label> - <input type="radio" name="input[settSSL]" value="force" /> + <input type="radio" name="input[settSSL]" value="force" <?=$mod->common_settingAdminSettSSLChecked['force']?> <?=$mod->common_settingAdminSettSSLDisabled?> /> Always Force SSL </label> </div> <div class="radio"> <label> - <input type="radio" name="input[settSSL]" value="neither" /> + <input type="radio" name="input[settSSL]" value="neither" <?=$mod->common_settingAdminSettSSLChecked['neither']?> <?=$mod->common_settingAdminSettSSLDisabled?> /> Neither </label> </div> <div class="radio"> <label> - <input type="radio" name="input[settSSL]" value="forbid" /> + <input type="radio" name="input[settSSL]" value="forbid" <?=$mod->common_settingAdminSettSSLChecked['forbid']?> <?=$mod->common_settingAdminSettSSLDisabled?> /> Always Forbid SSL </label> </div> @@ -118,7 +118,7 @@ <label>Access</label> <div class="checkbox"> <label> - <input type="checkbox" name="input[allowPublicSignup]" value="true" /> Allow anyone to create an account + <input type="checkbox" name="input[allowPublicSignup]" value="true" <?=$mod->common_settingAdminAllowPublicSignupChecked?> /> Allow anyone to create an account </label> </div> |