hedera-web/forms/admin/users/users.js

35 lines
640 B
JavaScript

Hedera.Users = new Class
({
Extends: Hedera.Form
,onAccessLogClick: function (button, form)
{
this.hash.set ({
'form': 'admin/access-log'
,'user': form.get ('id')
});
}
,rendererFunc: function (scope, form)
{
var isEnabled = form.get('active')
scope.$('disabled').style.display = isEnabled ?
'none' : 'block';
scope.$('impersonate').node.style.display = isEnabled ?
'block' : 'none';
}
,onChangeUserClick: function (button, form)
{
this.gui.supplantUser (form.get ('name'),
this.onUserSupplant.bind (this));
}
,onUserSupplant: function ()
{
this.hash.set ({form: 'ecomerce/orders'});
}
});