X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FAdmin%2FForm%2FSetting.php;h=f7ed1b624651a5f2baa5b4c7d5fc03bc975da219;hb=18a3fc9e5548ef6333a8bb28551dd1debe274c8a;hp=2ee28af44a1df8dcfbdc235173021affc9b4b495;hpb=4e991547de8ccf4aef81b4579521f4bb26022978;p=civicrm-core.git diff --git a/CRM/Admin/Form/Setting.php b/CRM/Admin/Form/Setting.php index 2ee28af44a..f7ed1b6246 100644 --- a/CRM/Admin/Form/Setting.php +++ b/CRM/Admin/Form/Setting.php @@ -105,6 +105,11 @@ class CRM_Admin_Form_Setting extends CRM_Core_Form { else { $options = NULL; } + //Load input as readonly whose values are overridden in civicrm.settings.php. + if (Civi::settings()->getMandatory($setting)) { + $props['html_attributes']['readonly'] = TRUE; + $setStatus = TRUE; + } $add = 'add' . $props['quick_form_type']; if ($add == 'addElement') { @@ -147,6 +152,9 @@ class CRM_Admin_Form_Setting extends CRM_Core_Form { } } + if (!empty($setStatus)) { + CRM_Core_Session::setStatus(ts("Some fields are loaded as 'readonly' as they have been set (overridden) in civicrm.settings.php."), '', 'info', array('expires' => 0)); + } // setting_description should be deprecated - see Mail.tpl for metadata based tpl. $this->assign('setting_descriptions', $descriptions); $this->assign('settings_fields', $settingMetaData);