PATH:
home
/
centosnipponia
/
public_html
/
ticketing.nipponia.com
/
osta
/
old
/
include
/
staff
/
templates
<?php $token = null; if (($cred = $account->getCredentials($auth))) $token = $cred->getAccessToken($account->getConfigSignature()); // Warnings if ($account->getAuthBk() && strcmp($auth, $account->getAuthBk())) $form->setNotice( __('Changing Oauth2 provider will overwrite existing credentials')); elseif ($account->getAuthBk()) $form->setNotice(__('Any changes will require re-authorization')); $info = $account->getOAuth2ConfigInfo(); $info = Format::htmlchars(($errors && $_POST) ? array_merge($info, $_POST) : $info, true); $action = sprintf('#email/%d/auth/config/%s/%s', $email->getId(), $type, $auth); $addr = $account->getEmail()->email; ?> <h3><?php echo __('OAuth2 Authorization'); ?></h3> <b><a class="close" href="#"><i class="icon-remove-circle"></i></a></b> <hr/> <?php if (isset($errors['err'])) { echo sprintf('<p id="msg_error">%s</p>', $errors['err']); } elseif (isset($sys['warning'])) { echo sprintf('<p id="msg_warning">%s</p>', $sys['warning']); } elseif (isset($sys['msg'])) { echo sprintf('<p id="msg_notice">%s</p>', $sys['msg']); } ?> <form method="post" action="<?php echo $action; ?>"> <ul class="clean tabs" id="oauth-tabs"> <li class="active"><a href="#info"> <i class="icon-info-sign"></i> <?php echo __('Info'); ?></a></li> <li><a href="#idp"> <i class="icon-cog"></i> <?php echo sprintf('%s %s', 'IdP', __('Config')); ?></a></li> <?php if ($token) { ?> <li><a href="#token"> <i class="icon-key"></i> <?php echo __('Token'); ?></a></li> <?php } ?> </ul> <div id="oauth-tabs_container"> <div id="info" class="tab_content"> <?php if (!$info['isactive']) echo sprintf('<p id="msg_warning">%s</p>', __('OAuth2 Instance is Disabled')); ?> <table class="form_table" width="100%" border="0" cellspacing="0" cellpadding="2"> <thead> <tr> <th colspan="2"> <em><?php echo __('General Settings'); ?></em> </th> </tr> </thead> <tbody> <tr> <td width="180" class="required"><?php echo __('Status'); ?>:</td> <td><select name="isactive"> <?php foreach (array(1 => __('Enabled'), 0 => __('Disabled')) as $key => $desc) { ?> <option value="<?php echo $key; ?>" <?php if ($key == $info['isactive']) echo 'selected="selected"'; ?>><?php echo $desc; ?></option> <?php } ?> </select> </td> </tr> <tr> <td width="180" class="required"><?php echo __('Name'); ?>:</td> <td> <input size="50" type="text" autofocus name="name" value="<?php echo $info['name']; ?>"/> <span class="error">*<br/> <?php echo $errors['name']; ?></span> </td> </tr> <tr> <td width="180"><b><?php echo __('Email Address'); ?>:</b></td> <td> <input size="35" type="text" autofocus name="name" disabled="disabled" value="<?php echo $addr; ?>"/> <input type="checkbox" name="strict_matching" <?php if ($info['strict_matching']) echo 'checked="checked"'; ?>> <?php echo __('Strict Matching'); ?> <i class="help-tip icon-question-sign" href="#strict_matching"></i> <span class="error"><br/> <?php echo $errors['name']; ?></span> </td> </tr> </tbody> <tbody> <tr> <th colspan="7"> <em><strong><?php echo __('Internal Notes'); ?>:</strong> <?php echo __("Instance description and notes"); ?></em> </th> </tr> <tr> <td colspan="7"><textarea name="notes" class="richtext no-bar" rows="6" cols="80"><?php echo $info['notes']; ?></textarea> </td> </tr> </tbody> </table> </div> <div id="idp" class="tab_content hidden"> <?php echo $form->asTable(); ?> </div> <?php if ($token) { ?> <div id="token" class="tab_content hidden" style="margin:2px;" > <?php if ($token->hasExpired()) { echo sprintf('<p id="msg_warning">%s</p>', __('Expired Access Token gets auto-refreshed on use')); } ?> <a class="red button action-button pull-right" style="margin-bottom:8px;" id="token-delete" data-toggle="tooltip" href="<?php echo sprintf('#email/%d/auth/config/%s/delete', $email->getId(), $type); ?>" title="Delete" data-original-title="Delete"> <i class="icon-trash"></i> <?php echo __('Delete Token'); ?> </a> <div class="clear"></div> <table class="form_table" width="100%" border="0" cellspacing="0" cellpadding="2"> <thead> <tr> <th colspan="2"> <em><?php echo __('Token Information'); ?></em> </th> </tr> </thead> <tbody> <tr> <td width="180"><?php echo __('Access Token'); ?>:</td> <td><?php echo Format::shroud($token->getAccessToken(), 2, 40); ?></td> </tr> <tr> <td><?php echo __('Expires'); ?>:</td> <td style="color:<?php echo $token->isExpired() ? 'red' : 'green'; ?>;"><?php echo Format::datetime($token->getExpires(), false); ?></td> </tr> <tr> <td><?php echo __('Refresh Token'); ?>:</td> <td><?php echo Format::shroud($token->getRefreshToken(), 2, 40); ?></td> </tr> <tr> <td><?php echo __('Resource Owner Id'); ?>:</td> <td><?php echo $token->getResourceOwnerId(); ?></td> </tr> <tr> <td><?php echo __('Resource Owner Email'); ?>:</td> <td><?php echo $token->getResourceOwnerEmail(); ?></td> </tr> <tr> <td><?php echo __('Config Signature'); ?>:</td> <td><?php echo $token->getConfigSignature(); ?></td> </tr> </tbody> <thead> <tr> <th colspan="2"> <em><?php echo __('Token Scopes'); ?></em> </th> </tr> </thead> <tbody> <tr> <td colspan=2><?php echo str_replace(' ', '<br />', $token->getScope()); ?></td> </tr> </tbody> </table> </div> <?php } ?> </div> <hr/> <p class="full-width"> <span class="buttons" style="float:left"> <input type="button" name="cancel" class="close" value="<?php echo __('Cancel'); ?>"> </span> <span class="buttons" style="float:right"> <input type="submit" value="<?php echo __('Submit'); ?>"> </span> </p> </form> <script type="text/javascript"> $(function() { $('#oauth-tabs_container').on('click', 'a#token-delete', function(e) { e.preventDefault(); if (confirm(__('Are you sure?'))) { $.ajax({ url: 'ajax.php/' + $(this).attr('href').substr(1), type: 'POST', success: function(json) { // Remove the Token tab completely $('#popup a[href="#token"]').parent().remove(); $('#popup div#token').remove(); // Add success banner $('#popup form').before('<div id="msg_notice">'+json+'</div>'); // Load the IdP tab $('#popup a[href="#idp"]').click(); }, error: function(json) { // Add error banner $('#popup form').before('<div id="msg_error">'+json.responseText+'</div>'); } }); } return false; }); }); </script>
[+]
..
[-] queue-export.tmpl.php
[edit]
[-] queue-preview.tmpl.php
[edit]
[-] queue-column-condition.tmpl.php
[edit]
[-] queue-sorting-add.tmpl.php
[edit]
[-] refer.tmpl.php
[edit]
[-] form-manage.tmpl.php
[edit]
[-] confirm.tmpl.php
[edit]
[-] queue-column-condition-prop.tmpl.php
[edit]
[-] user-lookup.tmpl.php
[edit]
[-] thread-entry.tmpl.php
[edit]
[-] quick-add-role.tmpl.php
[edit]
[-] simple-form.tmpl.php
[edit]
[-] sequence-manage.tmpl.php
[edit]
[-] reset-agent-permissions.tmpl.php
[edit]
[-] email-basicauth.tmpl.php
[edit]
[-] user-register.tmpl.php
[edit]
[-] thread-entry-edit.tmpl.php
[edit]
[-] queue-savedsearches-nav.tmpl.php
[edit]
[-] assign.tmpl.php
[edit]
[-] user-delete.tmpl.php
[edit]
[-] tickets.tmpl.php
[edit]
[-] export.tmpl.php
[edit]
[-] ticket-status.tmpl.php
[edit]
[-] merge-tickets.tmpl.php
[edit]
[-] notes.tmpl.php
[edit]
[-] queue-column-add.tmpl.php
[edit]
[-] user-import.tmpl.php
[edit]
[-] queue-fields.tmpl.php
[edit]
[-] dynamic-form-simple.tmpl.php
[edit]
[-] queue-quickfilter.tmpl.php
[edit]
[-] merge-preview.tmpl.php
[edit]
[-] field-edit.tmpl.php
[edit]
[-] org.tmpl.php
[edit]
[-] list-import.tmpl.php
[edit]
[-] thread-event.tmpl.php
[edit]
[-] tickets-actions.tmpl.php
[edit]
[-] queue-column-edit.tmpl.php
[edit]
[-] status-options.tmpl.php
[edit]
[-] navigation.tmpl.php
[edit]
[-] field-view.tmpl.php
[edit]
[-] tasks-queue-sort.tmpl.php
[edit]
[-] ticket-preview.tmpl.php
[edit]
[-] list-items.tmpl.php
[edit]
[-] thread-entries.tmpl.php
[edit]
[-] queue-tickets.tmpl.php
[edit]
[-] list-item-properties.tmpl.php
[edit]
[-] email-smtp.tmpl.php
[edit]
[-] release.tmpl.php
[edit]
[-] advanced-search.tmpl.php
[edit]
[-] schedule-holidays.tmpl.php
[edit]
[-] delete.tmpl.php
[edit]
[-] plugin-instance-modal.tmpl.php
[edit]
[-] thread-entry-view.tmpl.php
[edit]
[-] list-item-row.tmpl.php
[edit]
[-] faq-print.tmpl.php
[edit]
[-] sub-navigation.tmpl.php
[edit]
[-] plugin-instances.tmpl.php
[edit]
[-] collaborators.tmpl.php
[edit]
[-] list-item-preview.tmpl.php
[edit]
[-] task-edit.tmpl.php
[edit]
[-] set-password.tmpl.php
[edit]
[-] users.tmpl.php
[edit]
[-] queue-sort.tmpl.php
[edit]
[-] dynamic-field-config.tmpl.php
[edit]
[-] thread-email-recipients.tmpl.php
[edit]
[-] task-print.tmpl.php
[edit]
[-] org-delete.tmpl.php
[edit]
[-] 2fas.tmpl.php
[edit]
[-] advanced-search-criteria.tmpl.php
[edit]
[-] mark-as.tmpl.php
[edit]
[-] queue-subnavigation.tmpl.php
[edit]
[-] user-account.tmpl.php
[edit]
[-] queue-sorting.tmpl.php
[edit]
[-] advanced-search-field.tmpl.php
[edit]
[-] schedule-diagnostic.tmpl.php
[edit]
[-] schedule-entry.tmpl.php
[edit]
[-] inline-form.tmpl.php
[edit]
[-] task-view.tmpl.php
[edit]
[-] dynamic-form.tmpl.php
[edit]
[-] queue-navigation.tmpl.php
[edit]
[-] quick-add.tmpl.php
[edit]
[-] note.tmpl.php
[edit]
[-] thread-email-headers.tmpl.php
[edit]
[-] queue-sorting-edit.tmpl.php
[edit]
[-] queue-columns.tmpl.php
[edit]
[-] email-oauth2auth.tmpl.php
[edit]
[-] org-lookup.tmpl.php
[edit]
[-] user.tmpl.php
[edit]
[-] thread-entries-preview.tmpl.php
[edit]
[-] dynamic-form-fields-view.tmpl.php
[edit]
[-] savedqueue-settings.tmpl.php
[edit]
[-] tasks-actions.tmpl.php
[edit]
[-] thread-entry-resend.tmpl.php
[edit]
[-] plugin-instance.tmpl.php
[edit]
[-] content-manage.tmpl.php
[edit]
[-] timezone.tmpl.php
[edit]
[-] schedule-add.tmpl.php
[edit]
[-] task-status.tmpl.php
[edit]
[-] email-mailbox.tmpl.php
[edit]
[-] transfer.tmpl.php
[edit]
[-] collaborators-preview.tmpl.php
[edit]
[-] task.tmpl.php
[edit]
[-] org-profile.tmpl.php
[edit]
[-] queue-column.tmpl.php
[edit]
[-] schedule-entries.tmpl.php
[edit]
[-] task-preview.tmpl.php
[edit]
[-] ticket-print.tmpl.php
[edit]