fixes
This commit is contained in:
@@ -1,18 +1,20 @@
|
||||
@once
|
||||
@push('scripts')
|
||||
<script>
|
||||
function initSaveForm(form, sel) {
|
||||
var form = (typeof(form) == 'undefined') ? '#form' : form;
|
||||
var selector = (typeof(sel) == 'undefined') ? '.save' : sel;
|
||||
$(selector).off().click(function(e) {
|
||||
e.preventDefault();
|
||||
var $button = $(this).find('i .fa-save').first();
|
||||
$button.removeClass('fa-save');
|
||||
$button.addClass('fa-spinner fa-spin');
|
||||
$(form).submit();
|
||||
});
|
||||
}
|
||||
</script>
|
||||
@endpush
|
||||
@php(define('LOAD_SAVE', true))
|
||||
@endonce
|
||||
@push('scripts')
|
||||
<script>
|
||||
function initSaveForm(form, sel) {
|
||||
initValidator();
|
||||
var form = (typeof(form) == 'undefined') ? '#form' : form;
|
||||
var selector = (typeof(sel) == 'undefined') ? '.save' : sel;
|
||||
$(selector).off().click(function(e) {
|
||||
e.preventDefault();
|
||||
if ($(form).valid()) {
|
||||
$(this).prop("disabled", true);
|
||||
$(this).html($(this).data('loading-text'));
|
||||
$(form).submit();
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
@endpush
|
||||
@php(define('LOAD_SAVE', true))
|
||||
@endonce
|
||||
|
||||
Reference in New Issue
Block a user