2020-10-31 21:56:02 +00:00
|
|
|
<vn-watcher
|
|
|
|
vn-id="watcher"
|
|
|
|
url="LdapConfigs"
|
|
|
|
data="$ctrl.config"
|
|
|
|
id-value="1"
|
|
|
|
form="form">
|
|
|
|
</vn-watcher>
|
|
|
|
<form
|
|
|
|
name="form"
|
|
|
|
ng-submit="watcher.submit()"
|
|
|
|
class="vn-w-md">
|
2020-11-07 20:05:14 +00:00
|
|
|
<vn-card class="vn-pa-lg" vn-focus>
|
2020-10-31 21:56:02 +00:00
|
|
|
<vn-vertical>
|
2020-11-02 18:58:07 +00:00
|
|
|
<vn-check
|
|
|
|
label="Enable synchronization"
|
|
|
|
ng-model="watcher.hasData">
|
|
|
|
</vn-check>
|
|
|
|
</vn-vertical>
|
|
|
|
<vn-vertical
|
|
|
|
ng-if="watcher.hasData"
|
|
|
|
class="vn-mt-md">
|
2020-10-31 21:56:02 +00:00
|
|
|
<vn-textfield
|
2020-11-02 18:58:07 +00:00
|
|
|
label="Server"
|
|
|
|
ng-model="$ctrl.config.server"
|
2020-11-07 20:05:14 +00:00
|
|
|
rule="LdapConfig">
|
2020-10-31 21:56:02 +00:00
|
|
|
</vn-textfield>
|
|
|
|
<vn-textfield
|
|
|
|
label="RDN"
|
|
|
|
ng-model="$ctrl.config.rdn"
|
|
|
|
rule="LdapConfig">
|
|
|
|
</vn-textfield>
|
|
|
|
<vn-textfield
|
|
|
|
label="Password"
|
|
|
|
ng-model="$ctrl.config.password"
|
|
|
|
type="password"
|
|
|
|
rule="LdapConfig">
|
|
|
|
</vn-textfield>
|
|
|
|
<vn-textfield
|
2020-11-02 18:58:07 +00:00
|
|
|
label="User DN"
|
|
|
|
ng-model="$ctrl.config.userDn"
|
2020-10-31 21:56:02 +00:00
|
|
|
rule="LdapConfig">
|
|
|
|
</vn-textfield>
|
|
|
|
<vn-textfield
|
|
|
|
label="Group DN"
|
|
|
|
ng-model="$ctrl.config.groupDn"
|
|
|
|
rule="LdapConfig">
|
|
|
|
</vn-textfield>
|
|
|
|
</vn-vertical>
|
|
|
|
</vn-card>
|
|
|
|
<vn-button-bar>
|
|
|
|
<vn-button
|
|
|
|
label="Undo changes"
|
|
|
|
ng-if="watcher.dataChanged()"
|
|
|
|
ng-click="watcher.loadOriginalData()">
|
|
|
|
</vn-button>
|
|
|
|
<vn-button
|
|
|
|
label="Synchronize now"
|
|
|
|
ng-if="watcher.hasData"
|
|
|
|
ng-click="$ctrl.onSynchronizeAll()">
|
|
|
|
</vn-button>
|
|
|
|
<vn-button
|
|
|
|
label="Synchronize user"
|
|
|
|
ng-if="watcher.hasData"
|
|
|
|
ng-click="syncUser.show()">
|
|
|
|
</vn-button>
|
|
|
|
</vn-button-bar>
|
|
|
|
<vn-submit
|
|
|
|
icon="save"
|
|
|
|
vn-tooltip="Save"
|
|
|
|
class="round"
|
|
|
|
fixed-bottom-right>
|
|
|
|
</vn-submit>
|
|
|
|
</form>
|
|
|
|
<vn-dialog
|
|
|
|
vn-id="syncUser"
|
|
|
|
on-accept="$ctrl.onUserSync()"
|
|
|
|
on-close="$ctrl.onPassClose()">
|
|
|
|
<tpl-body>
|
|
|
|
<vn-textfield
|
|
|
|
label="Username"
|
2020-11-07 13:05:48 +00:00
|
|
|
ng-model="$ctrl.syncUser"
|
|
|
|
vn-focus>
|
2020-10-31 21:56:02 +00:00
|
|
|
</vn-textfield>
|
|
|
|
<vn-textfield
|
|
|
|
label="Password"
|
|
|
|
ng-model="$ctrl.syncPassword"
|
|
|
|
type="password"
|
|
|
|
info="If password is not specified, just user attributes are synchronized">
|
|
|
|
</vn-textfield>
|
|
|
|
</tpl-body>
|
|
|
|
<tpl-buttons>
|
|
|
|
<input type="button" response="cancel" translate-attr="{value: 'Cancel'}"/>
|
|
|
|
<button response="accept" translate>Synchronize</button>
|
|
|
|
</tpl-buttons>
|
|
|
|
</vn-dialog>
|