mirror of
https://github.com/alextselegidis/easyappointments.git
synced 2024-11-21 15:32:21 +03:00
Display confirmation modal when disabling a connected Google Calendar Sync (#955).
This commit is contained in:
parent
ccd63eabe4
commit
731fb52ab4
30 changed files with 67 additions and 22 deletions
|
@ -1,4 +1,4 @@
|
|||
<?php
|
||||
<?php defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
// Arabic
|
||||
$lang['page_title'] = 'احجز موعد مع';
|
||||
$lang['service_and_provider'] = 'اختر الخدمة والمزود';
|
||||
|
@ -60,6 +60,7 @@ $lang['log_out'] = 'تسجيل الخروج';
|
|||
$lang['synchronize'] = 'المزامنة';
|
||||
$lang['enable_sync'] = 'تمكين المزامنة';
|
||||
$lang['disable_sync'] = 'تعطيل المزامنة';
|
||||
$lang['disable_sync_prompt'] = 'Are you sure that you want to disable the calendar synchronization?';
|
||||
$lang['reload'] = 'اعادة التحميل';
|
||||
$lang['appointment'] = 'الموعد';
|
||||
$lang['unavailable'] = 'غير متوفر';
|
||||
|
|
|
@ -60,6 +60,7 @@ $lang['log_out'] = 'Изход';
|
|||
$lang['synchronize'] = 'синхронизиране';
|
||||
$lang['enable_sync'] = 'Активиране на синхронизиране';
|
||||
$lang['disable_sync'] = 'Изключване на синхронизиране';
|
||||
$lang['disable_sync_prompt'] = 'Are you sure that you want to disable the calendar synchronization?';
|
||||
$lang['reload'] = 'Презареждане';
|
||||
$lang['appointment'] = 'Час';
|
||||
$lang['unavailable'] = 'не е на лице';
|
||||
|
|
|
@ -62,6 +62,7 @@ $lang['log_out'] = 'Sortida';
|
|||
$lang['synchronize'] = 'Sincronitza';
|
||||
$lang['enable_sync'] = 'Permet 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['appointment'] = 'Cita';
|
||||
$lang['unavailable'] = 'No disponible';
|
||||
|
|
|
@ -60,6 +60,7 @@ $lang['log_out'] = '注销';
|
|||
$lang['synchronize'] = '同步';
|
||||
$lang['enable_sync'] = '开启同步';
|
||||
$lang['disable_sync'] = '关闭同步';
|
||||
$lang['disable_sync_prompt'] = 'Are you sure that you want to disable the calendar synchronization?';
|
||||
$lang['reload'] = '刷新';
|
||||
$lang['appointment'] = '预约';
|
||||
$lang['unavailable'] = '不可用';
|
||||
|
|
|
@ -62,6 +62,7 @@ $lang['log_out'] = 'Odhlášení';
|
|||
$lang['synchronize'] = 'Synchronizace';
|
||||
$lang['enable_sync'] = 'Povolit 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['appointment'] = 'Schůzka';
|
||||
$lang['unavailable'] = 'Nedostupnost';
|
||||
|
|
|
@ -60,6 +60,7 @@ $lang['log_out'] = 'Log ud';
|
|||
$lang['synchronize'] = 'Synkroniser';
|
||||
$lang['enable_sync'] = 'Aktivere';
|
||||
$lang['disable_sync'] = 'Deaktivere';
|
||||
$lang['disable_sync_prompt'] = 'Are you sure that you want to disable the calendar synchronization?';
|
||||
$lang['reload'] = 'Opdater';
|
||||
$lang['appointment'] = 'Aftale';
|
||||
$lang['unavailable'] = 'Ikke tilgængelig';
|
||||
|
|
|
@ -60,6 +60,7 @@ $lang['log_out'] = 'Afmelden';
|
|||
$lang['synchronize'] = 'Synchroniseren';
|
||||
$lang['enable_sync'] = 'Synchronisatie inschakelen';
|
||||
$lang['disable_sync'] = 'Synchronisatie uitschakelen';
|
||||
$lang['disable_sync_prompt'] = 'Are you sure that you want to disable the calendar synchronization?';
|
||||
$lang['reload'] = 'Herladen';
|
||||
$lang['appointment'] = 'Afspraak';
|
||||
$lang['unavailable'] = 'Niet beschikbaar';
|
||||
|
|
|
@ -65,6 +65,7 @@ $lang['log_out'] = 'Log Out';
|
|||
$lang['synchronize'] = 'Synchronize';
|
||||
$lang['enable_sync'] = 'Enable 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['appointment'] = 'Appointment';
|
||||
$lang['unavailable'] = 'Unavailable';
|
||||
|
|
|
@ -60,6 +60,7 @@ $lang['log_out'] = 'Kirjaudu ulos';
|
|||
$lang['synchronize'] = 'Synkronoi';
|
||||
$lang['enable_sync'] = 'Aktivoi 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['appointment'] = 'Varaus';
|
||||
$lang['unavailable'] = 'Poissaolo';
|
||||
|
|
|
@ -64,6 +64,7 @@ $lang['log_out'] = 'Déconnexion';
|
|||
$lang['synchronize'] = 'Synchronisation';
|
||||
$lang['enable_sync'] = 'Activer 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['appointment'] = 'Rendez-vous';
|
||||
$lang['unavailable'] = 'Indisponible';
|
||||
|
|
|
@ -63,6 +63,7 @@ $lang['log_out'] = 'Abmelden';
|
|||
$lang['synchronize'] = 'Synchronisieren';
|
||||
$lang['enable_sync'] = 'Sync einschalten';
|
||||
$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['appointment'] = 'Termin';
|
||||
$lang['unavailable'] = 'Nicht möglich';
|
||||
|
|
|
@ -60,6 +60,7 @@ $lang['log_out'] = 'Αποσύνδεση';
|
|||
$lang['synchronize'] = 'Συγχρονισμός';
|
||||
$lang['enable_sync'] = 'Ενεργοποίηση Συγχρ.';
|
||||
$lang['disable_sync'] = 'Απενεργοποίηση Συγχρ.';
|
||||
$lang['disable_sync_prompt'] = 'Are you sure that you want to disable the calendar synchronization?';
|
||||
$lang['reload'] = 'Επαναφόρτωση';
|
||||
$lang['appointment'] = 'Ραντεβού';
|
||||
$lang['unavailable'] = 'Μη Διαθέσιμος';
|
||||
|
|
|
@ -65,6 +65,7 @@ $lang['log_out'] = 'יציאה';
|
|||
$lang['synchronize'] = 'סינכרון';
|
||||
$lang['enable_sync'] = 'אפשר סינכרון';
|
||||
$lang['disable_sync'] = 'בטל סינכרון';
|
||||
$lang['disable_sync_prompt'] = 'Are you sure that you want to disable the calendar synchronization?';
|
||||
$lang['reload'] = 'רענון';
|
||||
$lang['appointment'] = 'פגישה';
|
||||
$lang['unavailable'] = 'אינו זמין';
|
||||
|
@ -326,4 +327,4 @@ $lang['load_more'] = 'טען עוד';
|
|||
$lang['list'] = 'רשימה';
|
||||
$lang['default'] = 'בְּרִירַת מֶחדָל';
|
||||
$lang['table'] = 'טבלה';
|
||||
$lang['date'] = 'תאריך';
|
||||
$lang['date'] = 'תאריך';
|
||||
|
|
|
@ -60,6 +60,7 @@ $lang['log_out'] = 'लॉग आउट';
|
|||
$lang['synchronize'] = 'सिंक्रनाइज़';
|
||||
$lang['enable_sync'] = 'सिंक सक्षम करें';
|
||||
$lang['disable_sync'] = 'सिंक अक्षम करें';
|
||||
$lang['disable_sync_prompt'] = 'Are you sure that you want to disable the calendar synchronization?';
|
||||
$lang['reload'] = 'रीलोड';
|
||||
$lang['appointment'] = 'अपॉइंटमेंट';
|
||||
$lang['unavailable'] = 'अनुपलब्ध';
|
||||
|
|
|
@ -60,6 +60,7 @@ $lang['log_out'] = 'Kijelentkezés';
|
|||
$lang['synchronize'] = 'Szinkronizálás';
|
||||
$lang['enable_sync'] = 'Szinkronizálás engedélyezése';
|
||||
$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['appointment'] = 'Időpont';
|
||||
$lang['unavailable'] = 'Nem áll rendelkezésre';
|
||||
|
|
|
@ -60,6 +60,7 @@ $lang['log_out'] = 'Esci';
|
|||
$lang['synchronize'] = 'Sincronizza';
|
||||
$lang['enable_sync'] = 'Abilita 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['appointment'] = 'Appointment';
|
||||
$lang['unavailable'] = 'Non disponibile';
|
||||
|
|
|
@ -60,6 +60,7 @@ $lang['log_out'] = 'ログアウト';
|
|||
$lang['synchronize'] = '同期';
|
||||
$lang['enable_sync'] = '同期有効化';
|
||||
$lang['disable_sync'] = '同期無効化';
|
||||
$lang['disable_sync_prompt'] = 'Are you sure that you want to disable the calendar synchronization?';
|
||||
$lang['reload'] = '再読込';
|
||||
$lang['appointment'] = '予約';
|
||||
$lang['unavailable'] = '空き無し';
|
||||
|
|
|
@ -60,6 +60,7 @@ $lang['log_out'] = 'Ofmellen';
|
|||
$lang['synchronize'] = 'Synchroniséieren';
|
||||
$lang['enable_sync'] = 'Sync aschalten';
|
||||
$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['appointment'] = 'Termäin';
|
||||
$lang['unavailable'] = 'Net méiglech';
|
||||
|
|
|
@ -62,6 +62,7 @@ $lang['log_out'] = 'लॉग आउट';
|
|||
$lang['synchronize'] = 'समक्रमित करा';
|
||||
$lang['enable_sync'] = 'समक्रमित सक्षम करा';
|
||||
$lang['disable_sync'] = 'समक्रमित अक्षम कर';
|
||||
$lang['disable_sync_prompt'] = 'Are you sure that you want to disable the calendar synchronization?';
|
||||
$lang['reload'] = 'रीलोड करा';
|
||||
$lang['appointment'] = 'अपॉइंटमेंट';
|
||||
$lang['unavailable'] = 'अनुपलब्ध';
|
||||
|
|
|
@ -60,6 +60,7 @@ $lang['log_out'] = 'Wyloguj';
|
|||
$lang['synchronize'] = 'Synchronizuj';
|
||||
$lang['enable_sync'] = 'Włą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['appointment'] = 'Wizyta';
|
||||
$lang['unavailable'] = 'Niedostępne';
|
||||
|
|
|
@ -60,6 +60,7 @@ $lang['log_out'] = 'Sair';
|
|||
$lang['synchronize'] = 'Sincronizar';
|
||||
$lang['enable_sync'] = 'Habilitar 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['appointment'] = 'Agenda';
|
||||
$lang['unavailable'] = 'Indisponível';
|
||||
|
|
|
@ -60,6 +60,7 @@ $lang['log_out'] = 'Sair';
|
|||
$lang['synchronize'] = 'Sincronizar';
|
||||
$lang['enable_sync'] = 'Ativar 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['appointment'] = 'Evento';
|
||||
$lang['unavailable'] = 'Indisponível';
|
||||
|
|
|
@ -60,6 +60,7 @@ $lang['log_out'] = 'Iesire';
|
|||
$lang['synchronize'] = 'Sincronizare';
|
||||
$lang['enable_sync'] = 'Activeaza 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['appointment'] = 'Întâlnire';
|
||||
$lang['unavailable'] = 'Indisponibil';
|
||||
|
|
|
@ -60,6 +60,7 @@ $lang['log_out'] = 'Выйти';
|
|||
$lang['synchronize'] = 'Синхронизация';
|
||||
$lang['enable_sync'] = 'Включить синхронизацию';
|
||||
$lang['disable_sync'] = 'Отключить синхронизацию';
|
||||
$lang['disable_sync_prompt'] = 'Are you sure that you want to disable the calendar synchronization?';
|
||||
$lang['reload'] = 'Перегрузить';
|
||||
$lang['appointment'] = 'Назначение';
|
||||
$lang['unavailable'] = 'Недоступно';
|
||||
|
|
|
@ -60,6 +60,7 @@ $lang['log_out'] = 'Odhlasiť sa';
|
|||
$lang['synchronize'] = 'Synchronizovať';
|
||||
$lang['enable_sync'] = 'Povoliť 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['appointment'] = 'Rezervácie';
|
||||
$lang['unavailable'] = 'Nedostupné';
|
||||
|
|
|
@ -60,6 +60,7 @@ $lang['log_out'] = 'Cerrar sesión';
|
|||
$lang['synchronize'] = 'Sincronizar';
|
||||
$lang['enable_sync'] = 'Habilitar 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['appointment'] = 'Cita';
|
||||
$lang['unavailable'] = 'No disponible';
|
||||
|
|
|
@ -60,6 +60,7 @@ $lang['log_out'] = 'Logga ut';
|
|||
$lang['synchronize'] = 'Synkronisera';
|
||||
$lang['enable_sync'] = 'Aktivera';
|
||||
$lang['disable_sync'] = 'Deaktivera';
|
||||
$lang['disable_sync_prompt'] = 'Are you sure that you want to disable the calendar synchronization?';
|
||||
$lang['reload'] = 'Uppdatera';
|
||||
$lang['appointment'] = 'Bokning';
|
||||
$lang['unavailable'] = 'Inte tillgänglig';
|
||||
|
|
|
@ -60,6 +60,7 @@ $lang['log_out'] = 'Çıkış';
|
|||
$lang['synchronize'] = 'Eşitle';
|
||||
$lang['enable_sync'] = 'Eşitlemeyi Aç';
|
||||
$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['appointment'] = 'Randevu';
|
||||
$lang['unavailable'] = 'Uygun Değil';
|
||||
|
|
|
@ -229,7 +229,6 @@ window.BackendCalendarDefaultView = window.BackendCalendarDefaultView || {};
|
|||
}
|
||||
];
|
||||
|
||||
|
||||
GeneralFunctions.displayMessageBox(EALang.delete_appointment_title,
|
||||
EALang.write_appointment_removal_reason, buttons);
|
||||
|
||||
|
|
|
@ -81,31 +81,50 @@ window.BackendCalendarGoogleSync = window.BackendCalendarGoogleSync || {};
|
|||
}
|
||||
}
|
||||
} catch (Error) {
|
||||
// Accessing the document object before the window is loaded throws an error, but
|
||||
// it will only happen during the initialization of the window. Attaching "load"
|
||||
// event handling is not possible due to CORS restrictions.
|
||||
// Accessing the document object before the window is loaded throws an error, but it will only
|
||||
// happen during the initialization of the window. Attaching "load" event handling is not
|
||||
// possible due to CORS restrictions.
|
||||
}
|
||||
}, 100);
|
||||
|
||||
} else {
|
||||
// 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 buttons = [
|
||||
{
|
||||
text: EALang.cancel,
|
||||
click: function () {
|
||||
$('#message-box').dialog('close');
|
||||
}
|
||||
},
|
||||
{
|
||||
text: 'OK',
|
||||
click: function () {
|
||||
// Disable synchronization for selected provider.
|
||||
var providerId = $('#select-filter-item').val();
|
||||
|
||||
var provider = GlobalVariables.availableProviders.find(function (availableProvider) {
|
||||
return Number(availableProvider.id) === Number(providerId);
|
||||
});
|
||||
var provider = GlobalVariables.availableProviders.find(function (availableProvider) {
|
||||
return Number(availableProvider.id) === Number(providerId);
|
||||
});
|
||||
|
||||
provider.settings.google_sync = '0';
|
||||
provider.settings.google_token = null;
|
||||
if (!provider) {
|
||||
throw new Error('Provider not found: ' + providerId);
|
||||
}
|
||||
|
||||
disableProviderSync(provider.id);
|
||||
provider.settings.google_sync = '0';
|
||||
provider.settings.google_token = null;
|
||||
|
||||
$('#enable-sync').removeClass('btn-secondary enabled').addClass('btn-light');
|
||||
$('#enable-sync span').text(EALang.enable_sync);
|
||||
$('#google-sync').prop('disabled', true);
|
||||
$('#select-filter-item option:selected').attr('google-sync', 'false');
|
||||
disableProviderSync(provider.id);
|
||||
|
||||
$('#enable-sync').removeClass('btn-secondary enabled').addClass('btn-light');
|
||||
$('#enable-sync span').text(EALang.enable_sync);
|
||||
$('#google-sync').prop('disabled', true);
|
||||
$('#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.
|
||||
*/
|
||||
function disableProviderSync(providerId) {
|
||||
// Make an ajax call to the server in order to disable the setting
|
||||
// from the database.
|
||||
// Make an ajax call to the server in order to disable the setting from the database.
|
||||
var url = GlobalVariables.baseUrl + '/index.php/backend_api/ajax_disable_provider_sync';
|
||||
|
||||
var data = {
|
||||
|
|
Loading…
Reference in a new issue