<# set folder_id to public google drive folder id by name "Hashtag-BAT File Uploads"; #> <# start form for files <#[url.edit]#>; set form.class to "form-horizontal"; when deleting call confirm('Delete File Record?'); when done redirect to "/google-drive/files?index=<# form.id #>"; #> <div class="form-group"> <label for="file" class="col-sm-3 control-label">New File Upload</label> <div class="col-sm-6"> <label class="btn btn-primary" tabindex="0" onKeyPress="$('#file').click(); return false;"> <input type="file" <# upload to google drive "/<#[folder_id]#>" for file #> onchange="$('#file-info').html($(this)[0].files[0].name);" class="hidden" id="file"> Choose File </label> <span class="label label-success" id="file-info"></span> </div> </div> <# if "<#[url.edit]#>"!="" #> <div class="form-group"> <label for="name" class="col-sm-3 control-label">File Name</label> <div class="col-sm-6"> <input type="text" <# file #> class="form-control" id="name"> </div> </div> <# end if #> <div class="form-group"> <div class="col-sm-offset-3 col-sm-6"> <input type="button" <# Create button #> class="btn btn-primary" value="Upload"> <input type="button" <# Update button #> class="btn btn-primary"> <input type="button" <# Delete button #> class="btn btn-primary"> </div> </div> <# end form #>