Lines 1-5
Link Here
|
1 |
function _(s) { return s; } // dummy function for gettext |
1 |
function _(s) { return s; } // dummy function for gettext |
2 |
|
2 |
|
|
|
3 |
// http://stackoverflow.com/questions/1038746/equivalent-of-string-format-in-jquery/5341855#5341855 |
4 |
String.prototype.format = function() { return formatstr(this, arguments); }; |
5 |
function formatstr(str, col) { |
6 |
col = typeof col === 'object' ? col : Array.prototype.slice.call(arguments, 1); |
7 |
var idx = 0; |
8 |
return str.replace(/%%|%s|%(\d+)\$s/g, function (m, n) { |
9 |
if (m == "%%") { return "%"; } |
10 |
if (m == "%s") { return col[idx++]; } |
11 |
return col[n]; |
12 |
}); |
13 |
} |
14 |
|
3 |
jQuery.validator.addMethod( "category_code_check", function(value,element){ |
15 |
jQuery.validator.addMethod( "category_code_check", function(value,element){ |
4 |
var patt = /^[A-Za-z0-9]{0,10}$/g; |
16 |
var patt = /^[A-Za-z0-9]{0,10}$/g; |
5 |
if (patt.test(element.value)) { |
17 |
if (patt.test(element.value)) { |
Lines 114-119
$(document).ready(function() {
Link Here
|
114 |
required: true |
126 |
required: true |
115 |
}, |
127 |
}, |
116 |
password: { |
128 |
password: { |
|
|
129 |
required: true, |
130 |
password_strong: true, |
131 |
password_no_spaces: true |
132 |
}, |
133 |
password2: { |
134 |
required: true, |
117 |
password_match: true |
135 |
password_match: true |
118 |
} |
136 |
} |
119 |
}, |
137 |
}, |
120 |
- |
|
|