2015-03-19 19:36:11 +00:00
|
|
|
|
2016-09-26 09:28:47 +00:00
|
|
|
Hedera.Address = new Class
|
2015-03-19 19:36:11 +00:00
|
|
|
({
|
2016-09-26 09:28:47 +00:00
|
|
|
Extends: Hedera.Form
|
2015-03-19 19:36:11 +00:00
|
|
|
|
|
|
|
,activate: function ()
|
|
|
|
{
|
2015-03-27 19:10:49 +00:00
|
|
|
this.$('model').setInfo ('a', 'address_view', 'hedera', ['id'], 'id');
|
|
|
|
this.$('model').setDefault ('customer_id', 'a',
|
2016-10-17 06:52:14 +00:00
|
|
|
new Sql.Function ({schema: 'account', name: 'userGetId'}));
|
2015-03-19 19:36:11 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
,onStatusChange: function (form)
|
|
|
|
{
|
2015-07-10 12:30:08 +00:00
|
|
|
if (form.ready && this.$('address').value == 0)
|
2015-03-19 19:36:11 +00:00
|
|
|
form.insertRow ();
|
|
|
|
}
|
|
|
|
|
|
|
|
,onOperationsDone: function ()
|
|
|
|
{
|
2015-08-17 18:02:14 +00:00
|
|
|
Htk.Toast.showMessage (_('AddressChangedSuccessfully'));
|
2015-03-19 19:36:11 +00:00
|
|
|
this.onReturnClick ();
|
|
|
|
}
|
|
|
|
|
|
|
|
,onAcceptClick: function ()
|
|
|
|
{
|
|
|
|
this.$('iter').performOperations ();
|
|
|
|
}
|
|
|
|
|
|
|
|
,onReturnClick: function ()
|
|
|
|
{
|
|
|
|
window.history.back();
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|