Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- onDeregistrationButton : function() {
- var subunitField = this.lookup('subunitField'),
- commonPdnDescription = this.lookup('cntrCitizenRegistrationInfo'),
- deregistrationBlockPosition = commonPdnDescription.items.indexOf(subunitField),
- pdnDeregistration = this.lookup('pdnDeregistration'),
- juvCase = this.getViewModel().get('juvCase');
- if (!pdnDeregistration) {
- this.lookup('deregistrationButton').setText('Отменить снятие');
- commonPdnDescription.insert(deregistrationBlockPosition, this.getView().createDeregistrationBlock(this.isRegistrationParent()));
- juvCase.set('deregistrationDate', null);
- juvCase.set('deregistrationCauseId', null);
- }
- else {
- this.lookup('deregistrationButton').setText('Снять с учета');
- commonPdnDescription.remove(pdnDeregistration);
- juvCase.set('deregistrationDate', null);
- juvCase.set('deregistrationCauseId', null);
- }
- },
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement