mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Bootstrapping checkboxes (#10782)
This commit is contained in:
@@ -48,12 +48,7 @@ if (\Auth::user()->hasGlobalAdmin()) {
|
||||
<div class="form-group">
|
||||
<label for="recurring" class="col-sm-4 control-label">Recurring <strong class="text-danger">*</strong>: </label>
|
||||
<div class="col-sm-8">
|
||||
<label class="radio-inline">
|
||||
<input type="radio" id="recurring0" name="recurring" value="0" checked="checked"/> No
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" id="recurring1" name="recurring" value="1"/> Yes
|
||||
</label>
|
||||
<input type="checkbox" id="recurring" name="recurring" data-size="small" data-on-text="Yes" data-off-text="No" onChange="recurring_switch();"/>
|
||||
</div>
|
||||
</div>
|
||||
<div id="norecurringgroup">
|
||||
@@ -125,6 +120,7 @@ if (\Auth::user()->hasGlobalAdmin()) {
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
|
||||
$('#schedule-maintenance').on('hide.bs.modal', function (event) {
|
||||
$('#maps').val(null).trigger('change');
|
||||
$('#schedule_id').val('');
|
||||
@@ -142,7 +138,6 @@ $('#schedule-maintenance').on('hide.bs.modal', function (event) {
|
||||
|
||||
$('#start_recurring_hr').val('').data("DateTimePicker").minDate(false).maxDate(false);
|
||||
$('#end_recurring_hr').val('').data("DateTimePicker").minDate(false).maxDate(false);
|
||||
$("#recurring0").prop("checked", true);
|
||||
$('#recurring_day').prop('checked', false);
|
||||
$('#norecurringgroup').show();
|
||||
$('#recurringgroup').hide();
|
||||
@@ -187,7 +182,6 @@ $('#schedule-maintenance').on('show.bs.modal', function (event) {
|
||||
$('#end_recurring_dt').val('');
|
||||
$('#start_recurring_hr').val('');
|
||||
$('#end_recurring_hr').val('');
|
||||
$("#recurring0").prop("checked", true);
|
||||
$('#recurring_day').prop('checked', false);
|
||||
}else{
|
||||
var start_recurring_dt = $('#start_recurring_dt').data("DateTimePicker");
|
||||
@@ -204,8 +198,6 @@ $('#schedule-maintenance').on('show.bs.modal', function (event) {
|
||||
start_recurring_hr.date(output['start_recurring_hr']);
|
||||
$('#end_recurring_hr').data("DateTimePicker").date(output['end_recurring_hr']);
|
||||
|
||||
$("#recurring1").prop("checked", true);
|
||||
|
||||
var recdayupd = output['recurring_day'];
|
||||
if (recdayupd){
|
||||
var arrayrecdayupd = recdayupd.split(',');
|
||||
@@ -228,17 +220,15 @@ $('#schedule-maintenance').on('show.bs.modal', function (event) {
|
||||
}
|
||||
});
|
||||
|
||||
$('#sched-form input[name=recurring]').on('change', function() {
|
||||
var isrecurring = $('input[name=recurring]:checked', '#sched-form').val();
|
||||
if (isrecurring == 1){
|
||||
function recurring_switch() {
|
||||
if (document.getElementById("recurring").checked){
|
||||
$('#norecurringgroup').hide();
|
||||
$('#recurringgroup').show();
|
||||
}else{
|
||||
$('#norecurringgroup').show();
|
||||
$('#recurringgroup').hide();
|
||||
}
|
||||
});
|
||||
|
||||
};
|
||||
|
||||
$('#sched-submit').click('', function(e) {
|
||||
e.preventDefault();
|
||||
@@ -392,6 +382,7 @@ $(function () {
|
||||
});
|
||||
});
|
||||
|
||||
$("[name='recurring']").bootstrapSwitch();
|
||||
</script>
|
||||
<?php
|
||||
}
|
||||
|
||||
@@ -282,12 +282,9 @@ if (Config::get('distributed_poller') === true) {
|
||||
}//endif
|
||||
?>
|
||||
<div class="form-group">
|
||||
<div class="col-sm-offset-3 col-sm-9">
|
||||
<div class="checkbox">
|
||||
<label>
|
||||
<input type="checkbox" name="force_add" id="force_add"> Force add - No ICMP or SNMP checks performed
|
||||
</label>
|
||||
</div>
|
||||
<label for="force_add" class="col-sm-3 control-label">Force add<br><small>(No ICMP or SNMP checks performed)</small></label>
|
||||
<div class="col-sm-9">
|
||||
<input type="checkbox" name="force_add" id="force_add" data-size="small">
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
@@ -364,6 +361,7 @@ if (Config::get('distributed_poller') === true) {
|
||||
});
|
||||
|
||||
$("[name='snmp']").bootstrapSwitch('offColor','danger');
|
||||
$("[name='force_add']").bootstrapSwitch();
|
||||
<?php
|
||||
if (!$snmp_enabled) {
|
||||
echo ' $("[name=\'snmp\']").trigger(\'click\');';
|
||||
|
||||
Reference in New Issue
Block a user