File tree Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -457,10 +457,10 @@ <h3>填写公司信息</h3>
457
457
< input type ="text " class ="form-control " value ="未填写 " name ="post_code "/>
458
458
< p class ="help-block "> </ p >
459
459
</ div >
460
- < div class ="form-group " style =" display: none " >
461
- < label for ="post_address "> 详细地址 </ label >
462
- < input type ="text " class ="form-control " value ="未填写 " name ="post_address "/>
463
- < p class ="help-block "> </ p >
460
+ < div class ="form-group ">
461
+ < label for ="post_address "> 接受发票的邮箱地址 </ label >
462
+ < input type ="text " class ="form-control " value ="* " name ="post_address "/>
463
+ < p class ="help-block "> 如果不填写则发送到订单的注册邮箱,仅当需要发送到其它邮箱时候填写 </ p >
464
464
</ div >
465
465
</ form >
466
466
</ div >
Original file line number Diff line number Diff line change @@ -390,6 +390,14 @@ function submitInvoice() {
390
390
element . focus ( ) ;
391
391
return false ;
392
392
}
393
+
394
+ if ( name === 'post_address' && element . value . length > 4 ) {
395
+ var emailPattern = / ^ [ a - z A - Z 0 - 9 . _ % + - ] + @ [ a - z A - Z 0 - 9 . - ] + \. [ a - z A - Z ] { 2 , } $ / ;
396
+ if ( ! emailPattern . test ( element . value ) ) {
397
+ element . focus ( ) ;
398
+ return false ;
399
+ }
400
+ }
393
401
}
394
402
395
403
var url = server_url + '/product/invoices/' + ( invoice_id ? invoice_id + '/' : '' ) ;
You can’t perform that action at this time.
0 commit comments