mirror of
https://gitlab.com/uldvstar/exchange-2.0.git
synced 2026-08-22 14:04:02 +00:00
block non english input for purchase order form for description
This commit is contained in:
@@ -45,7 +45,7 @@
|
||||
<input type="text" class="form-control fs-10 b-rad-none" placeholder="Stock Code" v-model="product.stockCode" />
|
||||
</div>
|
||||
<div class="col-4 p-r-5 p-l-5">
|
||||
<textarea class="form-control fs-10 b-rad-none" placeholder="Description" rows="1" v-model="product.description"></textarea>
|
||||
<textarea class="form-control fs-10 b-rad-none" placeholder="Description" rows="1" @keypress="onlyEnglish($event)" v-model="product.description"></textarea>
|
||||
</div>
|
||||
<div class="col text-center p-r-5 p-l-5">
|
||||
<input type="text" class="form-control fs-10 b-rad-none text-center" placeholder="Quantity" v-model.lazy="product.quantity" v-mask="'#########'"/>
|
||||
@@ -191,6 +191,19 @@
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onlyEnglish(event){
|
||||
let ew = event.which;
|
||||
if(ew === 32)
|
||||
return true;
|
||||
if(48 <= ew && ew <= 57)
|
||||
return true;
|
||||
if(65 <= ew && ew <= 90)
|
||||
return true;
|
||||
if(97 <= ew && ew <= 122)
|
||||
return true;
|
||||
|
||||
return event.preventDefault();
|
||||
},
|
||||
submitForm(){
|
||||
|
||||
this.parameters = {
|
||||
|
||||
Reference in New Issue
Block a user