forked from verdnatura/hedera-web
36 lines
652 B
JavaScript
36 lines
652 B
JavaScript
|
|
Hedera.Address = new Class
|
|
({
|
|
Extends: Hedera.Form
|
|
|
|
,activate: function ()
|
|
{
|
|
this.$('model').setInfo ('a', 'address_view', 'hedera', ['id'], 'id');
|
|
this.$('model').setDefault ('customer_id', 'a',
|
|
new Sql.Function ({schema: 'account', name: 'userGetId'}));
|
|
}
|
|
|
|
,onStatusChange: function (form)
|
|
{
|
|
if (form.ready && this.$('params').$.address == 0)
|
|
form.insertRow ();
|
|
}
|
|
|
|
,onOperationsDone: function ()
|
|
{
|
|
Htk.Toast.showMessage (_('AddressChangedSuccessfully'));
|
|
this.onReturnClick ();
|
|
}
|
|
|
|
,onAcceptClick: function ()
|
|
{
|
|
this.$('iter').performOperations ();
|
|
}
|
|
|
|
,onReturnClick: function ()
|
|
{
|
|
window.history.back();
|
|
}
|
|
});
|
|
|