3791 |
17 Mar 16 |
nicklas |
var MakeZip = function() |
3791 |
17 Mar 16 |
nicklas |
2 |
{ |
3791 |
17 Mar 16 |
nicklas |
var zip = {}; |
3791 |
17 Mar 16 |
nicklas |
var debug = 0; |
3791 |
17 Mar 16 |
nicklas |
5 |
|
3791 |
17 Mar 16 |
nicklas |
// Page initialization |
3791 |
17 Mar 16 |
nicklas |
zip.initPage = function() |
3791 |
17 Mar 16 |
nicklas |
8 |
{ |
3821 |
04 Apr 16 |
nicklas |
Events.addEventHandler('completedDate', 'blur', Wizard.validateDate); |
3821 |
04 Apr 16 |
nicklas |
10 |
|
3791 |
17 Mar 16 |
nicklas |
Buttons.addClickHandler('close', App.closeWindow); |
3791 |
17 Mar 16 |
nicklas |
Buttons.addClickHandler('btnOk', zip.makeZip); |
3791 |
17 Mar 16 |
nicklas |
13 |
} |
3791 |
17 Mar 16 |
nicklas |
14 |
|
3791 |
17 Mar 16 |
nicklas |
zip.makeZip = function() |
3791 |
17 Mar 16 |
nicklas |
16 |
{ |
3791 |
17 Mar 16 |
nicklas |
var frm = document.forms['options']; |
3821 |
04 Apr 16 |
nicklas |
if (!Wizard.isValid('completedDate')) |
3821 |
04 Apr 16 |
nicklas |
19 |
{ |
3821 |
04 Apr 16 |
nicklas |
Forms.showNotification('completedDate', 'Not a valid date'); |
3821 |
04 Apr 16 |
nicklas |
return; |
3821 |
04 Apr 16 |
nicklas |
22 |
} |
4993 |
02 Oct 18 |
nicklas |
var acceptDoNotUse = Doc.element('acceptDoNotUse'); |
4993 |
02 Oct 18 |
nicklas |
if (acceptDoNotUse && !acceptDoNotUse.checked) |
4993 |
02 Oct 18 |
nicklas |
25 |
{ |
4993 |
02 Oct 18 |
nicklas |
Forms.showNotification('acceptDoNotUse', 'Please verify that DoNotUse items should be published'); |
4993 |
02 Oct 18 |
nicklas |
return; |
4993 |
02 Oct 18 |
nicklas |
28 |
} |
3791 |
17 Mar 16 |
nicklas |
29 |
|
3791 |
17 Mar 16 |
nicklas |
var options = {}; |
3791 |
17 Mar 16 |
nicklas |
options.password = frm.password.value; |
3821 |
04 Apr 16 |
nicklas |
options.completedDate = frm.completedDate.value; |
3791 |
17 Mar 16 |
nicklas |
33 |
|
3791 |
17 Mar 16 |
nicklas |
window.opener.YellowLabel.createPilotReportZip(null, options); |
3791 |
17 Mar 16 |
nicklas |
App.closeWindow(); |
3791 |
17 Mar 16 |
nicklas |
36 |
} |
3791 |
17 Mar 16 |
nicklas |
37 |
|
3791 |
17 Mar 16 |
nicklas |
38 |
|
3791 |
17 Mar 16 |
nicklas |
return zip; |
3791 |
17 Mar 16 |
nicklas |
40 |
}(); |
3791 |
17 Mar 16 |
nicklas |
41 |
|
3791 |
17 Mar 16 |
nicklas |
Doc.onLoad(MakeZip.initPage); |
3791 |
17 Mar 16 |
nicklas |
43 |
|