Display confirmation modal when disabling a connected Google Calendar Sync (#955).

This commit is contained in:
Alex Tselegidis 2020-12-12 14:22:25 +02:00
parent ccd63eabe4
commit 731fb52ab4
30 changed files with 67 additions and 22 deletions

View file

@ -1,4 +1,4 @@
<?php <?php defined('BASEPATH') OR exit('No direct script access allowed');
// Arabic // Arabic
$lang['page_title'] = 'احجز موعد مع'; $lang['page_title'] = 'احجز موعد مع';
$lang['service_and_provider'] = 'اختر الخدمة والمزود'; $lang['service_and_provider'] = 'اختر الخدمة والمزود';
@ -60,6 +60,7 @@ $lang['log_out'] = 'تسجيل الخروج';
$lang['synchronize'] = 'المزامنة'; $lang['synchronize'] = 'المزامنة';
$lang['enable_sync'] = 'تمكين المزامنة'; $lang['enable_sync'] = 'تمكين المزامنة';
$lang['disable_sync'] = 'تعطيل المزامنة'; $lang['disable_sync'] = 'تعطيل المزامنة';
$lang['disable_sync_prompt'] = 'Are you sure that you want to disable the calendar synchronization?';
$lang['reload'] = 'اعادة التحميل'; $lang['reload'] = 'اعادة التحميل';
$lang['appointment'] = 'الموعد'; $lang['appointment'] = 'الموعد';
$lang['unavailable'] = 'غير متوفر'; $lang['unavailable'] = 'غير متوفر';

View file

@ -60,6 +60,7 @@ $lang['log_out'] = 'Изход';
$lang['synchronize'] = 'синхронизиране'; $lang['synchronize'] = 'синхронизиране';
$lang['enable_sync'] = 'Активиране на синхронизиране'; $lang['enable_sync'] = 'Активиране на синхронизиране';
$lang['disable_sync'] = 'Изключване на синхронизиране'; $lang['disable_sync'] = 'Изключване на синхронизиране';
$lang['disable_sync_prompt'] = 'Are you sure that you want to disable the calendar synchronization?';
$lang['reload'] = 'Презареждане'; $lang['reload'] = 'Презареждане';
$lang['appointment'] = 'Час'; $lang['appointment'] = 'Час';
$lang['unavailable'] = 'не е на лице'; $lang['unavailable'] = 'не е на лице';

View file

@ -62,6 +62,7 @@ $lang['log_out'] = 'Sortida';
$lang['synchronize'] = 'Sincronitza'; $lang['synchronize'] = 'Sincronitza';
$lang['enable_sync'] = 'Permet Sync'; $lang['enable_sync'] = 'Permet Sync';
$lang['disable_sync'] = 'No permetis Sync'; $lang['disable_sync'] = 'No permetis Sync';
$lang['disable_sync_prompt'] = 'Are you sure that you want to disable the calendar synchronization?';
$lang['reload'] = 'Recarrega'; $lang['reload'] = 'Recarrega';
$lang['appointment'] = 'Cita'; $lang['appointment'] = 'Cita';
$lang['unavailable'] = 'No disponible'; $lang['unavailable'] = 'No disponible';

View file

@ -60,6 +60,7 @@ $lang['log_out'] = '注销';
$lang['synchronize'] = '同步'; $lang['synchronize'] = '同步';
$lang['enable_sync'] = '开启同步'; $lang['enable_sync'] = '开启同步';
$lang['disable_sync'] = '关闭同步'; $lang['disable_sync'] = '关闭同步';
$lang['disable_sync_prompt'] = 'Are you sure that you want to disable the calendar synchronization?';
$lang['reload'] = '刷新'; $lang['reload'] = '刷新';
$lang['appointment'] = '预约'; $lang['appointment'] = '预约';
$lang['unavailable'] = '不可用'; $lang['unavailable'] = '不可用';

View file

@ -62,6 +62,7 @@ $lang['log_out'] = 'Odhlášení';
$lang['synchronize'] = 'Synchronizace'; $lang['synchronize'] = 'Synchronizace';
$lang['enable_sync'] = 'Povolit synchronizaci'; $lang['enable_sync'] = 'Povolit synchronizaci';
$lang['disable_sync'] = 'Zakázat synchronizaci'; $lang['disable_sync'] = 'Zakázat synchronizaci';
$lang['disable_sync_prompt'] = 'Are you sure that you want to disable the calendar synchronization?';
$lang['reload'] = 'Obnovit'; $lang['reload'] = 'Obnovit';
$lang['appointment'] = 'Schůzka'; $lang['appointment'] = 'Schůzka';
$lang['unavailable'] = 'Nedostupnost'; $lang['unavailable'] = 'Nedostupnost';

View file

@ -60,6 +60,7 @@ $lang['log_out'] = 'Log ud';
$lang['synchronize'] = 'Synkroniser'; $lang['synchronize'] = 'Synkroniser';
$lang['enable_sync'] = 'Aktivere'; $lang['enable_sync'] = 'Aktivere';
$lang['disable_sync'] = 'Deaktivere'; $lang['disable_sync'] = 'Deaktivere';
$lang['disable_sync_prompt'] = 'Are you sure that you want to disable the calendar synchronization?';
$lang['reload'] = 'Opdater'; $lang['reload'] = 'Opdater';
$lang['appointment'] = 'Aftale'; $lang['appointment'] = 'Aftale';
$lang['unavailable'] = 'Ikke tilgængelig'; $lang['unavailable'] = 'Ikke tilgængelig';

View file

@ -60,6 +60,7 @@ $lang['log_out'] = 'Afmelden';
$lang['synchronize'] = 'Synchroniseren'; $lang['synchronize'] = 'Synchroniseren';
$lang['enable_sync'] = 'Synchronisatie inschakelen'; $lang['enable_sync'] = 'Synchronisatie inschakelen';
$lang['disable_sync'] = 'Synchronisatie uitschakelen'; $lang['disable_sync'] = 'Synchronisatie uitschakelen';
$lang['disable_sync_prompt'] = 'Are you sure that you want to disable the calendar synchronization?';
$lang['reload'] = 'Herladen'; $lang['reload'] = 'Herladen';
$lang['appointment'] = 'Afspraak'; $lang['appointment'] = 'Afspraak';
$lang['unavailable'] = 'Niet beschikbaar'; $lang['unavailable'] = 'Niet beschikbaar';

View file

@ -65,6 +65,7 @@ $lang['log_out'] = 'Log Out';
$lang['synchronize'] = 'Synchronize'; $lang['synchronize'] = 'Synchronize';
$lang['enable_sync'] = 'Enable Sync'; $lang['enable_sync'] = 'Enable Sync';
$lang['disable_sync'] = 'Disable Sync'; $lang['disable_sync'] = 'Disable Sync';
$lang['disable_sync_prompt'] = 'Are you sure that you want to disable the calendar synchronization?';
$lang['reload'] = 'Reload'; $lang['reload'] = 'Reload';
$lang['appointment'] = 'Appointment'; $lang['appointment'] = 'Appointment';
$lang['unavailable'] = 'Unavailable'; $lang['unavailable'] = 'Unavailable';

View file

@ -60,6 +60,7 @@ $lang['log_out'] = 'Kirjaudu ulos';
$lang['synchronize'] = 'Synkronoi'; $lang['synchronize'] = 'Synkronoi';
$lang['enable_sync'] = 'Aktivoi synkronointi'; $lang['enable_sync'] = 'Aktivoi synkronointi';
$lang['disable_sync'] = 'Poista synkronointi'; $lang['disable_sync'] = 'Poista synkronointi';
$lang['disable_sync_prompt'] = 'Are you sure that you want to disable the calendar synchronization?';
$lang['reload'] = 'Lataa uudelleen'; $lang['reload'] = 'Lataa uudelleen';
$lang['appointment'] = 'Varaus'; $lang['appointment'] = 'Varaus';
$lang['unavailable'] = 'Poissaolo'; $lang['unavailable'] = 'Poissaolo';

View file

@ -64,6 +64,7 @@ $lang['log_out'] = 'Déconnexion';
$lang['synchronize'] = 'Synchronisation'; $lang['synchronize'] = 'Synchronisation';
$lang['enable_sync'] = 'Activer la synchronisation'; $lang['enable_sync'] = 'Activer la synchronisation';
$lang['disable_sync'] = 'Désactiver la synchronisation'; $lang['disable_sync'] = 'Désactiver la synchronisation';
$lang['disable_sync_prompt'] = 'Are you sure that you want to disable the calendar synchronization?';
$lang['reload'] = 'Actualiser'; $lang['reload'] = 'Actualiser';
$lang['appointment'] = 'Rendez-vous'; $lang['appointment'] = 'Rendez-vous';
$lang['unavailable'] = 'Indisponible'; $lang['unavailable'] = 'Indisponible';

View file

@ -63,6 +63,7 @@ $lang['log_out'] = 'Abmelden';
$lang['synchronize'] = 'Synchronisieren'; $lang['synchronize'] = 'Synchronisieren';
$lang['enable_sync'] = 'Sync einschalten'; $lang['enable_sync'] = 'Sync einschalten';
$lang['disable_sync'] = 'Sync ausschalten'; $lang['disable_sync'] = 'Sync ausschalten';
$lang['disable_sync_prompt'] = 'Are you sure that you want to disable the calendar synchronization?';
$lang['reload'] = 'Neu laden'; $lang['reload'] = 'Neu laden';
$lang['appointment'] = 'Termin'; $lang['appointment'] = 'Termin';
$lang['unavailable'] = 'Nicht möglich'; $lang['unavailable'] = 'Nicht möglich';

View file

@ -60,6 +60,7 @@ $lang['log_out'] = 'Αποσύνδεση';
$lang['synchronize'] = 'Συγχρονισμός'; $lang['synchronize'] = 'Συγχρονισμός';
$lang['enable_sync'] = 'Ενεργοποίηση Συγχρ.'; $lang['enable_sync'] = 'Ενεργοποίηση Συγχρ.';
$lang['disable_sync'] = 'Απενεργοποίηση Συγχρ.'; $lang['disable_sync'] = 'Απενεργοποίηση Συγχρ.';
$lang['disable_sync_prompt'] = 'Are you sure that you want to disable the calendar synchronization?';
$lang['reload'] = 'Επαναφόρτωση'; $lang['reload'] = 'Επαναφόρτωση';
$lang['appointment'] = 'Ραντεβού'; $lang['appointment'] = 'Ραντεβού';
$lang['unavailable'] = 'Μη Διαθέσιμος'; $lang['unavailable'] = 'Μη Διαθέσιμος';

View file

@ -65,6 +65,7 @@ $lang['log_out'] = 'יציאה';
$lang['synchronize'] = 'סינכרון'; $lang['synchronize'] = 'סינכרון';
$lang['enable_sync'] = 'אפשר סינכרון'; $lang['enable_sync'] = 'אפשר סינכרון';
$lang['disable_sync'] = 'בטל סינכרון'; $lang['disable_sync'] = 'בטל סינכרון';
$lang['disable_sync_prompt'] = 'Are you sure that you want to disable the calendar synchronization?';
$lang['reload'] = 'רענון'; $lang['reload'] = 'רענון';
$lang['appointment'] = 'פגישה'; $lang['appointment'] = 'פגישה';
$lang['unavailable'] = 'אינו זמין'; $lang['unavailable'] = 'אינו זמין';

View file

@ -60,6 +60,7 @@ $lang['log_out'] = 'लॉग आउट';
$lang['synchronize'] = 'सिंक्रनाइज़'; $lang['synchronize'] = 'सिंक्रनाइज़';
$lang['enable_sync'] = 'सिंक सक्षम करें'; $lang['enable_sync'] = 'सिंक सक्षम करें';
$lang['disable_sync'] = 'सिंक अक्षम करें'; $lang['disable_sync'] = 'सिंक अक्षम करें';
$lang['disable_sync_prompt'] = 'Are you sure that you want to disable the calendar synchronization?';
$lang['reload'] = 'रीलोड'; $lang['reload'] = 'रीलोड';
$lang['appointment'] = 'अपॉइंटमेंट'; $lang['appointment'] = 'अपॉइंटमेंट';
$lang['unavailable'] = 'अनुपलब्ध'; $lang['unavailable'] = 'अनुपलब्ध';

View file

@ -60,6 +60,7 @@ $lang['log_out'] = 'Kijelentkezés';
$lang['synchronize'] = 'Szinkronizálás'; $lang['synchronize'] = 'Szinkronizálás';
$lang['enable_sync'] = 'Szinkronizálás engedélyezése'; $lang['enable_sync'] = 'Szinkronizálás engedélyezése';
$lang['disable_sync'] = 'Szinkronizálás tiltása'; $lang['disable_sync'] = 'Szinkronizálás tiltása';
$lang['disable_sync_prompt'] = 'Are you sure that you want to disable the calendar synchronization?';
$lang['reload'] = 'Frissít'; $lang['reload'] = 'Frissít';
$lang['appointment'] = 'Időpont'; $lang['appointment'] = 'Időpont';
$lang['unavailable'] = 'Nem áll rendelkezésre'; $lang['unavailable'] = 'Nem áll rendelkezésre';

View file

@ -60,6 +60,7 @@ $lang['log_out'] = 'Esci';
$lang['synchronize'] = 'Sincronizza'; $lang['synchronize'] = 'Sincronizza';
$lang['enable_sync'] = 'Abilita sincronizzazione'; $lang['enable_sync'] = 'Abilita sincronizzazione';
$lang['disable_sync'] = 'Disabilita sincronizzazione'; $lang['disable_sync'] = 'Disabilita sincronizzazione';
$lang['disable_sync_prompt'] = 'Are you sure that you want to disable the calendar synchronization?';
$lang['reload'] = 'Reload'; $lang['reload'] = 'Reload';
$lang['appointment'] = 'Appointment'; $lang['appointment'] = 'Appointment';
$lang['unavailable'] = 'Non disponibile'; $lang['unavailable'] = 'Non disponibile';

View file

@ -60,6 +60,7 @@ $lang['log_out'] = 'ログアウト';
$lang['synchronize'] = '同期'; $lang['synchronize'] = '同期';
$lang['enable_sync'] = '同期有効化'; $lang['enable_sync'] = '同期有効化';
$lang['disable_sync'] = '同期無効化'; $lang['disable_sync'] = '同期無効化';
$lang['disable_sync_prompt'] = 'Are you sure that you want to disable the calendar synchronization?';
$lang['reload'] = '再読込'; $lang['reload'] = '再読込';
$lang['appointment'] = '予約'; $lang['appointment'] = '予約';
$lang['unavailable'] = '空き無し'; $lang['unavailable'] = '空き無し';

View file

@ -60,6 +60,7 @@ $lang['log_out'] = 'Ofmellen';
$lang['synchronize'] = 'Synchroniséieren'; $lang['synchronize'] = 'Synchroniséieren';
$lang['enable_sync'] = 'Sync aschalten'; $lang['enable_sync'] = 'Sync aschalten';
$lang['disable_sync'] = 'Sync ausschalten'; $lang['disable_sync'] = 'Sync ausschalten';
$lang['disable_sync_prompt'] = 'Are you sure that you want to disable the calendar synchronization?';
$lang['reload'] = 'Nei lueden'; $lang['reload'] = 'Nei lueden';
$lang['appointment'] = 'Termäin'; $lang['appointment'] = 'Termäin';
$lang['unavailable'] = 'Net méiglech'; $lang['unavailable'] = 'Net méiglech';

View file

@ -62,6 +62,7 @@ $lang['log_out'] = 'लॉग आउट';
$lang['synchronize'] = 'समक्रमित करा'; $lang['synchronize'] = 'समक्रमित करा';
$lang['enable_sync'] = 'समक्रमित सक्षम करा'; $lang['enable_sync'] = 'समक्रमित सक्षम करा';
$lang['disable_sync'] = 'समक्रमित अक्षम कर'; $lang['disable_sync'] = 'समक्रमित अक्षम कर';
$lang['disable_sync_prompt'] = 'Are you sure that you want to disable the calendar synchronization?';
$lang['reload'] = 'रीलोड करा'; $lang['reload'] = 'रीलोड करा';
$lang['appointment'] = 'अपॉइंटमेंट'; $lang['appointment'] = 'अपॉइंटमेंट';
$lang['unavailable'] = 'अनुपलब्ध'; $lang['unavailable'] = 'अनुपलब्ध';

View file

@ -60,6 +60,7 @@ $lang['log_out'] = 'Wyloguj';
$lang['synchronize'] = 'Synchronizuj'; $lang['synchronize'] = 'Synchronizuj';
$lang['enable_sync'] = 'Włącz Synch.'; $lang['enable_sync'] = 'Włącz Synch.';
$lang['disable_sync'] = 'Wyłącz Synch.'; $lang['disable_sync'] = 'Wyłącz Synch.';
$lang['disable_sync_prompt'] = 'Are you sure that you want to disable the calendar synchronization?';
$lang['reload'] = 'Odśwież'; $lang['reload'] = 'Odśwież';
$lang['appointment'] = 'Wizyta'; $lang['appointment'] = 'Wizyta';
$lang['unavailable'] = 'Niedostępne'; $lang['unavailable'] = 'Niedostępne';

View file

@ -60,6 +60,7 @@ $lang['log_out'] = 'Sair';
$lang['synchronize'] = 'Sincronizar'; $lang['synchronize'] = 'Sincronizar';
$lang['enable_sync'] = 'Habilitar Sincronização'; $lang['enable_sync'] = 'Habilitar Sincronização';
$lang['disable_sync'] = 'Desabiltar Sincronização'; $lang['disable_sync'] = 'Desabiltar Sincronização';
$lang['disable_sync_prompt'] = 'Are you sure that you want to disable the calendar synchronization?';
$lang['reload'] = 'Atualizar'; $lang['reload'] = 'Atualizar';
$lang['appointment'] = 'Agenda'; $lang['appointment'] = 'Agenda';
$lang['unavailable'] = 'Indisponível'; $lang['unavailable'] = 'Indisponível';

View file

@ -60,6 +60,7 @@ $lang['log_out'] = 'Sair';
$lang['synchronize'] = 'Sincronizar'; $lang['synchronize'] = 'Sincronizar';
$lang['enable_sync'] = 'Ativar Sincronização'; $lang['enable_sync'] = 'Ativar Sincronização';
$lang['disable_sync'] = 'Desativar Sincronização'; $lang['disable_sync'] = 'Desativar Sincronização';
$lang['disable_sync_prompt'] = 'Are you sure that you want to disable the calendar synchronization?';
$lang['reload'] = 'Carregar'; $lang['reload'] = 'Carregar';
$lang['appointment'] = 'Evento'; $lang['appointment'] = 'Evento';
$lang['unavailable'] = 'Indisponível'; $lang['unavailable'] = 'Indisponível';

View file

@ -60,6 +60,7 @@ $lang['log_out'] = 'Iesire';
$lang['synchronize'] = 'Sincronizare'; $lang['synchronize'] = 'Sincronizare';
$lang['enable_sync'] = 'Activeaza Sincronizare'; $lang['enable_sync'] = 'Activeaza Sincronizare';
$lang['disable_sync'] = 'Dezactiveaza Sincronizare'; $lang['disable_sync'] = 'Dezactiveaza Sincronizare';
$lang['disable_sync_prompt'] = 'Are you sure that you want to disable the calendar synchronization?';
$lang['reload'] = 'Reîncarcare'; $lang['reload'] = 'Reîncarcare';
$lang['appointment'] = 'Întâlnire'; $lang['appointment'] = 'Întâlnire';
$lang['unavailable'] = 'Indisponibil'; $lang['unavailable'] = 'Indisponibil';

View file

@ -60,6 +60,7 @@ $lang['log_out'] = 'Выйти';
$lang['synchronize'] = 'Синхронизация'; $lang['synchronize'] = 'Синхронизация';
$lang['enable_sync'] = 'Включить синхронизацию'; $lang['enable_sync'] = 'Включить синхронизацию';
$lang['disable_sync'] = 'Отключить синхронизацию'; $lang['disable_sync'] = 'Отключить синхронизацию';
$lang['disable_sync_prompt'] = 'Are you sure that you want to disable the calendar synchronization?';
$lang['reload'] = 'Перегрузить'; $lang['reload'] = 'Перегрузить';
$lang['appointment'] = 'Назначение'; $lang['appointment'] = 'Назначение';
$lang['unavailable'] = 'Недоступно'; $lang['unavailable'] = 'Недоступно';

View file

@ -60,6 +60,7 @@ $lang['log_out'] = 'Odhlasiť sa';
$lang['synchronize'] = 'Synchronizovať'; $lang['synchronize'] = 'Synchronizovať';
$lang['enable_sync'] = 'Povoliť synchronizáciu'; $lang['enable_sync'] = 'Povoliť synchronizáciu';
$lang['disable_sync'] = 'Zakázať synchronizáciu'; $lang['disable_sync'] = 'Zakázať synchronizáciu';
$lang['disable_sync_prompt'] = 'Are you sure that you want to disable the calendar synchronization?';
$lang['reload'] = 'Obnoviť'; $lang['reload'] = 'Obnoviť';
$lang['appointment'] = 'Rezervácie'; $lang['appointment'] = 'Rezervácie';
$lang['unavailable'] = 'Nedostupné'; $lang['unavailable'] = 'Nedostupné';

View file

@ -60,6 +60,7 @@ $lang['log_out'] = 'Cerrar sesión';
$lang['synchronize'] = 'Sincronizar'; $lang['synchronize'] = 'Sincronizar';
$lang['enable_sync'] = 'Habilitar sincronización'; $lang['enable_sync'] = 'Habilitar sincronización';
$lang['disable_sync'] = 'Deshabilitar sincronización'; $lang['disable_sync'] = 'Deshabilitar sincronización';
$lang['disable_sync_prompt'] = 'Are you sure that you want to disable the calendar synchronization?';
$lang['reload'] = 'Cargar nuevamente'; $lang['reload'] = 'Cargar nuevamente';
$lang['appointment'] = 'Cita'; $lang['appointment'] = 'Cita';
$lang['unavailable'] = 'No disponible'; $lang['unavailable'] = 'No disponible';

View file

@ -60,6 +60,7 @@ $lang['log_out'] = 'Logga ut';
$lang['synchronize'] = 'Synkronisera'; $lang['synchronize'] = 'Synkronisera';
$lang['enable_sync'] = 'Aktivera'; $lang['enable_sync'] = 'Aktivera';
$lang['disable_sync'] = 'Deaktivera'; $lang['disable_sync'] = 'Deaktivera';
$lang['disable_sync_prompt'] = 'Are you sure that you want to disable the calendar synchronization?';
$lang['reload'] = 'Uppdatera'; $lang['reload'] = 'Uppdatera';
$lang['appointment'] = 'Bokning'; $lang['appointment'] = 'Bokning';
$lang['unavailable'] = 'Inte tillgänglig'; $lang['unavailable'] = 'Inte tillgänglig';

View file

@ -60,6 +60,7 @@ $lang['log_out'] = 'Çıkış';
$lang['synchronize'] = 'Eşitle'; $lang['synchronize'] = 'Eşitle';
$lang['enable_sync'] = 'Eşitlemeyi Aç'; $lang['enable_sync'] = 'Eşitlemeyi Aç';
$lang['disable_sync'] = 'Eşitlemeyi Kapat'; $lang['disable_sync'] = 'Eşitlemeyi Kapat';
$lang['disable_sync_prompt'] = 'Are you sure that you want to disable the calendar synchronization?';
$lang['reload'] = 'Tekrar Yükle'; $lang['reload'] = 'Tekrar Yükle';
$lang['appointment'] = 'Randevu'; $lang['appointment'] = 'Randevu';
$lang['unavailable'] = 'Uygun Değil'; $lang['unavailable'] = 'Uygun Değil';

View file

@ -229,7 +229,6 @@ window.BackendCalendarDefaultView = window.BackendCalendarDefaultView || {};
} }
]; ];
GeneralFunctions.displayMessageBox(EALang.delete_appointment_title, GeneralFunctions.displayMessageBox(EALang.delete_appointment_title,
EALang.write_appointment_removal_reason, buttons); EALang.write_appointment_removal_reason, buttons);

View file

@ -81,22 +81,34 @@ window.BackendCalendarGoogleSync = window.BackendCalendarGoogleSync || {};
} }
} }
} catch (Error) { } catch (Error) {
// Accessing the document object before the window is loaded throws an error, but // Accessing the document object before the window is loaded throws an error, but it will only
// it will only happen during the initialization of the window. Attaching "load" // happen during the initialization of the window. Attaching "load" event handling is not
// event handling is not possible due to CORS restrictions. // possible due to CORS restrictions.
} }
}, 100); }, 100);
} else { } else {
var buttons = [
{
text: EALang.cancel,
click: function () {
$('#message-box').dialog('close');
}
},
{
text: 'OK',
click: function () {
// Disable synchronization for selected provider. // Disable synchronization for selected provider.
// Update page elements and make an AJAX call to remove the google sync setting of the
// selected provider.
var providerId = $('#select-filter-item').val(); var providerId = $('#select-filter-item').val();
var provider = GlobalVariables.availableProviders.find(function (availableProvider) { var provider = GlobalVariables.availableProviders.find(function (availableProvider) {
return Number(availableProvider.id) === Number(providerId); return Number(availableProvider.id) === Number(providerId);
}); });
if (!provider) {
throw new Error('Provider not found: ' + providerId);
}
provider.settings.google_sync = '0'; provider.settings.google_sync = '0';
provider.settings.google_token = null; provider.settings.google_token = null;
@ -106,6 +118,13 @@ window.BackendCalendarGoogleSync = window.BackendCalendarGoogleSync || {};
$('#enable-sync span').text(EALang.enable_sync); $('#enable-sync span').text(EALang.enable_sync);
$('#google-sync').prop('disabled', true); $('#google-sync').prop('disabled', true);
$('#select-filter-item option:selected').attr('google-sync', 'false'); $('#select-filter-item option:selected').attr('google-sync', 'false');
$('#message-box').dialog('close');
}
}
];
GeneralFunctions.displayMessageBox(EALang.disable_sync, EALang.disable_sync_prompt, buttons);
} }
}); });
@ -158,8 +177,7 @@ window.BackendCalendarGoogleSync = window.BackendCalendarGoogleSync || {};
* @param {Number} providerId The selected provider record ID. * @param {Number} providerId The selected provider record ID.
*/ */
function disableProviderSync(providerId) { function disableProviderSync(providerId) {
// Make an ajax call to the server in order to disable the setting // Make an ajax call to the server in order to disable the setting from the database.
// from the database.
var url = GlobalVariables.baseUrl + '/index.php/backend_api/ajax_disable_provider_sync'; var url = GlobalVariables.baseUrl + '/index.php/backend_api/ajax_disable_provider_sync';
var data = { var data = {