common.js: Don't set default password quality/length in frontend.

The min quality/length values are always available via data
attributes. So there is no point of specefying a default value
in common.js.
This commit is contained in:
Vishnu Ks
2017-07-07 02:21:57 +05:30
committed by Tim Abbott
parent f2e6e16fe4
commit fcd944447e
2 changed files with 3 additions and 24 deletions

View File

@@ -32,18 +32,6 @@ var common = require("js/common.js");
return self;
}());
password = 'plain';
accepted = common.password_quality(password, bar);
assert(!accepted);
assert.equal(bar.w, '10.654507557627486%');
assert.equal(bar.added_class, 'bar-danger');
password = 'z!X4@S_&';
accepted = common.password_quality(password, bar);
assert(accepted);
assert.equal(bar.w, '47.679074269445294%');
assert.equal(bar.added_class, 'bar-success');
function password_field(min_length, min_quality) {
var self = {};