mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Focus and select location on override (#9503)
* Focus and select location on override * Submit location on enter key
This commit is contained in:
@@ -132,7 +132,7 @@ if ($_POST['editing']) {
|
||||
<div class="form-group">
|
||||
<label for="sysLocation" class="col-sm-2 control-label">Override sysLocation:</label>
|
||||
<div class="col-sm-6">
|
||||
<input onclick="edit.sysLocation.disabled=!edit.override_sysLocation.checked" type="checkbox" name="override_sysLocation"
|
||||
<input onclick="edit.sysLocation.disabled=!edit.override_sysLocation.checked; edit.sysLocation.select()" type="checkbox" name="override_sysLocation"
|
||||
<?php
|
||||
if ($device_model->override_sysLocation) {
|
||||
echo(' checked="1"');
|
||||
@@ -236,6 +236,12 @@ if ($_POST['editing']) {
|
||||
document.getElementById('edit-hostname-input').disabled = true;
|
||||
}
|
||||
});
|
||||
$('#sysLocation').keypress(function (e) {
|
||||
if(e.keyCode === 13) {
|
||||
e.preventDefault();
|
||||
$('#edit').submit();
|
||||
}
|
||||
});
|
||||
$('#parent_id').select2({
|
||||
width: 'resolve'
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user