settings-admin.php 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?php
  2. /** @var array $_ */
  3. use OCA\Federation\TrustedServers;
  4. /** @var \OCP\IL10N $l */
  5. script('federation', 'settings-admin');
  6. style('federation', 'settings-admin')
  7. ?>
  8. <div id="ocFederationSettings" class="section">
  9. <h2><?php p($l->t('Trusted servers')); ?></h2>
  10. <p class="settings-hint"><?php p($l->t('Federation allows you to connect with other trusted servers to exchange the user directory. For example this will be used to auto-complete external users for federated sharing. It is not necessary to add a server as trusted server in order to create a federated share.')); ?></p>
  11. <ul id="listOfTrustedServers">
  12. <?php foreach ($_['trustedServers'] as $trustedServer) { ?>
  13. <li id="<?php p($trustedServer['id']); ?>">
  14. <?php if ((int)$trustedServer['status'] === TrustedServers::STATUS_OK) { ?>
  15. <span class="status success"></span>
  16. <?php
  17. } elseif (
  18. (int)$trustedServer['status'] === TrustedServers::STATUS_PENDING ||
  19. (int)$trustedServer['status'] === TrustedServers::STATUS_ACCESS_REVOKED
  20. ) { ?>
  21. <span class="status indeterminate"></span>
  22. <?php } else {?>
  23. <span class="status error"></span>
  24. <?php } ?>
  25. <?php p($trustedServer['url']); ?>
  26. <span class="icon icon-delete"></span>
  27. </li>
  28. <?php } ?>
  29. </ul>
  30. <p id="ocFederationAddServer">
  31. <button id="ocFederationAddServerButton" class=""><?php p($l->t('+ Add trusted server')); ?></button>
  32. <input id="serverUrl" class="hidden" type="text" value="" placeholder="<?php p($l->t('Trusted server')); ?>" name="server_url"/>
  33. <button id="ocFederationSubmit" class="hidden"><?php p($l->t('Add')); ?></button>
  34. <span class="msg"></span>
  35. </p>
  36. </div>