mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Tweaks to limits UI
This commit is contained in:
parent
481c1b52a6
commit
4ac6c7eeee
@ -72,16 +72,17 @@
|
||||
</div>
|
||||
|
||||
<div class="modal-body">
|
||||
<div class="panel-body">
|
||||
<div class="row" style="text-align:center">
|
||||
<div class="col-xs-12">
|
||||
<div id="payment-limits-slider"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div><br/>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div id="payment-limit-min-container">
|
||||
<label for="payment-limit-min">{{ trans('texts.min') }}</label><br>
|
||||
<div class="input-group">
|
||||
<div class="input-group" style="padding-bottom:8px">
|
||||
<span class="input-group-addon">{{ $currency->symbol }}</span>
|
||||
<input type="number" class="form-control" min="0" id="payment-limit-min"
|
||||
name="limit_min">
|
||||
@ -94,7 +95,7 @@
|
||||
<div id="payment-limit-max-container">
|
||||
<label for="payment-limit-max">{{ trans('texts.max') }}</label><br>
|
||||
|
||||
<div class="input-group">
|
||||
<div class="input-group" style="padding-bottom:8px">
|
||||
<span class="input-group-addon">{{ $currency->symbol }}</span>
|
||||
<input type="number" class="form-control" min="0" id="payment-limit-max"
|
||||
name="limit_max">
|
||||
@ -106,6 +107,7 @@
|
||||
</div>
|
||||
<input type="hidden" name="gateway_type_id" id="payment-limit-gateway-type">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal-footer" style="margin-top: 0px">
|
||||
<button type="button" class="btn btn-default"
|
||||
@ -168,24 +170,24 @@
|
||||
});
|
||||
|
||||
limitsSlider.noUiSlider.on('update', function (values, handle) {
|
||||
var value = values[handle];
|
||||
var value = Math.round(values[handle]);
|
||||
if (handle == 1) {
|
||||
$('#payment-limit-max').val(Math.round(value)).removeAttr('disabled');
|
||||
$('#payment-limit-max').val(value).removeAttr('disabled');
|
||||
$('#payment-limit-max-enable').prop('checked', true);
|
||||
} else {
|
||||
$('#payment-limit-min').val(Math.round(value)).removeAttr('disabled');
|
||||
$('#payment-limit-min').val(value).removeAttr('disabled');
|
||||
$('#payment-limit-min-enable').prop('checked', true);
|
||||
}
|
||||
});
|
||||
|
||||
$('#payment-limit-min').on('change keyup', function () {
|
||||
$('#payment-limit-min').on('change input', function () {
|
||||
setTimeout(function () {
|
||||
limitsSlider.noUiSlider.set([$('#payment-limit-min').val(), null]);
|
||||
}, 100);
|
||||
$('#payment-limit-min-enable').attr('checked', 'checked');
|
||||
});
|
||||
|
||||
$('#payment-limit-max').on('change keyup', function () {
|
||||
$('#payment-limit-max').on('change input', function () {
|
||||
setTimeout(function () {
|
||||
limitsSlider.noUiSlider.set([null, $('#payment-limit-max').val()]);
|
||||
}, 100);
|
||||
|
Loading…
x
Reference in New Issue
Block a user