echo '<br>'; echo '<br>'; ?> <div class='integration-description'> <?php echo Yii::t('app', 'Activating Google Integration enables the following features:'); echo X2Html::unorderedList(array(CHtml::encode(Yii::t('app', 'Google sign in')), CHtml::encode(Yii::t('app', 'Google Calendar sync')), CHtml::encode(Yii::t('app', 'Google Drive access')))); ?> </div> <?php echo CHtml::tag('h3', array(), Yii::t('app', 'Configuring Google Integration')); ?> <hr> <?php echo X2Html::orderedList(array(Yii::t('app', 'Visit {link} and create or select a Google project.', array('{link}' => '<a href="https://console.developers.google.com/">' . 'https://console.developers.google.com</a>')), CHtml::encode(Yii::t('app', 'To configure Google integration for Calendar sync, Google login, and ' . 'Google Drive access:')) . X2Html::orderedList(array(CHtml::encode(Yii::t('app', 'From the "APIs & auth" section in the left sidebar, select "APIs."')), CHtml::encode(Yii::t('app', 'Search for and enable the Calendar and Drive APIs.')), CHtml::encode(Yii::t('app', 'From the "APIs & auth" section in the left sidebar, select ' . '"Credentials."')), CHtml::encode(Yii::t('app', 'Create an OAuth 2.0 client ID.')), CHtml::encode(Yii::t('app', 'When asked for "Authorized Redirect URIs," input the following ' . 'urls:')) . CHtml::tag('textarea', array('readonly' => 'readonly', 'class' => 'authorized-js-origins'), (@$_SERVER['HTTPS'] == 'on' ? 'https://' : 'http://') . $_SERVER['HTTP_HOST'] . Yii::app()->controller->createUrl('/calendar/calendar/syncActionsToGoogleCalendar') . "\n" . (@$_SERVER['HTTPS'] == 'on' ? 'https://' : 'http://') . $_SERVER['HTTP_HOST'] . Yii::app()->controller->createUrl('/site/googleLogin') . "\n" . (@$_SERVER['HTTPS'] == 'on' ? 'https://' : 'http://') . $_SERVER['HTTP_HOST'] . Yii::app()->controller->createUrl('/site/upload')), CHtml::encode(Yii::t('app', 'When asked for "Authorized JavaScript Origins," input the ' . 'following urls:')) . CHtml::tag('textarea', array('readonly' => 'readonly'), (@$_SERVER['HTTPS'] == 'on' ? 'https://' : 'http://') . $_SERVER['HTTP_HOST']), Yii::t('app', 'Copy the Client ID and Client Secret into OAuth 2.0 Credentials ' . 'section {below}.', array('{below}' => CHtml::link(Yii::t('app', 'below'), '#oauth-2.0')))), array('style' => 'list-style-type: lower-latin;'))), array('class' => 'config-instructions')); echo X2Html::fragmentTarget('oauth-2.0'); echo CHtml::tag('h3', array('class' => 'oauth-header'), Yii::t('app', 'OAuth 2.0 Credentials')); echo X2Html::hint2(Yii::t('app', 'Needed for Google Calendar sync, Google login, and Google Drive access.')); echo '<hr />'; echo CHtml::activeLabel($model, 'clientId'); $model->renderProtectedInput('clientId'); echo CHtml::activeLabel($model, 'clientSecret'); $model->renderProtectedInput('clientSecret'); echo CHtml::tag('h3', array(), Yii::t('app', 'Google Analytics Integration')); echo '<hr />'; echo CHtml::activeLabel($admin, 'gaTracking_public'); echo CHtml::activeTextField($admin, 'gaTracking_public'); echo CHtml::activeLabel($admin, 'gaTracking_internal'); echo CHtml::activeTextField($admin, 'gaTracking_internal'); echo '<br>'; echo Yii::t('admin', 'Enter property IDs to enable Google Analytics tracking. The public ID will be used on publicly-accessible web lead and service case forms. The internal one will be used within X2CRM, for tracking the activity of authenticated users.');