namibia
df0489e1eeeeab5a9bd44e1d84fce49924fe1bac
namibia / public / templates / page / valuationreport.js
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 |
var template_valuationreport = function( static ) { this.static = static; this.elements = { dateFrom : new App.TemplateElement.FieldComponent('dateFrom'), dateTo : new App.TemplateElement.FieldComponent('dateTo') }; this.ti = null; this.init = function( ti ) { this.ti = ti; App.DataStore.loadSelectListData('groups', true, 'Company', 'Group.SelectList'); App.API.getTask( 'reportPortalValuation', 'Report', 'Report.Valuation', null, {}, function(){}, _w.taskContractError ); this.ti.hydrate({ 'dateFrom' : { type : 'date', id : 'dateFrom', title : 'Date from', style : 'datepicker', value : '' }, 'dateTo' : { type : 'date', id : 'dateTp', title : 'Date to', style : 'datepicker', value : '' } }); }; this.construct = function() { $('#frmValuationReport').validate({ rules: { dateFrom: {required: false, dateISO: true}, dateTo: {required: false, dateISO: true} }, messages: { dateFrom: { dateISO: "Must be a valid date." }, dateTo: { dateISO: "Must be a valid date." } }, submitHandler: function( form ) { var data = {Report: _t['valuationreport'].harvest()}; App.API.execTask( 'reportPortalValuation', data, {}, function () {}, _w.taskExecError, 'EXPORT', true ); } }); $('#btnReport').prop('disabled', false); }; this.destruct = function() {}; }; |
Commits for namibiapublic/templates/page/valuationreport.js
Revision | Author | Commited | Message |
---|---|---|---|
df0489 ... | Mark | Fri 14 Oct, 2016 10:01:00 +0000 | initial commit |