StocksNew/Modules/Product/resources/views/product/create.blade.php

28 lines
979 B
PHP
Raw Normal View History

2024-08-27 12:03:06 +00:00
@extends('layouts.app')
@section('content')
<div class="page-content">
<div class="container-fluid">
@include('layouts.partials.breadcrumb', ['title' => $title])
{{ html()->form('POST')->route('product.store')->class(['needs-validation'])->attributes(['novalidate', 'enctype' => 'multipart/form-data'])->open() }}
@include('product::product.partials.action')
{{ html()->form()->close() }}
</div>
</div>
@endsection
@push('js')
<script src="{{ asset('assets/js/pages/form-validation.init.js') }}"></script>
2024-09-19 12:48:08 +00:00
<script>
function validateNumericInput(input) {
// Allow only numbers and remove any non-numeric input
input.value = input.value.replace(/[^0-9.]/g, '');
input.value = input.value.replace(/(\..*)\./g, '$1');
input.value = input.value.replace(/^(\d+)(\.\d{0,2})?.*/, '$1$2');
}
</script>
2024-08-27 12:03:06 +00:00
@endpush