2015-10-17 19:36:49 +08:00
{{template "admin/top.html" .}}
< div class = "m-b-md" > < h3 class = "m-b-none" > Export PDF< / h3 > < / div >
< div class = "row" >
2015-10-17 23:22:40 +08:00
< div class = "col-sm-6" >
2015-10-17 19:36:49 +08:00
< form id = "add_user_form" >
< section class = "panel panel-default" >
< div class = "panel-body" >
< div class = "form-group" >
< label > Wkhtmltopdf Binary Path< / label >
< input type = "text" class = "form-control" placeholder = "/usr/local/bin/wkhtmltopdf" name = "path" value = "{{.str.exportPdfBinPath}}" >
2015-10-17 23:22:40 +08:00
Leanote use < a target = "_blank" href = "http://wkhtmltopdf.org" > wkhtmltopdf< / a > to export pdf. You should install it on your server.
2015-10-17 19:36:49 +08:00
< br / >
2017-07-27 20:00:53 +08:00
Please input the path that wkhtmltopdf installed, e.g. < code > /usr/local/bin/wkhtmltopdf< / code > on mac os/linux or < code > < C: \ Program Files \ wkhtmltopdf \ bin \ wkhtmltopdf . exe / code > on windows.
2015-10-17 19:36:49 +08:00
< / div >
< / div >
< footer class = "panel-footer text-right bg-light lter" >
< button type = "submit" id = "submit" class = "btn btn-success btn-s-xs" > Submit< / button >
< / footer >
< / section >
< / form >
< / div >
< / div >
{{template "admin/footer.html" .}}
< script src = "/public/admin/js/jquery-validation-1.13.0/jquery.validate.js" > < / script >
< script >
$(function() {
init_validator("#add_user_form");
$("#submit").click(function(e){
e.preventDefault();
var t = this;
if($("#add_user_form").valid()) {
$(t).button('loading');
ajaxPost("/adminSetting/exportPdf", getFormJsonData("add_user_form"), function(ret){
$(t).button('reset')
if(!ret.Ok) {
art.alert(ret.Msg)
} else {
art.tips("Success");
}
});
}
});
});
< / script >
{{template "admin/end.html" .}}