Skip to content

Commit

Permalink
inital commit
Browse files Browse the repository at this point in the history
  • Loading branch information
GeeEssEff committed Oct 12, 2018
1 parent 30bec03 commit 94ded66
Show file tree
Hide file tree
Showing 2 changed files with 157 additions and 0 deletions.
55 changes: 55 additions & 0 deletions functions.gs
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
function doGet(e) {
return HtmlService.createHtmlOutputFromFile('upload.html');
}

function uploadFiles(form) {

try {

var filebox = "Abstracts-Inbox";
var folder, folders = DriveApp.getFoldersByName(filebox);
var d = new Date();
var curr_date = d.getDate();
var curr_month = d.getMonth() + 1;
var curr_year = d.getFullYear();
var timeStamp = curr_year + "." + curr_month + "." + curr_date;

if (folders.hasNext()) {
folder = folders.next();
} else {
folder = DriveApp.createFolder(filebox);
}

var blob = form.myFile;
var file = folder.createFile(blob);
var fileName = file.getName();
file.setName(timeStamp + "_" + form.myClassification + "_" + form.myAbstract + "_" + fileName);
file.setDescription("Author : " + form.myAuthors + "\n\nCorresponding Author : " + form.myCorrespondingAuthors + " " + form.myCorrespondingAuthorsEmail + "\n\nPresenting Author(s) : " + form.myPresentingAuthors + "\n\nResponsible Author : " + form.myResponsibleAuthors + " " + form.myResponsibleAuthorsEmail + "\n\n" + form.myPermission);

//This is the email notify action for when a submission happens.
var notifyToEmail = 'EMAIL ADDRESS TO NOTIFY OF SUBMISSION';
var notifyToCC = 'BACKUP EMAIL ADDRESS TO NOTIFY OF SUBMISSION';
var notifySubject = 'Abstract Submission Notification';
var notifyName = 'Abstract Submission Bot';
var notifyBody = 'New Abstract submitted for review. \n \n'
+ timeStamp + '_' + form.myClassification + '_' + form.myAbstract + '_' + fileName + ' \n '
+ ' \n \n Have a nice day, \n ~Abstract Submission Bot. \n ';
var notifyHTML = notifyBody.replace(/\n/g, '<br />');

MailApp.sendEmail({
name: notifyName,
to: notifyToEmail,
cc: notifyToCC,
subject: notifySubject,
htmlBody: notifyHTML,
body: notifyBody,
});


return "File was uploaded successfully, Thank you.";
} catch (error) {

return error.toString();
}

}
102 changes: 102 additions & 0 deletions upload.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
<!DOCTYPE html>
<html>
<head>
<base target="_top">
</head>
<body style="width: 60%; padding: 5%; border: none; margin: 3%;">

<div>
<center>
<img src="URL FOR BANNER AD" width="80%" height="80%" alt="TEXT FROM BANNER AD" />
</center>
<br />

<h3>ABSTRACT GUIDELINES</h3>
<p>
Abstracts must be submitted electronically using the form below before DATE OF FINAL SUBMISSION. The abstract <a href="MODEL_ABSTRACT_URL" target="_blank">[see Model for the Abstract]</a> must indicate name (underlined) and department of Primary Presenter, as well as any Co-Authors, and a Responsible Author who is a college faculty member, with contact information. Authors will be notified by email regarding the acceptance of their Abstract to the Symposium.

</p>

<h4>Who may submit an abstract?</h4>
<UL>
<LI>Undergraduate Students</LI>
<LI>Graduate Students</LI>
<LI>Medical Students</LI>
<LI>Dental Students</LI>
<LI>Other Allied Health and/or Health Education students</LI>
<LI>OPTI Residents</LI>
<LI>Post-Doctoral Researchers</LI>
<LI>Faculty Researchers</LI>
</UL>

<h4>Authority to submit</h4>
<p>
Abstracts may be submitted by Primary Author/Presenter, Co-Author, or Responsible Author, but must be approved by all parties. If this process presents difficulties, please contact Program Co-Chair <a href="URL_FOR_CO-CHAIR_BIO" target="_blank"> CO-CHAIR_NAME</a> (<a href="mailto:CO_CHAIR_EMAIL_ADDRESS?cc=CO-CHAIR_ASSISTANT_EMAIL_ADDRESS">CO-CHAIR_EMAIL_ADDRESS</a>), or <a href="URL_TO_OTHER_CO-CHAIR_BIO" target="_blank">OTHER_CO-CHAIR_NAME</a> (<a href="mailto:OTHER_CO-CHAIR_EMAIL_ADDRESS?cc=CO-CHAIR_ASSISTANT_EMAIL_ADDRESS">jhouser@atsu.edu</a>). To accommodate as many presenters as possible at the event, the Program Committee reserves the right to limit the number of presentations associated with each Responsible Author.
</p>

<h4>Abstract content and format</h4>

<OL type="1">
<LI>The abstract text must be single-spaced and formatted in MSWord or as a Rich Text File with 1-inch margins and fit on a single 8.5 x 11 inch page. All fonts in the abstract must be 11 point Arial. The abstract title must use bold font and “title case.” <a href="MODEL_ABSTRACT_URL" target="_blank">[see Model for the Abstract]</a></LI>
<LI>Authors are to be listed with non-bold font <a href="MODEL_ABSTRACT_URL" target="_blank">[see Model for the Abstract]</a> including first name, middle initial, last name, and highest degree(s). Each abstract must indicate by underlined font, the name of the person who will present the poster.</LI>
<LI>For each author, identify institution(s) and location of institution(s) (city, state) as shown in the <a href="MODEL_ABSTRACT_URL" target="_blank">Model for the Abstract</a>.</LI>
<LI>The abstract text (limited to 2,500 characters including spaces) must include four sections (Background, Methods, Results, and Conclusions; <a href="MODEL_ABSTRACT_URL" target="_blank">[see Model for the Abstract]</a>). The work described may be a completed project or “a work in progress.”</LI>
<LI>Faculty contact information: If the poster presenter is not a faculty member, contact information (name, email, phone) for a faculty member, who is either a co-author or a sponsor for the project must be listed at the bottom of the abstract. Communications to the presenter regarding the abstract will be copied to the faculty co-author or sponsor. In general, it is expected that most abstracts will list a faculty co-author. In the case of a resident who may not have a faculty member as a co-author, the name of the residency program director (who is not necessarily a co-author) will suffice as long as contact information is provided. If this process presents difficulties, please contact Program Co-Chair <a href="URL_FOR_CO-CHAIR_BIO" target="_blank"> CO-CHAIR_NAME</a> (<a href="mailto:CO-CHAIR_EMAIL_ADDRESS?cc=CO-CHAIR_ASSISTANT_EMAIL_ADDRESS">bdegenhardt@atsu.edu</a>), or <a href="URL_TO_OTHER_CO-CHAIR_BIO" target="_blank"> OTHER_CO-CHAIR_NAME</a> (<a href="mailto:OTHER_CO-CHAIR_EMAIL_ADDRESS?cc=CO-CHAIR_ASSISTANT_EMAIL_ADDRESS">OTHER_CO-CHAIR_EMAIL_ADDRESS</a>).</LI>
<LI>The abstract must include 3-5 Keyword descriptors to help identify the research area. (As shown in the <a href="MODEL_ABSTRACT_URL" target="_blank">Model for the Abstract</a>). All Keywords must use lower case font unless they are proper nouns.</LI>
</OL>

<h4>Poster presentations</h4>
<p>
Poster dimensions are limited to 60(w) x 40(h) inches. Each poster should include a heading with title and author(s) using lettering at least 1 inch high. The abstract should be part of the poster presentation. All lettering should be heavy and at least 1 cm (3/8 inch) high. Poster Presentations will be given during TIMES_HERE. with presenters being asked to attend their poster during a designated 1-hour period. Posters will also be considered for optional oral delivery and awards.
</p>

<p>
<i>Please note: OTHER_REQUIREMENTS_LIKE_DEADLINES_FOR_PRINTING</i>
</p>

<h4>Questions</h4>
<p>
Contact CO-CHAIR-ASSISTANT_NAME via <a href="mailto:CO-CHAIR_ASSISTANT_EMAIL_ADDRESS">CO-CHAIR_ASSISTANT_EMAIL_ADDRESS</a> for more information:<br />
Phone: NUMBER<br />
Fax: NUMBER<br />
Email: <a href="mailto:CO-CHAIR_ASSISTANT_EMAIL_ADDRESS">CO-CHAIR_ASSISTANT_EMAIL_ADDRESS</a>.<br />
<br />
</p>


<form id="myForm">
<h4>Abstract submission</h4>

<br />
Abstract Title : &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <input type="text" name="myAbstract" size="50" placeholder="Abstract Title.."><br />
Authors :&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <input type="text" name="myAuthors" size="50" placeholder="List Authors.."><br />
Corresponding Author : <input type="text" name="myCorrespondingAuthors" size="50" placeholder="List Corresponding Author.."><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; E-mail address : <input type="text" name="myCorrespondingAuthorsEmail" size="50" placeholder="xxx@xxxx.xxx"><br />
Presenting Author(s) : &nbsp; <input type="text" name="myPresentingAuthors" size="50" placeholder="List Presenting Author(s).."><br />
Responsible Author : &nbsp; &nbsp; <input type="text" name="myResponsibleAuthors" size="50" placeholder="List Responsible Author.."><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; E-mail address : <input type="text" name="myResponsibleAuthorsEmail" size="50" placeholder="xxx@xxxx.xxx"><br />
Classification : &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <input type="radio" name="myClassification" value="Faculty/staff"> Faculty/staff &nbsp; &nbsp; or &nbsp; &nbsp; <input type="radio" name="myClassification" value="Student"> Student<br />
Permission to Publish : <input type="radio" name="myPermission" value="Permission granted to publish."> Yes &nbsp; &nbsp; or &nbsp; &nbsp; <input type="radio" name="myPermission" value="No Permission to publish is granted."> No<br />
File to submit : &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <input type="file" name="myFile"> <br />
<br />
Wait for the filename to show above and then <input type="submit" value="Submit and Upload File"
onclick="this.value='Uploading..';
google.script.run.withSuccessHandler(fileUploaded)
.uploadFiles(this.parentNode);
return false;"><br />
<br />
</form>
</div>

<div id="output"></div>

<script>
function fileUploaded(status) {
document.getElementById('myForm').style.display = 'none';
document.getElementById('output').innerHTML = status;
}
</script>


</body>
</html>

0 comments on commit 94ded66

Please sign in to comment.