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 630-644
$(document).ready(function() {
Link Here
|
630 |
[% END %] |
638 |
[% END %] |
631 |
[% IF minlength_cardnumber == maxlength_cardnumber %] |
639 |
[% IF minlength_cardnumber == maxlength_cardnumber %] |
632 |
<input type="text" id="cardnumber" name="cardnumber" size="20" value="[% cardnumber | html %]" minlength="[% minlength_cardnumber %]" maxlength="[% maxlength_cardnumber %]" /> |
640 |
<input type="text" id="cardnumber" name="cardnumber" size="20" value="[% cardnumber | html %]" minlength="[% minlength_cardnumber %]" maxlength="[% maxlength_cardnumber %]" /> |
633 |
[% IF mandatorycardnumber and not autoMemberNum %]<span class="required">Required</span>[% END %] |
641 |
[% 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> |
634 |
<div class="hint">Card number must be exactly [% minlength_cardnumber %] characters.</div> |
642 |
<div class="hint">Card number must be exactly [% minlength_cardnumber %] characters.</div> |
635 |
[% ELSIF minlength_cardnumber && maxlength_cardnumber %] |
643 |
[% ELSIF minlength_cardnumber && maxlength_cardnumber %] |
636 |
<input type="text" id="cardnumber" name="cardnumber" size="20" value="[% cardnumber | html %]" minlength="[% minlength_cardnumber %]" maxlength="[% maxlength_cardnumber %]" /> |
644 |
<input type="text" id="cardnumber" name="cardnumber" size="20" value="[% cardnumber | html %]" minlength="[% minlength_cardnumber %]" maxlength="[% maxlength_cardnumber %]" /> |
637 |
[% IF mandatorycardnumber and not autoMemberNum %]<span class="required">Required</span>[% END %] |
645 |
[% 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> |
638 |
<div class="hint">Card number must be between [% minlength_cardnumber %] and [% maxlength_cardnumber %] characters.</div> |
646 |
<div class="hint">Card number must be between [% minlength_cardnumber %] and [% maxlength_cardnumber %] characters.</div> |
639 |
[% ELSIF maxlength_cardnumber %] |
647 |
[% ELSIF maxlength_cardnumber %] |
640 |
<input type="text" id="cardnumber" name="cardnumber" size="20" value="[% cardnumber | html %]" maxlength="[% maxlength_cardnumber %]" /> |
648 |
<input type="text" id="cardnumber" name="cardnumber" size="20" value="[% cardnumber | html %]" maxlength="[% maxlength_cardnumber %]" /> |
641 |
[% IF mandatorycardnumber and not autoMemberNum %]<span class="required">Required</span>[% END %] |
649 |
[% 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> |
642 |
<div class="hint">Card number can be up to [% maxlength_cardnumber %] characters.</div> |
650 |
<div class="hint">Card number can be up to [% maxlength_cardnumber %] characters.</div> |
643 |
[% ELSE %] |
651 |
[% ELSE %] |
644 |
<input type="text" id="cardnumber" name="cardnumber" size="20" value="[% cardnumber | html %]" /> |
652 |
<input type="text" id="cardnumber" name="cardnumber" size="20" value="[% cardnumber | html %]" /> |
645 |
- |
|
|