Lines 36-42
$(document).ready(function() {
Link Here
|
36 |
}); |
36 |
}); |
37 |
|
37 |
|
38 |
$(document).ready(function() { |
38 |
$(document).ready(function() { |
39 |
|
39 |
$("#cn_max").hide(); |
|
|
40 |
var max_len = [% maxlength_cardnumber %]; |
41 |
$("#cardnumber").change(function(){ |
42 |
if ( $("#cardnumber").val().length >= max_len ) { |
43 |
$("#cn_max").show(); |
44 |
} else { |
45 |
$("#cn_max").hide(); |
46 |
} |
47 |
}); |
40 |
var toggle_quick_add = $(".toggle_quick_add"); |
48 |
var toggle_quick_add = $(".toggle_quick_add"); |
41 |
$(toggle_quick_add).click(function(e){ |
49 |
$(toggle_quick_add).click(function(e){ |
42 |
toggle_quick_add.toggle(); |
50 |
toggle_quick_add.toggle(); |
Lines 611-625
$(document).ready(function() {
Link Here
|
611 |
[% END %] |
619 |
[% END %] |
612 |
[% IF minlength_cardnumber == maxlength_cardnumber %] |
620 |
[% IF minlength_cardnumber == maxlength_cardnumber %] |
613 |
<input type="text" id="cardnumber" name="cardnumber" size="20" value="[% cardnumber | html %]" minlength="[% minlength_cardnumber %]" maxlength="[% maxlength_cardnumber %]" /> |
621 |
<input type="text" id="cardnumber" name="cardnumber" size="20" value="[% cardnumber | html %]" minlength="[% minlength_cardnumber %]" maxlength="[% maxlength_cardnumber %]" /> |
614 |
[% IF mandatorycardnumber and not autoMemberNum %]<span class="required">Required</span>[% END %] |
622 |
[% IF mandatorycardnumber and not autoMemberNum %]<span class="required">Required</span>[% END %]<span id="cn_max" class="required">Card number must not be more than [% maxlength_cardnumber %] characters.</span> |
615 |
<div class="hint">Card number must be exactly [% minlength_cardnumber %] characters.</div> |
623 |
<div class="hint">Card number must be exactly [% minlength_cardnumber %] characters.</div> |
616 |
[% ELSIF minlength_cardnumber && maxlength_cardnumber %] |
624 |
[% ELSIF minlength_cardnumber && maxlength_cardnumber %] |
617 |
<input type="text" id="cardnumber" name="cardnumber" size="20" value="[% cardnumber | html %]" minlength="[% minlength_cardnumber %]" maxlength="[% maxlength_cardnumber %]" /> |
625 |
<input type="text" id="cardnumber" name="cardnumber" size="20" value="[% cardnumber | html %]" minlength="[% minlength_cardnumber %]" maxlength="[% maxlength_cardnumber %]" /> |
618 |
[% IF mandatorycardnumber and not autoMemberNum %]<span class="required">Required</span>[% END %] |
626 |
[% IF mandatorycardnumber and not autoMemberNum %]<span class="required">Required</span>[% END %]<span id="cn_max" class="required">Card number must not be more than [% maxlength_cardnumber %] characters.</span> |
619 |
<div class="hint">Card number must be between [% minlength_cardnumber %] and [% maxlength_cardnumber %] characters.</div> |
627 |
<div class="hint">Card number must be between [% minlength_cardnumber %] and [% maxlength_cardnumber %] characters.</div> |
620 |
[% ELSIF maxlength_cardnumber %] |
628 |
[% ELSIF maxlength_cardnumber %] |
621 |
<input type="text" id="cardnumber" name="cardnumber" size="20" value="[% cardnumber | html %]" maxlength="[% maxlength_cardnumber %]" /> |
629 |
<input type="text" id="cardnumber" name="cardnumber" size="20" value="[% cardnumber | html %]" maxlength="[% maxlength_cardnumber %]" /> |
622 |
[% IF mandatorycardnumber and not autoMemberNum %]<span class="required">Required</span>[% END %] |
630 |
[% IF mandatorycardnumber and not autoMemberNum %]<span class="required">Required</span>[% END %]<span id="cn_max" class="required">Card number must not be more than [% maxlength_cardnumber %] characters.</span> |
623 |
<div class="hint">Card number can be up to [% maxlength_cardnumber %] characters.</div> |
631 |
<div class="hint">Card number can be up to [% maxlength_cardnumber %] characters.</div> |
624 |
[% ELSE %] |
632 |
[% ELSE %] |
625 |
<input type="text" id="cardnumber" name="cardnumber" size="20" value="[% cardnumber | html %]" /> |
633 |
<input type="text" id="cardnumber" name="cardnumber" size="20" value="[% cardnumber | html %]" /> |
626 |
- |
|
|