'recentItemsProviders' => CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME,
'dedupe_default_limit' => CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME,
'remote_profile_submissions' => CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME,
+ 'allow_alert_autodismissal' => CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME,
);
public $_uploadMaxSize;
'filters' => self::getEntityRefFilters(),
),
'ajaxPopupsEnabled' => self::singleton()->ajaxPopupsEnabled,
+ 'allowAlertAutodismissal' => Civi::settings()->get('allow_alert_autodismissal'),
);
print CRM_Core_Smarty::singleton()->fetchWith('CRM/common/l10n.js.tpl', $vars);
CRM_Utils_System::civiExit();
'description' => 'If enabled, CiviCRM will permit submissions from external sites to profiles. This is disabled by default to limit abuse.',
'help_text' => '',
),
+ 'allow_alert_autodismissal' => array(
+ 'group_name' => 'CiviCRM Preferences',
+ 'group' => 'core',
+ 'name' => 'allow_alert_autodismissal',
+ 'type' => 'Boolean',
+ 'quick_form_type' => 'YesNo',
+ 'default' => '1',
+ 'html_type' => 'radio',
+ 'add' => '4.7',
+ 'title' => 'Allow alerts to auto-dismiss?',
+ 'is_domain' => 1,
+ 'is_contact' => 0,
+ 'description' => 'If disabled, alert messages in CiviCRM will never be automatically dismissed after 10 seconds.',
+ 'help_text' => '',
+ ),
'editor_id' => array(
'group_name' => 'CiviCRM Preferences',
'group' => 'core',
unique: true
};
options = $.extend(extra, options);
- options.expires = options.expires === false ? 0 : parseInt(options.expires, 10);
+ options.expires = (options.expires === false || !CRM.config.allowAlertAutodismissal) ? 0 : parseInt(options.expires, 10);
if (options.unique && options.unique !== '0') {
$('#crm-notification-container .ui-notify-message').each(function () {
if (title === $('h1', this).html() && text === $('.notify-content', this).html()) {
'description' => 'If enabled, CiviCRM will permit submissions from external sites to profiles. This is disabled by default to limit abuse.',
'help_text' => NULL,
),
+ 'allow_alert_autodismissal' => array(
+ 'group_name' => 'CiviCRM Preferences',
+ 'group' => 'core',
+ 'name' => 'allow_alert_autodismissal',
+ 'type' => 'Boolean',
+ 'quick_form_type' => 'YesNo',
+ 'default' => TRUE,
+ 'html_type' => 'radio',
+ 'add' => '4.7',
+ 'title' => 'Allow alerts to auto-dismiss?',
+ 'is_domain' => 1,
+ 'is_contact' => 0,
+ 'description' => 'If disabled, CiviCRM will not automatically dismiss any alerts after 10 seconds.',
+ 'help_text' => NULL,
+ ),
'editor_id' => array(
'group_name' => 'CiviCRM Preferences',
'group' => 'core',
<p class="description">{ts}If enabled, CiviCRM will allow users to submit profiles from external sites. This is disabled by default to limit abuse.{/ts}</p>
</td>
</tr>
+ <tr class="crm-miscellaneous-form-block-allow_alert_autodismissal">
+ <td class="label">{$form.allow_alert_autodismissal.label}</td>
+ <td>{$form.allow_alert_autodismissal.html}<br />
+ <p class="description">{ts}If disabled, CiviCRM will not automatically dismiss any alerts after 10 seconds.{/ts}</p>
+ </td>
+ </tr>
</table>
<h3>{ts}reCAPTCHA Keys{/ts}</h3>
$.datepicker._defaults.dateFormat = CRM.config.dateInputFormat = {$config->dateInputFormat|@json_encode};
CRM.config.timeIs24Hr = {if $config->timeInputFormat eq 2}true{else}false{/if};
CRM.config.ajaxPopupsEnabled = {$ajaxPopupsEnabled|@json_encode};
+ CRM.config.allowAlertAutodismissal = {$allowAlertAutodismissal};
// Merge entityRef settings
CRM.config.entityRef = $.extend({ldelim}{rdelim}, {$entityRef|@json_encode}, CRM.config.entityRef || {ldelim}{rdelim});
-<div id="crm-notification-container" style="display:none">
+<div id="crm-notification-container" role="alert" aria-live="assertive" aria-atomic=”true” style="display:none">
<div id="crm-notification-alert" class="#{ldelim}type{rdelim}">
<div class="icon ui-notify-close" title="{ts}close{/ts}"> </div>
<a class="ui-notify-cross ui-notify-close" href="#" title="{ts}close{/ts}">x</a>