pull user data
Showing
5 changed files
with
23 additions
and
6 deletions
| ... | @@ -144,7 +144,7 @@ try { | ... | @@ -144,7 +144,7 @@ try { |
| 144 | 144 | ||
| 145 | $result = $p->fit_textflow($textline, $textLRight, $textLUp, ($textwidth + $textLRight) ,($textheight + $textLUp) ,$fit_optlist); | 145 | $result = $p->fit_textflow($textline, $textLRight, $textLUp, ($textwidth + $textLRight) ,($textheight + $textLUp) ,$fit_optlist); |
| 146 | 146 | ||
| 147 | } else if ($row->change_type == 'text') { | 147 | } else if ($row->change_type == 'text' OR $row->change_type == 'user') { |
| 148 | $yoff = 50; | 148 | $yoff = 50; |
| 149 | //Get font var from row | 149 | //Get font var from row |
| 150 | 150 | ... | ... |
No preview for this file type
No preview for this file type
No preview for this file type
| 1 | var pluginUrl = window.location.protocol+'//'+window.location.host; | 1 | var pluginUrl = window.location.protocol+'//'+window.location.host+'/commonwell'; |
| 2 | var pdf_customizer = "https://pdf-customizer.synapsus.co"; | 2 | var pdf_customizer = "http://localhost:8888/pdf-customizer/public"; |
| 3 | 3 | ||
| 4 | 4 | ||
| 5 | //var pluginUrl = "http://contact.gotenzing.com"; | 5 | //var pluginUrl = "http://contact.gotenzing.com"; |
| ... | @@ -102,9 +102,13 @@ function ShowBox(pheight, pwidth, up, right, height, width, count, example) { | ... | @@ -102,9 +102,13 @@ function ShowBox(pheight, pwidth, up, right, height, width, count, example) { |
| 102 | } | 102 | } |
| 103 | 103 | ||
| 104 | 104 | ||
| 105 | function findUserInfoMatch(data) { | ||
| 105 | 106 | ||
| 106 | 107 | ||
| 107 | 108 | ||
| 109 | } | ||
| 110 | |||
| 111 | |||
| 108 | function HideBox() { | 112 | function HideBox() { |
| 109 | jQuery(document).ready(function($) { | 113 | jQuery(document).ready(function($) { |
| 110 | $('span').hide(); | 114 | $('span').hide(); |
| ... | @@ -273,7 +277,7 @@ function changePdfOptions(json, edit) { | ... | @@ -273,7 +277,7 @@ function changePdfOptions(json, edit) { |
| 273 | } | 277 | } |
| 274 | if (json[i].change_type == "text") { | 278 | if (json[i].change_type == "text") { |
| 275 | 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 + '"">'; | 279 | 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 + '"">'; |
| 276 | pdfChange += '<span id="span' + i + '">' + json[i].tips + '</span><br/>'; | 280 | pdfChange += '<span class="tip" id="span' + i + '">' + json[i].tips + '</span><br/>'; |
| 277 | } | 281 | } |
| 278 | if (json[i].change_type == "img") { | 282 | if (json[i].change_type == "img") { |
| 279 | if(edit == true){ | 283 | if(edit == true){ |
| ... | @@ -283,14 +287,27 @@ function changePdfOptions(json, edit) { | ... | @@ -283,14 +287,27 @@ function changePdfOptions(json, edit) { |
| 283 | }else{ | 287 | }else{ |
| 284 | 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>'; | 288 | 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>'; |
| 285 | } | 289 | } |
| 286 | pdfChange += '<span id="span' + i + '">' + json[i].tips + '</span><br/>'; | 290 | pdfChange += '<span class="tip" id="span' + i + '">' + json[i].tips + '</span><br/>'; |
| 287 | 291 | ||
| 288 | } | 292 | } |
| 289 | if (json[i].change_type == "date") { | 293 | if (json[i].change_type == "date") { |
| 290 | 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 + '"">'; | 294 | 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 + '"">'; |
| 291 | pdfChange += '<span id="span' + i + '"> </span><br/>'; | 295 | pdfChange += '<span class="tip" id="span' + i + '"> </span><br/>'; |
| 292 | 296 | ||
| 293 | } | 297 | } |
| 298 | if (json[i].change_type == "user") { | ||
| 299 | var str = json[i].content; | ||
| 300 | if(str.startsWith('*')){ | ||
| 301 | var s =json[i].content.substr(1); | ||
| 302 | //findUserInfoMatch(s); | ||
| 303 | var content_string = eval(s); | ||
| 304 | }else{ | ||
| 305 | var content_string =json[i].content; } | ||
| 306 | 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 + '"">'; | ||
| 307 | pdfChange += '<span class="tip" id="span' + i + '">' + json[i].tips + '</span><br/>'; | ||
| 308 | |||
| 309 | } | ||
| 310 | |||
| 294 | 311 | ||
| 295 | } | 312 | } |
| 296 | pdfChange += '<input type="submit" value="Save and Continue">'; | 313 | pdfChange += '<input type="submit" value="Save and Continue">'; | ... | ... |
-
Please register or sign in to post a comment