d002cafc by Jeff Balicki

pull user data

1 parent 1b580735
......@@ -144,7 +144,7 @@ try {
$result = $p->fit_textflow($textline, $textLRight, $textLUp, ($textwidth + $textLRight) ,($textheight + $textLUp) ,$fit_optlist);
} else if ($row->change_type == 'text') {
} else if ($row->change_type == 'text' OR $row->change_type == 'user') {
$yoff = 50;
//Get font var from row
......
var pluginUrl = window.location.protocol+'//'+window.location.host;
var pdf_customizer = "https://pdf-customizer.synapsus.co";
var pluginUrl = window.location.protocol+'//'+window.location.host+'/commonwell';
var pdf_customizer = "http://localhost:8888/pdf-customizer/public";
//var pluginUrl = "http://contact.gotenzing.com";
......@@ -102,9 +102,13 @@ function ShowBox(pheight, pwidth, up, right, height, width, count, example) {
}
function findUserInfoMatch(data) {
}
function HideBox() {
jQuery(document).ready(function($) {
$('span').hide();
......@@ -273,7 +277,7 @@ function changePdfOptions(json, edit) {
}
if (json[i].change_type == "text") {
pdfChange += json[i].names + ': <input onfocusout="HideBox()" onfocus="ShowBox(' + json[0].pheight + ',' + json[0].pwidth + ',' + json[i].locationUp + ',' + json[i].locationRight + ',' + json[i].height + ',' + json[i].width + ',' + i + ',\'' + example + '\')" id="changescontent[' + i + ']" type="text" class="required" name="content[' + i + ']" value="' + json[i].content + '"">';
pdfChange += '<span id="span' + i + '">' + json[i].tips + '</span><br/>';
pdfChange += '<span class="tip" id="span' + i + '">' + json[i].tips + '</span><br/>';
}
if (json[i].change_type == "img") {
if(edit == true){
......@@ -283,14 +287,27 @@ function changePdfOptions(json, edit) {
}else{
pdfChange += json[i].names + ':<label onfocusout="HideBox()" onfocus=" ShowBox(' + json[0].pheight + ',' + json[0].pwidth + ',' + json[i].locationUp + ',' + json[i].locationRight + ',' + json[i].height + ',' + json[i].width + ',' + i + ',\'' + example + '\')" id="focusButton' + i + '" class="custom-file-input" tabindex="0"><input value="'+json[i].content+'" tabindex="-1" class="fileupload upload required" id="changescontent[' + i + ']" type="file" name="content[' + i + ']" ><span class="file-button"><span class="file-name file-button">'+json[i].content+'</span><strong>Browse</strong></span></label>';
}
pdfChange += '<span id="span' + i + '">' + json[i].tips + '</span><br/>';
pdfChange += '<span class="tip" id="span' + i + '">' + json[i].tips + '</span><br/>';
}
if (json[i].change_type == "date") {
pdfChange += json[i].names + ': <input onfocusout="HideBoxwithdate()" onfocus="ShowBox(' + json[0].pheight + ',' + json[0].pwidth + ',' + json[i].locationUp + ',' + json[i].locationRight + ',' + json[i].height + ',' + json[i].width + ',' + i + ',\'' + example + '\')" id="changescontentdate" type="text" class="required date" name="content[' + i + ']" value="' + json[i].content + '"">';
pdfChange += '<span id="span' + i + '"> </span><br/>';
pdfChange += '<span class="tip" id="span' + i + '"> </span><br/>';
}
if (json[i].change_type == "user") {
var str = json[i].content;
if(str.startsWith('*')){
var s =json[i].content.substr(1);
//findUserInfoMatch(s);
var content_string = eval(s);
}else{
var content_string =json[i].content; }
pdfChange += json[i].names + ': <input onfocusout="HideBox()" onfocus="ShowBox(' + json[0].pheight + ',' + json[0].pwidth + ',' + json[i].locationUp + ',' + json[i].locationRight + ',' + json[i].height + ',' + json[i].width + ',' + i + ',\'' + example + '\')" id="changescontent[' + i + ']" type="text" class="required" name="content[' + i + ']" value="' + content_string + '"">';
pdfChange += '<span class="tip" id="span' + i + '">' + json[i].tips + '</span><br/>';
}
}
pdfChange += '<input type="submit" value="Save and Continue">';
......