--- /dev/null
+<div ng-controller="CrmCxnConfirmReconnectCtrl">
+ <p>{{ts('Are you sure you want to reconnect \"%1\"?', {1: cxn.app_meta.title})}}</p>
+
+ <p>{{ts('Reconnecting will change the connection details (such as callback URLs and permissions). This can be useful in a few cases, such as:')}}</p>
+
+ <ul>
+ <li>{{ts('After your site has migrated to a new URL.')}}</li>
+ <li>{{ts('After the application has migrated to a new URL.')}}</li>
+ <li>{{ts('After the application has changed permission requirements.')}}</li>
+ </ul>
+
+ <div crm-ui-accordion="{title: ts('Permissions: Summary'), collapsed: true}">
+ <div ng-bind-html="cxn.app_meta.perm.desc"></div>
+ </div>
+ <div crm-ui-accordion="{title: ts('Permissions: Details'), collapsed: true}">
+ <div crm-cxn-perm-table="{perm: cxn.app_meta.perm}"></div>
+ </div>
+</div>
--- /dev/null
+(function(angular, $, _) {
+ angular.module('crmCxn').controller('CrmCxnConfirmReconnectCtrl', function($scope) {
+ $scope.ts = CRM.ts(null);
+ });
+})(angular, CRM.$, CRM._);
{{ts('Support')}}
</a>
</li>
+ <li>
+ <a class="action-item crm-hover-button"
+ crm-confirm='{width: "65%", resizable: true, title:ts("Reconnect"), templateUrl: "~/crmCxn/ConfirmReconnectCtrl.html", export: {cxn: cxn}}'
+ on-yes="reregister(cxn.app_meta)"
+ >{{ts('Reconnect')}}</a>
+ </li>
<li>
<a class="action-item crm-hover-button"
crm-confirm='{width: "65%", resizable: true, title: ts("Disconnect"), message: ts("Are you sure you want to disconnect \"%1?\". Doing so may permanently destroy data linkage.", {1: cxn.app_meta.title})}'
return block(crmStatus({start: ts('Connecting...'), success: ts('Connected')}, reg));
};
+ $scope.reregister = function(appMeta) {
+ var reg = crmApi('Cxn', 'register', {app_guid: appMeta.appId}).then($scope.refreshCxns);
+ return block(crmStatus({start: ts('Reconnecting...'), success: ts('Reconnected')}, reg));
+ };
+
$scope.unregister = function(appMeta) {
var reg = crmApi('Cxn', 'unregister', {app_guid: appMeta.appId, debug: 1}).then($scope.refreshCxns);
return block(crmStatus({start: ts('Disconnecting...'), success: ts('Disconnected')}, reg));