var project={"_id":"624c5570f2b9a3f8f8e8f29f","id":"dafd7bb15603e633d75732c618c5d7dc5c0f07dd","name":"SAFE Fund Collect","user":"566ac9850286a8f9080cdd79","description":"Attempt to collect 100 project ideas","created":"2017-11-22T14:09:16.475Z","shared":false,"server":"micro","datafiles":[{"file":{"link":"https://n2ep8ya9xb.execute-api.us-east-1.amazonaws.com/prod/calendar?TableName=projectideas","type":"URL/API","url":"https://n2ep8ya9xb.execute-api.us-east-1.amazonaws.com/prod/calendar?TableName=projectideas","message":{"error":false,"text":""}},"varname":"ideas","title":"Ideas","activated":true,"name":"datafile","linkedtofile":true,"optional":true,"content":"","sendtojs":false}],"packs":["jquery"],"container":"mainpart","js":{"file":{"type":"","url":"","link":"","message":{"error":true,"text":"File not defined"},"depurl":"https://quipslibistars.s3.amazonaws.com/prod/dafd7bb15603e633d75732c618c5d7dc5c0f07dd/script.js"},"title":"Javascript","activated":true,"name":"js","linkedtofile":false,"optional":true,"content":"\n//events\n\nvar wpmodal = new bootstrap.Modal(document.getElementById('wpmodal'))\nconsole.log(wpmodal)\n\nvar key=new Date().getTime()\n$(\".update\").hide()\n\n\nif (window.location.href.split(\"key=\").length>1) {\n key=window.location.href.split(\"key=\")[1]\n $(\".new\").hide()\n $(\".update\").show()\n $(\"#download\").show()\n populate(key)\n}\nif (window.location.href.split(\"consult=\").length>1) {\n key=window.location.href.split(\"consult=\")[1]\n $(\".new\").hide()\n $(\".update\").hide()\n $(\"#download\").show()\n $(\".modwp\").hide()\n $(\".chevrons\").hide()\n $(\"#addexpert\").hide()\n $(\"#addworkplanitem\").hide()\n $(\".deleterow\").hide()\n $(\".container textarea\").attr(\"disabled\",\"disabled\")\n $(\".container input\").attr(\"disabled\",\"disabled\")\n populate(key)\n}\n$(\"#print\").click(function(e){\n e.preventDefault()\n window.location.href=\"http://quips.anbdata.com/project/prod/dafd7bb15603e633d75732c618c5d7dc5c0f07dd/page.html?printit=true&key=\"+$(this).attr(\"key\")\n})\n$(\"#togglemore\").click(function(e){\n $(\"#additionaldetails\").toggle()\n})\n\n$(\"#addworkplanitem\").click(function(e){\n e.preventDefault()\n var l=$(\"#workplanitems .cardwpitem\").length+1\n $(\"#wpmodal .wpfields[name='item']\").val(\"WP-0\"+l)\n $(\"#wpmodal\").attr(\"mod\",\"new\")\n \n \n wpmodal.toggle()\n})\n\n\n$(\"#workplanitems\").on(\"click\",\".up\",function(e){\n e.preventDefault()\n var thisitem=$(this).closest(\".cardwpitem\")\n var previtem=$(thisitem).prev()\n var pkey=$(previtem).attr(\"item\")\n var thiskey=$(thisitem).attr(\"item\")\n $(thisitem).attr(\"item\",pkey)\n $(thisitem).find(\".wpitem[name='item']\").text(pkey)\n $(previtem).attr(\"item\",thiskey)\n $(previtem).find(\".wpitem[name='item']\").text(thiskey)\n $(previtem).before(thisitem)\n arrange_chevrons()\n \n})\n\n$(\"#workplanitems\").on(\"click\",\".down\",function(e){\n e.preventDefault()\n var thisitem=$(this).closest(\".cardwpitem\")\n var nextitem=$(thisitem).next()\n var nkey=$(nextitem).attr(\"item\")\n var thiskey=$(thisitem).attr(\"item\")\n $(thisitem).attr(\"item\",nkey)\n $(thisitem).find(\".wpitem[name='item']\").text(nkey)\n $(nextitem).attr(\"item\",thiskey)\n $(nextitem).find(\".wpitem[name='item']\").text(thiskey)\n $(nextitem).after(thisitem)\n arrange_chevrons()\n \n})\n\n\n$(\"#workplanitems\").on(\"click\",\".modwp\",function(e){\n e.preventDefault()\n if ($(this).attr(\"action\")==\"edit\") {\n populate_edit($(this).closest(\".card\"))\n $(\"#wpmodal\").attr(\"mod\",\"edit\")\n wpmodal.show()\n\n }\n if ($(this).attr(\"action\")==\"delete\") {\n $(this).closest(\".card\").remove()\n updatecosts()\n }\n \n \n \n})\n\n$(\"#expertlist\").on(\"click\",\".deleterow\",function(e){\n $(this).closest(\".row\").remove() \n \n})\n\n\n$(\"#savewpchange\").click(function(e){\n e.preventDefault()\n var card\n var item=$(\"#wpmodal .wpfields[name='item']\").val()\n \n if ($(\"#wpmodal\").attr(\"mod\")==\"new\") {\n var card=$(\".defaultwpitem\").clone()\n $(card).removeClass(\"defaultwpitem\").addClass(\"cardwpitem\")\n \n }\n else {\n card=$(\".cardwpitem[item='\"+item+\"']\")\n }\n \n \n $(\"#wpmodal .wpfields\").each(function(i,v){\n $(card).find(\".wpitem[name='\"+$(v).attr(\"name\")+\"']\").text($(v).val())\n })\n $(card).find(\".opdiv\").hide()\n $(card).find(\".opdiv\").each(function(i,v){\n if ($(v).find(\".wpitem:eq(0)\").text()!=\"\") $(v).show() \n })\n var total=0\n if ($(\".wpfields[name='dsa_units']\").val()!=\"\") {\n total+=Number($(\".wpfields[name='dsa_units']\").val())*Number($(\".wpfields[name='dsa_unit_cost']\").val())\n }\n if ($(\".wpfields[name='sme_units']\").val()!=\"\") {\n total+=Number($(\".wpfields[name='sme_units']\").val())*Number($(\".wpfields[name='sme_unit_cost']\").val())\n }\n if ($(\".wpfields[name='travel_units']\").val()!=\"\") {\n total+=Number($(\".wpfields[name='travel_units']\").val())*Number($(\".wpfields[name='travel_unit_cost']\").val())\n }\n if ($(\".wpfields[name='training_units']\").val()!=\"\") {\n total+=Number($(\".wpfields[name='training_units']\").val())*Number($(\".wpfields[name='training_unit_cost']\").val())\n }\n if ($(\".wpfields[name='specific_unit_cost']\").val()!=\"\") {\n total+=Number($(\".wpfields[name='specific_unit_cost']\").val())\n }\n $(card).find(\".wpitem[name='total_cost']\").text(total)\n if ($(\"#wpmodal\").attr(\"mod\")==\"new\") {\n $(card).attr(\"item\",item)\n $(\"#workplanitems\").append(card)\n $(card).show()\n }\n wpmodal.hide()\n updatecosts()\n arrange_chevrons()\n})\n\n$(\"#addexpert\").click(function(e){\n e.preventDefault()\n var line=$(\".defaultsmerow\").clone()\n $(line).removeClass(\"defaultsmerow\").addClass(\"mainsmerow\")\n $(line).css(\"display\",\"\")\n $(\"#expertlist\").append(line)\n})\n\n$(\"#submit,#update,#download\").click(function(e){\n e.preventDefault()\n var orig=$(this).attr(\"id\")\n if (orig==\"download\") $(\"#gendoc\").show()\n var data={key:\"\"+key,projecttype:\"SAFE\"}\n \n var someempty=false\n $(\".fields\").each(function(i,v){\n data[$(v).attr(\"id\")]=$(v).val()\n if ($(v).val()==\"\" && $(v).hasClass(\"required\")) someempty=true\n })\n data.wp=[]\n data.pm_costs=$(\"#pm_costs\").text()\n data.total_project_costs=$(\"#total_project_costs\").text()\n data.subtotal=(Number(data.total_project_costs)-Number(data.pm_costs)).toString()\n $(\".cardwpitem\").each(function(i,card){\n var wp={}\n $(card).find(\".wpitem\").each(function(i,v){\n \n var d=$(v).text()\n var name=$(v).attr(\"name\")\n wp[name]=d\n \n \n })\n data.wp.push(wp)\n })\n \n data.sme=[]\n $(\".mainsmerow\").each(function(i,row){\n var sme={\n area:$(row).find(\"input:eq(0)\").val(),\n jobid:$(row).find(\"input:eq(1)\").val(),\n task_description:$(row).find(\"textarea:eq(0)\").val()\n }\n data.sme.push(sme)\n \n })\n console.log(data)\n \n if (someempty) {\n $(\"#someempty\").show()\n }\n else {\n $(\"#someempty\").hide()\n postdata(data,function(){\n if (orig==\"submit\") {\n \n \n swal(\"Good job!\", \"Thank you for your project proposal. A confirmation email was sent to you with your idea and a link to modify it if needed. Don't hesitate to submit more!\", \"success\")\n .then((value) => {\n window.location.href=window.location.href.split(\"?\")[0]+\"?key=\"+key\n });\n }\n if (orig==\"update\") {\n \n \n swal(\"Good job!\", \"Your project was updated. A confirmation email was sent to you with the updated information.\", \"success\")\n .then((value) => {\n });\n }\n if (orig==\"download\") {\n getdoc(key,function(d){\n $(\"#gendoc\").hide()\n window.open(d.url)\n console.log(d)\n })\n \n }\n \n \n })\n }\n \n})\n\n$(\"#delete\").click(function(e){\n e.preventDefault()\n if (confirm(\"You are sure you want to delete this proposal?\")) {\n\n deletedata(key,function(){\n window.location.href=window.location.href.split(\"?\")[0]\n })\n }\n})\n\n// Funtions\n\nfunction arrange_chevrons() {\n var l=$(\"#workplanitems .cardwpitem\").length\n $(\"#workplanitems .cardwpitem\").each(function(i,v){\n if (i==0) {\n $(v).find(\".up\").hide()\n $(v).find(\".down\").show()\n }\n else if (i==l-1) {\n $(v).find(\".down\").hide()\n $(v).find(\".up\").show()\n }\n else {\n $(v).find(\".up\").show()\n $(v).find(\".down\").show()\n }\n })\n}\n\nfunction updatecosts() {\n var total=0\n $(\"#workplanitems .cardwpitem .wpitem[name='total_cost']\").each(function(i,v){\n total+=Number($(v).text())\n \n })\n var pm=Math.round(total*0.115)\n var gtotal=pm+total\n $(\"#pm_costs\").text(pm)\n $(\"#total_project_costs\").text(gtotal)\n}\n\nfunction populate_edit(card) {\n $(card).find(\".wpitem\").each(function(i,v){\n var d=$(v).text()\n var name=$(v).attr(\"name\")\n $(\"#wpmodal .wpfields[name='\"+name+\"']\").val(d)\n })\n}\n\nfunction populate(key){\n getdata(key,function(data){\n if (!data) {\n alert(\"We cannot find that project idea.\")\n window.location.href=window.location.href.split(\"?\")[0]\n }\n else {\n $(\".fields\").each(function(i,v){\n $(v).val(data[$(v).attr(\"id\")])\n })\n if (data.total_project_costs) $(\"#total_project_costs\").text(data.total_project_costs)\n if (data.pm_costs) $(\"#pm_costs\").text(data.pm_costs)\n if (data.wp) {\n data.wp.forEach(function(wp){\n $(\"#wpmodal\").attr(\"mod\",'new')\n $(\"#wpmodal .wpfields\").each(function(i,v){\n $(v).val(wp[$(v).attr(\"name\")])\n })\n $(\"#savewpchange\").trigger(\"click\")\n \n })\n }\n if (data.sme) {\n data.sme.forEach(function(sme){\n $(\"#addexpert\").trigger(\"click\")\n var row=$(\"#expertlist .mainsmerow:last\")\n $(row).find(\"input:eq(0)\").val(sme.area)\n $(row).find(\"input:eq(1)\").val(sme.jobid)\n $(row).find(\"textarea:eq(0)\").val(sme.task_description)\n \n })\n }\n }\n $(\"#print\").attr(\"key\",key)\n if (window.location.href.split(\"printit=\").length>1) {\n toggleprintview(data)\n \n }\n })\n}\nfunction getdata(key,next){\n$.getJSON(\"https://n2ep8ya9xb.execute-api.us-east-1.amazonaws.com/prod/calendar?callback=?\",\n {TableName:\"projectideas\",action:\"get\",key:\"\"+key},\n function(res){\n next(res.Item)\n })\n}\n \nfunction deletedata(key,next){\n$.getJSON(\"https://n2ep8ya9xb.execute-api.us-east-1.amazonaws.com/prod/calendar?callback=?\",\n {TableName:\"projectideas\",action:\"delete\",key:\"\"+key},\n function(res){\n next()\n })\n}\n \nfunction toggleprintview(data){\n $(\".noprint\").hide()\n $(\".form-text\").hide()\n $(\"#additionaldetails\").show()\n $(\"label span\").hide()\n $(\"input,textarea\").each(function(i,v){\n var val=$(v).val()\n var div=$(\"
\")\n if (val!=\"\") {\n val.split(\"\\n\").forEach(function(para){\n $(div).append(\"

\"+para+\"

\")\n })\n \n }\n $(v).after(div)\n $(v).hide()\n })\n $(\"#proposedby\").html(\"

Proposed by \"+data.email+\" on \"+new Date(Number(data.key)).toISOString()+\"

\")\n window.print()\n}\n\nfunction senddata(d,next){\n console.log(JSON.stringify({TableName:\"projectideas\",Item:d}))\n $.getJSON(\"https://n2ep8ya9xb.execute-api.us-east-1.amazonaws.com/prod/calendar?callback=?\",\n {action:\"put\",data:JSON.stringify({TableName:\"projectideas\",Item:d})},\n function(res){\n //logit(d)\n next(false)\n console.log(res);console.log(\"stored\")})\n .error(function(){next(true) })\n \n \n \n}\n\nfunction postdata(d,next){\n $.ajax({\n type: \"POST\",\n url: \"https://9v48gd2yhb.execute-api.us-east-1.amazonaws.com/default/ISprojectCRUD\",\n crossDomain: true,\n data: JSON.stringify({TableName:\"projectideas\",Item:d}),\n dataType: 'json',\n success: function (data) {\n // do something with server response data\n next()\n },\n error: function (err) {\n // handle your error logic here\n alert(\"ERROR - The form could not be submitted.\")\n }\n });\n}\n\nfunction getdoc(pid,next){\n $.ajax({\n type: \"GET\",\n url: \"https://9v48gd2yhb.execute-api.us-east-1.amazonaws.com/default/mailmerge\",\n crossDomain: true,\n data: {projectID:pid},\n dataType: 'json',\n success: function (data) {\n // do something with server response data\n next(data)\n },\n error: function (err) {\n // handle your error logic here\n alert(\"ERROR - The document could not be generated.\")\n }\n });\n \n}"},"css":{"file":{"type":"","url":"","link":"","message":{"error":true,"text":"File not defined"}},"title":"Cascading Style Sheet (CSS)","activated":true,"name":"css","linkedtofile":false,"optional":true,"content":".p2 {\n margin-top:10px;\n font-weight:bold;\n}\n#submit,#update {\n background-color:#fcb91a;\n}\n#print {\n background-color:#0056a1;\n}\n#delete {\n color:lightgray;\n padding-left:20px;\n font-style:italic;\n}\n.highcharts-figure .chart-container {\n width: 600px;\n height: 300px;\n margin:auto;\n}\n\n.highcharts-figure,\n.highcharts-data-table table {\n width: 600px;\n margin: 0 auto;\n}\n\n.highcharts-data-table table {\n font-family: Verdana, sans-serif;\n border-collapse: collapse;\n border: 1px solid #ebebeb;\n margin: 10px auto;\n text-align: center;\n width: 100%;\n max-width: 500px;\n}\n\n.highcharts-data-table caption {\n padding: 1em 0;\n font-size: 1.2em;\n color: #555;\n}\n\n.highcharts-data-table th {\n font-weight: 600;\n padding: 0.5em;\n}\n\n.highcharts-data-table td,\n.highcharts-data-table th,\n.highcharts-data-table caption {\n padding: 0.5em;\n}\n\n.highcharts-data-table thead tr,\n.highcharts-data-table tr:nth-child(even) {\n background: #f8f8f8;\n}\n\n.highcharts-data-table tr:hover {\n background: #f1f7ff;\n}\n\n@media (max-width: 600px) {\n .highcharts-figure,\n .highcharts-data-table table {\n width: 100%;\n }\n\n .highcharts-figure .chart-container {\n width: 300px;\n float: none;\n margin: 0 auto;\n }\n}\n\n.container {\n font-family:arial;\n}\n"},"jade":{"file":{"type":"","url":"","link":"","message":{"error":true,"text":"File not defined"},"depurl":"https://quipslibistars.s3.amazonaws.com/prod/dafd7bb15603e633d75732c618c5d7dc5c0f07dd/main.jade"},"title":"Jade","activated":true,"name":"jade","linkedtofile":false,"optional":false,"content":".container(style=\"width:900px\")\n hr\n .row\n .col-4\n .text-center\n img(src=\"https://cdn.pixabay.com/photo/2017/11/06/17/07/cooperate-2924261_960_720.png\",width=200)\n .col-7\n .text-center\n h1 SAFE Fund\n h3 Propose a project to improve aviation safety\n img(src=\"https://upload.wikimedia.org/wikipedia/en/thumb/6/62/International_Civil_Aviation_Organization_logo.svg/1200px-International_Civil_Aviation_Organization_logo.svg.png\",width=\"50px\")\n hr\n p.noprint \n strong Implementation \n | is a priority for the organization and States need our help more than ever \n | to effectively and sustainable comply with ICAO SARPs. Over the past year, \n | a lot of effort has been put into developing a \n strong harmonized and consolidated approach for implementation support \n | across ICAO in order to support our strategic objectives. \n br.noprint\n p.noprint The SAFE Fund serves as a mechanism for the collection and use of voluntary contributions from States \n | and other donors to support ICAO safety assistance programmes in a responsible, consistent, transparent, \n | efficient and timely manner. \n br.noprint\n p.noprint We are always looking for new and effective projects to be implemented and funded by SAFE. Such projects should be \n | safety-related projects for which States cannot otherwise provide or obtain the necessary financial resources. \n | More information on what kind of projects SAFE is funding can be found in the \n a(href=\"https://www.icao.int/safety/SafetyFundSAFE/SAFE-ToR-2012.pdf\") Terms of Reference for the SAFE Fund\n br.noprint\n p.noprint It is easy to send a project proposal:\n ul.noprint\n li \n strong Enter your name, organisation and email.\n | This will enable us to connect you with your project and allow you to amend/update your project, if necessary;\n li \n strong Fill in the 8 fields below \n | related to your project, trying to provide us enough information to make an initial assessment of the project proposal\n | ;\n li \n strong Submit\n | . You will receive a copy of your proposal by email containing a link to amend/update it, if you wish.\n li You have more proposals? Sure! We would love to get them. Refresh this page and \n strong fill in the form again and submit.\n br.noprint\n p.noprint After we have received your proposal, we will evaluate it in-line with the SAFE Fund terms of reference, \n | our strategic objectives and of course available funds. Once the project proposal is acceptable in principle, \n | a more \n a(href=\"https://www.icao.int/safety/SafetyFundSAFE/AppB-SAFETAproposalTemplate.docx\") detailed project document \n | will need to be developed for submission to the \n a(href=\"https://www.icao.int/safety/Pages/SAFE-Fund-More-Details.aspx\") Project Review Committee\n | .\n br.noprint\n p.noprint If you have questions, don't hesitate to contact pci@icao.int. \n hr.noprint\n .mb-3.row.noprint\n .col-sm-4\n label.form-label Your Name\n span(style=\"color:red\") *\n .col-sm-8\n input#name.form-control.fields.required(type=\"text\")\n .mb-3.row.noprint\n .col-sm-4\n label.form-label Your Organisation\n span(style=\"color:red\") *\n .col-sm-8\n input#organisation.form-control.fields.required(type=\"text\")\n .mb-3.row.noprint\n .col-sm-4\n label.form-label Your Email\n span(style=\"color:red\") *\n .col-sm-8\n input#email.form-control.fields.required(type=\"text\")\n\n label.form-label.p2 Project Title\n span(style=\"color:red\") *\n input#title.form-control.fields.required\n .form-text Provide a short title for your project (5-8 words)\n \n\n \n label.form-label.p2 Objective(s)\n span(style=\"color:red\") *\n textarea#objectives.form-control.fields.required\n .form-text Describe the objective of the project in a few sentences. What would that project do? Sentences should start with an action verb like Ensure, Enhance, Develop etc.\n \n label.form-label.p2 Rational / Justification\n span(style=\"color:red\") *\n textarea#rational.form-control.fields.required\n .form-text Describe why you think this project could help States. Does this project relate to conference new SARP, or meeting/panel recommendation, for example. Try to explain why you think this project is important.\n \n label.form-label.p2 State selection\n span(style=\"color:red\") *\n textarea#statesel.form-control.fields.required\n .form-text How would you select the States which could benefit from that project? Developing States only, or States with a certain profile? Provide some selection criteria, if possible. Otherwise, just provide a fixed list of States\n\n //button#togglemore.btn.btn-link.noprint Toggle addition information\n #additionaldetails\n label.form-label.p2 Project Details\n textarea#details.form-control.fields\n .form-text Explain the scope of the implementation support in more detail.\n\n label.form-label.p2 Expected Benefits/Outcomes\n textarea#benefits.form-control.fields\n .form-text What tangible benefits would this project bring to the targeted State(s)? What would be the outcomes.\n\n label.form-label.p2 Funding\n textarea#funding.form-control.fields\n .form-text Explain funding requirements in terms of budget and direct costs (personnel, travel, other costs)\n\n label.form-label.p2 Duration and timelines\n textarea#duration.form-control.fields\n .form-text Describe the duration, phases, timelines and key milestones of the project\n\n\n label.form-label.p2 Subject matter experts\n .form-text Provide the list of subject matter experts which need to be hired or seconded to the project, their area and a short description of their tasks\n #expertlist\n .row\n .col-2\n p Area(s)\n .col-2\n p Job ID\n .col-7\n p Task desciption\n .col-1\n .row.defaultsmerow(style=\"display:none\")\n .col-2\n input.form-control\n .col-2\n input.form-control\n \n .col-7\n textarea.form-control\n .col-1\n button.btn.btn-link.deleterow Delete\n button#addexpert.btn.btn-sm.btn-secondary Add expert\n\n #workplan\n label.form-label.p2 Workplan\n .form-text Please enter each deliverable\n button#addworkplanitem.btn.btn-sm.btn-secondary(action=\"new\") Add item\n #workplanitems\n .card.defaultwpitem(style=\"display:none\")\n .card-body\n .chevrons\n i.fas.fa-chevron-down.down\n i.fas.fa-chevron-up.up\n \n h5.card-title.wpitem(name=\"item\")\n p.card-text\n span.wpitem(style=\"font-weight:bold\",name=\"task\")\n br\n span Start \n span.wpitem(name=\"start\")\n span , duration of \n span.wpitem(name=\"weeks\")\n span weeks, \n span.wpitem(name=\"location\")\n span .\n span.opdiv\n br\n span.wpitem(name=\"travel_units\")\n span Travel, \n span.wpitem(name=\"travel_unit_cost\")\n span $US each.\n span.opdiv\n br\n span.wpitem(name=\"dsa_units\")\n span days of DSA, \n span.wpitem(name=\"dsa_unit_cost\")\n span $US each.\n span.opdiv\n br\n span.wpitem(name=\"sme_units\")\n span days of SME support, \n span.wpitem(name=\"sme_unit_cost\")\n span $US each.\n span.opdiv\n br\n span.wpitem(name=\"training_units\")\n span units of training provided, \n span.wpitem(name=\"training_unit_cost\")\n span $US each.\n span.opdiv\n br\n //span.wpitem(name=\"sme_units\")\n span Specific costs, \n span.wpitem(name=\"specific_unit_cost\")\n span $US.\n br\n span Total costs: \n span.wpitem(name=\"total_cost\")\n span $US\n br\n button.btn.btn-link.modwp(action=\"edit\") Edit\n button.btn.btn-link.modwp(action=\"delete\") Delete\n \n \n \n \n \n \n \n \n\n\n \n \n label.form-label.p2 Estimated Costs\n br\n span#total_project_costs 0\n span $US \n .form-text \n span Including \n span#pm_costs 0\n span $US for project management and administrative support.\n\n #proposedby\n\n\n br\n //p.noprint Thank you for providing us with your proposal. Please hit the submit button below.\n #someempty.alert.alert-warning.noprint(style=\"display:none\") You need to fill in all the required sections before submitting inclusing your email.\n #gendoc.alert.alert-warning(style=\"display:none\") We generate the project document, please wait ...\n button#submit.btn.btn-warning.new.noprint Submit\n button#update.btn.btn-warning.update.noprint Update\n button#download.btn.btn-primary.update.noprint Download (DOCX)\n button#delete.btn.btn-link.update.noprint Delete\n\n\n#wpmodal.modal\n .modal-dialog\n .modal-content\n .modal-header\n h5.modal-title Edit workplan item\n button.btn-close(type=\"button\",data-bs-dismiss=\"modal\",aria-label=\"Close\")\n .modal-body\n input.wpfields(type=\"hidden\",name=\"item\")\n label.form-label.p2 Task\n textarea.form-control.wpfields(name=\"task\")\n .form-text Describe what will be achieved with this work plan item\n \n label.form-label.p2 Start\n input.form-control.wpfields(name=\"start\")\n .form-text On what day would this task normally start?\n \n label.form-label.p2 Weeks\n input.form-control.wpfields(name=\"weeks\")\n .form-text How many weeks is this task to be expected to last?\n \n label.form-label.p2 Location\n input.form-control.wpfields(name=\"location\")\n .form-text From where will this task be performed? May be \"Offsite\" or \"City, Country\" for on-site tasks\n \n .row\n .col-8\n .col-2(style=\"text-align:right;font-size:12px\")\n span Units\n .col-2(style=\"text-align:right;font-size:12px\")\n span Unit Costs (US$)\n .row\n .col-8\n label.form-label.p2 Travel\n .form-text How many people are travelling to the location and how much is one travel? Leave empty if task location is offsite.\n \n .col-2\n input.form-control.wpfields(name=\"travel_units\")\n .col-2\n input.form-control.wpfields(name=\"travel_unit_cost\")\n .row\n .col-8\n label.form-label.p2 Daily Subsistence Allowance (DSA)\n .form-text How many days of DSA is needed and what is the DSA per day at the location? Leave empty if task location is offsite.\n .col-2\n input.form-control.wpfields(name=\"dsa_units\")\n .col-2\n input.form-control.wpfields(name=\"dsa_unit_cost\")\n .row\n .col-8\n label.form-label.p2 Expert\n .form-text How many days of subject matter expertise is required and how much is the cost per day of an expert?\n \n .col-2\n input.form-control.wpfields(name=\"sme_units\")\n .col-2\n input.form-control.wpfields(name=\"sme_unit_cost\")\n .row\n .col-8\n label.form-label.p2 Training\n .form-text How many people will under go training? How much is the cost of each of thise trainings? If the cost is per training session, enter 1 as unit\n \n .col-2\n input.form-control.wpfields(name=\"training_units\")\n .col-2\n input.form-control.wpfields(name=\"training_unit_cost\")\n .row\n .col-8\n label.form-label.p2 Specific costs\n .form-text Any additional or unique costs for this worplan item?\n \n .col-2\n .col-2\n input.form-control.wpfields(name=\"specific_unit_cost\")\n .modal-footer\n button.btn.btn-secondary(type=\"button\",data-bs-dismiss=\"modal\") Close\n button#savewpchange.btn.btn-primary(type=\"button\") Save changes\n\n\n\n\n\n"},"capture":"https://quipslibistars.s3.amazonaws.com/prod/dafd7bb15603e633d75732c618c5d7dc5c0f07dd/capture.png","morejs":[{"url":"https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js"},{"url":"https://unpkg.com/sweetalert/dist/sweetalert.min.js"},{"url":"https://kit.fontawesome.com/f8cac8be67.js"}],"morecss":[{"url":"https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css"}],"prod":true,"sharedwith":[],"deploydate":"2022-08-24T13:21:12.765Z","libs":[{"_id":"5672b602f36b083214f3e63e","description":"The Write Less, Do More, JavaScript Library","key":"","version":"2.1.1","link":"https://code.jquery.com/jquery-2.1.4.js","name":"jquery","__v":0,"required":true,"haskey":false,"website":"https://jquery.com"}],"host":"https://quips.anbdata.com","version":"prod"} function loadjquery(url,callback) { if(typeof jQuery=='undefined') { loadScript(url,callback) } else { callback() } } function loadScript(url, callback) { var script = document.createElement("script") script.type = "text/javascript"; if (script.readyState) { //IE script.onreadystatechange = function () { if (script.readyState == "loaded" || script.readyState == "complete") { script.onreadystatechange = null; callback(); } }; } else { //Others script.onload = function () { callback(); }; } script.src = url; document.getElementsByTagName("head")[0].appendChild(script); } (function () { loadjquery("https://code.jquery.com/jquery-2.1.4.js", function () { //jQuery loaded $("#"+project.container).html("") var libs=[] $(project.libs).each(function(i,v){ if (v.name!="jquery") { $(v.link.split(",")).each(function(j,u){ if (u.slice(-2)=="js") { libs.push(u+(v.haskey?"?key="+project[v.name+"key"]:"")) } else { $("head").append("") } }) } }) if (project.morejs) { $(project.morejs).each(function(i,v){ if ((v.url.substring(0,2)=="//")||(v.url.substring(0,8)=="https://")||(v.url.substring(0,7)=="http://")) { libs.push(v.url) } }) } if (project.morecss) { $(project.morecss).each(function(i,v){ $("head").append("") }) } loadlibs(libs.reverse()) }); })(); function loadlibs(libs){ if (libs.length>0) { var l=libs.pop() loadScript(l,function(){ //$.getScript(l,function(res){ loadlibs(libs) }) //.fail(function(e){ // loadlibs(libs) // //}) } else { start() } } function putscriptcontent(content){ var script = document.createElement("script") script.type = "text/javascript"; $(script).text(content) document.getElementsByTagName("head")[0].appendChild(script); } function start(){ //load jade $.getJSON(project.host+"/project/"+project.version+"/"+project.id+"/render?callback=?"+(project.datachange?"&data="+project.datachange:""),function(res){ $("#"+project.container).html(res.html) if (project.css.activated) { if (project.css.linkedtofile) { $("head").append("")} else { $("head").append("")} } if (project.js.activated) { if (project.js.linkedtofile) { $.getScript(project.js.file[(project.prod?"depurl":"url")])} else { putscriptcontent(project.js.content)} if (project.mainjs) { window[project.mainjs]() } } }) }