1
0

settings-admin.php 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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 account directory. For example this will be used to auto-complete external accounts 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. <div class="serverUrl hidden">
  33. <div class="serverUrl-block">
  34. <label for="serverUrl"><?php p($l->t('Trusted server')); ?></label>
  35. <input id="serverUrl" type="text" value="" placeholder="<?php p($l->t('Trusted server')); ?>" name="server_url"/>
  36. <button id="ocFederationSubmit" class="hidden"><?php p($l->t('Add')); ?></button>
  37. </div>
  38. <span class="msg"></span>
  39. </div>
  40. </p>
  41. </div>