2015-10-29 16:27:14 +00:00
< ? php
/** @var array $_ */
2015-11-18 12:38:03 +00:00
use OCA\Federation\TrustedServers ;
2016-10-28 19:46:28 +00:00
/** @var \OCP\IL10N $l */
2015-10-29 16:27:14 +00:00
script ( 'federation' , 'settings-admin' );
style ( 'federation' , 'settings-admin' )
?>
< div id = " ocFederationSettings " class = " section " >
2017-04-25 15:45:02 +00:00
< h2 >< ? php p ( $l -> t ( 'Trusted servers' )); ?> </h2>
2017-04-24 17:09:30 +00:00
< 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.' )); ?> </p>
2015-10-29 16:27:14 +00:00
2015-11-18 14:07:41 +00:00
< p >
< input id = " autoAddServers " type = " checkbox " class = " checkbox " < ? php if ( $_ [ 'autoAddServers' ]) p ( 'checked' ); ?> />
2016-03-02 11:54:53 +00:00
< label for = " autoAddServers " >< ? php p ( $l -> t ( 'Add server automatically once a federated share was created successfully' )); ?> </label>
2015-10-29 16:27:14 +00:00
</ p >
< ul id = " listOfTrustedServers " >
< ? php foreach ( $_ [ 'trustedServers' ] as $trustedServer ) { ?>
2016-06-08 09:02:05 +00:00
< li id = " <?php p( $trustedServer['id'] ); ?> " >
2015-11-18 12:38:03 +00:00
< ? php if (( int ) $trustedServer [ 'status' ] === TrustedServers :: STATUS_OK ) { ?>
< span class = " status success " ></ span >
2016-02-26 16:51:20 +00:00
< ? php
} elseif (
( int ) $trustedServer [ 'status' ] === TrustedServers :: STATUS_PENDING ||
( int ) $trustedServer [ 'status' ] === TrustedServers :: STATUS_ACCESS_REVOKED
) { ?>
2015-11-18 12:38:03 +00:00
< span class = " status indeterminate " ></ span >
< ? php } else { ?>
< span class = " status error " ></ span >
< ? php } ?>
2015-10-29 16:27:14 +00:00
< ? php p ( $trustedServer [ 'url' ]); ?>
2016-06-08 09:02:05 +00:00
< span class = " icon icon-delete " ></ span >
2015-10-29 16:27:14 +00:00
</ li >
< ? php } ?>
</ ul >
2017-04-24 17:09:30 +00:00
< p id = " ocFederationAddServer " >
< button id = " ocFederationAddServerButton " class = " " >< ? php p ( $l -> t ( '+ Add trusted server' )); ?> </button>
< input id = " serverUrl " class = " hidden " type = " text " value = " " placeholder = " <?php p( $l->t ('Trusted server')); ?> " name = " server_url " />
< button id = " ocFederationSubmit " class = " hidden " >< ? php p ( $l -> t ( 'Add' )); ?> </button>
< span class = " msg " ></ span >
</ p >
2015-10-29 16:27:14 +00:00
</ div >