This repository was archived by the owner on Apr 24, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +15
-4
lines changed
app/design/adminhtml/default/default/template/uol/pagseguro
skin/adminhtml/default/default/uol/pagseguro/js Expand file tree Collapse file tree 2 files changed +15
-4
lines changed Original file line number Diff line number Diff line change @@ -51,8 +51,8 @@ $url = $obj->getUrl('pagseguro/adminhtml_conciliation');
51
51
</tr>
52
52
<tr>
53
53
<th width="8%" class="input-search">
54
- <input type="text" class="pagseguro-field" name="date_begin" id="date_begin" OnKeyUp="dateMask(this.value, 'date_begin')" maxlength="10" placeholder="De"/>
55
- <input type="text" class="pagseguro-field input-date" name="date_end" id="date_end" OnKeyUp="dateMask(this.value, 'date_end')" maxlength="10" placeholder="Até"/>
54
+ <input type="text" class="pagseguro-field" name="date_begin" id="date_begin" OnKeyUp="dateMask(this.value, 'date_begin')" onblur="dateVerifyOnLosesFocus(this)" maxlength="10" placeholder="De"/>
55
+ <input type="text" class="pagseguro-field input-date" name="date_end" id="date_end" OnKeyUp="dateMask(this.value, 'date_end')" onblur="dateVerifyOnLosesFocus(this)" maxlength="10" placeholder="Até"/>
56
56
</th>
57
57
<th width="20%" class="input-search"><input type="text" class="pagseguro-field" name="id_magento" id="id_magento" placeholder="ID Magento"/></th>
58
58
<th width="35%" class="input-search"><input type="text" class="pagseguro-field" name="id_pagseguro" id="id_pagseguro" placeholder="ID PagSeguro"/></th>
Original file line number Diff line number Diff line change @@ -472,8 +472,19 @@ function dateMask (date, fieldName) {
472
472
if ( field . value == "" ) {
473
473
field . classList . remove ( 'pagseguro-field-error' ) ;
474
474
}
475
- }
476
-
475
+ }
476
+
477
+ function dateVerifyOnLosesFocus ( fieldName ) {
478
+ var mydate = '' ;
479
+ mydate = mydate + fieldName . value ;
480
+
481
+ if ( mydate . length > 0 && mydate . length < 10 ) {
482
+ fieldName . classList . add ( 'pagseguro-field-error' ) ;
483
+ } else {
484
+ dateVerify ( fieldName ) ;
485
+ }
486
+ }
487
+
477
488
function dateVerify ( field ) {
478
489
479
490
day = ( field . value . substring ( 0 , 2 ) ) ;
You can’t perform that action at this time.
0 commit comments