commiting uncommited changes on live site
[weblabels.fsf.org.git] / crm.fsf.org / 20131203 / files / sites / all / modules-old / civicrm / templates / CRM / Admin / Form / Setting / versionCheckOptions.js
1 // https://civicrm.org/licensing
2 CRM.$(function($) {
3 'use strict';
4 $(document)
5 .off('.crmVersionCheckOptions')
6 .on('click.crmVersionCheckOptions', 'a.crm-setVersionCheckIgnoreDate', function(e) {
7 var isSecurity = !($(this).closest('.ui-notify-message').hasClass('info'));
8 var msg = '<p>' + ts('This will suppress notifications about all currently available updates.') + ' ';
9 if (isSecurity) {
10 msg += ts('Notifications will resume when a new security advisory is published.') +
11 '</p><p>' +
12 ts('Warning: Do this only if you have already taken alternate steps to ensure your site is secure.');
13 } else {
14 msg += ts('Notifications will resume when a new release is published.');
15 }
16 msg += '</p>';
17 CRM.confirm({message: msg, title: $(this).text()})
18 .on('crmConfirm:yes', function() {
19 CRM.api3('setting', 'create', {versionCheckIgnoreDate: new Date().toISOString().slice(0,10)}, true);
20 CRM.closeAlertByChild('a.crm-setVersionCheckIgnoreDate');
21 });
22 e.preventDefault();
23 });
24 });