export default new Class({
	Extends: Hedera.Form,
	Template: require('./ui.xml'),

	activate() {
		this.$.model.setInfo('a', 'myAddress', 'hedera', ['id'], 'id');
		this.$.model.setDefault('clientFk', 'a',
			new Sql.Function({schema: 'account', name: 'myUser_getId'}));
	},
	
	onStatusChange() {
		if (this.$.iter.ready && this.hash.$.address == 0)
			this.$.iter.insertRow();
	},
	
	onOperationsDone() {
		Htk.Toast.showMessage(_('AddressChangedSuccessfully'));
		window.history.back()
	}
});