feat: actionable metrics, LDAP log parsing, UI updates
This commit is contained in:
@@ -64,6 +64,7 @@ async function fetchUsernameSuggestions() {
|
||||
// simply can't bind). Disabling (not just hiding) keeps disabled
|
||||
// fields out of both form serialization and validation.
|
||||
$form.find('[name=mail]').prop('disabled', checked).closest('.mb-3').toggle(!checked);
|
||||
$form.find('[name=mobile]').prop('disabled', checked).closest('.mb-3').toggle(!checked);
|
||||
$form.find('[name=userPassword]').prop('disabled', checked).closest('.mb-3').toggle(!checked);
|
||||
$form.find('[name=passwordMatch]').prop('disabled', checked).closest('.mb-3').toggle(!checked);
|
||||
|
||||
@@ -166,3 +167,18 @@ async function fetchUsernameSuggestions() {
|
||||
</div>
|
||||
<button type="submit" class="btn btn-outline-dark">Add</button>
|
||||
</form>
|
||||
<script>
|
||||
$(document).ready(async function() {
|
||||
const $loc = $('[name="location"]');
|
||||
if (!$loc.val()) {
|
||||
try {
|
||||
const dirRes = await app.api.get('directory-admin/resources');
|
||||
const resources = dirRes.results || [];
|
||||
const site = resources.find(r => r.kind === 'site' && r.metadata && r.metadata.isCurrentSite);
|
||||
if (site) {
|
||||
$loc.val(site.name);
|
||||
}
|
||||
} catch(e) {}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user