Commit dcfe59fc authored by Jon Phillips's avatar Jon Phillips
Browse files

added embed box directly on the final page

parent cdede36e
...@@ -87,3 +87,7 @@ section { ...@@ -87,3 +87,7 @@ section {
ul ul { ul ul {
margin-bottom: 12px; margin-bottom: 12px;
} }
#embed-esign {
font-size: 8pt;
}
...@@ -33,7 +33,7 @@ the javascript to an id of your choice and style that customized id with CSS.</p ...@@ -33,7 +33,7 @@ the javascript to an id of your choice and style that customized id with CSS.</p
var iframe = document.createElement(&#39;iframe&#39;); var iframe = document.createElement(&#39;iframe&#39;);
document.body.appendChild(iframe); document.body.appendChild(iframe);
iframe.src = &#39;http://service.localhost/u2s/46ufwa17e&#39;; iframe.src = &#39;http://service.fabricatorz.com/u2s/46ufwa17e&#39;;
iframe.id = &#39;e-sign-process&#39;; iframe.id = &#39;e-sign-process&#39;;
iframe.width = &#39;100%&#39;; iframe.width = &#39;100%&#39;;
iframe.height = &#39;100%&#39;; iframe.height = &#39;100%&#39;;
...@@ -46,7 +46,7 @@ the javascript to an id of your choice and style that customized id with CSS.</p ...@@ -46,7 +46,7 @@ the javascript to an id of your choice and style that customized id with CSS.</p
var iframe = document.createElement('iframe'); var iframe = document.createElement('iframe');
document.body.appendChild(iframe); document.body.appendChild(iframe);
iframe.src = 'http://service.localhost/u2s/46ufwa17e'; iframe.src = 'http://service.fabricatorz.com/u2s/46ufwa17e';
iframe.id = 'e-sign-process'; iframe.id = 'e-sign-process';
iframe.width = '650px'; iframe.width = '650px';
iframe.height = '300px'; iframe.height = '300px';
......
...@@ -452,6 +452,15 @@ class="input-block-level" placeholder="If one or more of your preferred licenses ...@@ -452,6 +452,15 @@ class="input-block-level" placeholder="If one or more of your preferred licenses
<td><a role="button" class="btn btn-success" id="link-esign" data-inline="true" href="//service.fabricatorz.com/query2form/">Link to E-Signing Form</a></td> <td><a role="button" class="btn btn-success" id="link-esign" data-inline="true" href="//service.fabricatorz.com/query2form/">Link to E-Signing Form</a></td>
</tr> </tr>
<tr id="embedding-service-all">
<td id="embedding-service"><b>Embed Your E-Sign Form</b>: Select text and copy. (<a href="embed.html" title="Developer Details">Need help?</a>)</td>
<td> </td>
<td><textarea class="form-control" rows="5"
id="embed-esign" rows="3"
onfocus="this.select();"
onmouseup="return false;"></textarea></td>
</tr>
</table> </table>
</div> </div>
......
...@@ -135,6 +135,17 @@ function printConfigs () ...@@ -135,6 +135,17 @@ function printConfigs ()
})(window.location.search.substr(1).split('&')) })(window.location.search.substr(1).split('&'))
})(jQuery); })(jQuery);
function htmlEscape(str) {
return String(str)
.replace(/&/g, '&amp;')
.replace(/"/g, '&quot;')
.replace(/'/g, '&#39;')
.replace(/</g, '&lt;')
.replace(/>/g, '&gt;');
}
/** /**
* Cleanup of the query string data and setting it. * Cleanup of the query string data and setting it.
* @usage: http://cla.fabricatorz.com/?beneficiary-name=Fabricatorz&project-name=Archive%20Software&project-website=http://archive.fabricatorz.com&project-email=jon@fabricatorz.com&contributor-process-url=http://archive.fabricatorz.com/signing&project-jurisdiction=United%20States,%20Hong%20Kong,%20and%20China%20Mainland * @usage: http://cla.fabricatorz.com/?beneficiary-name=Fabricatorz&project-name=Archive%20Software&project-website=http://archive.fabricatorz.com&project-email=jon@fabricatorz.com&contributor-process-url=http://archive.fabricatorz.com/signing&project-jurisdiction=United%20States,%20Hong%20Kong,%20and%20China%20Mainland
...@@ -1262,19 +1273,38 @@ function testApplyPage () ...@@ -1262,19 +1273,38 @@ function testApplyPage ()
if ( '1337' == debugNeedle ) if ( '1337' == debugNeedle )
updateTestUrls(); updateTestUrls();
$("#link-esign").attr("href", var queryReady =
( "" != query4form_short ) ? query4form_short : query4form ); (( "" != query4form_short ) ? query4form_short : query4form );
$("#link-esign").attr("href", queryReady);
$("#link-esign").addClass('btn-success'); $("#link-esign").addClass('btn-success');
$("#link-esign").removeClass('btn-danger'); $("#link-esign").removeClass('btn-danger');
$("#link-esign").html("Link to E-Signing Form"); $("#link-esign").html("Link to E-Signing Form");
$("#signing-service").html('<b>Contributor Agreements</b>: ' + $("#signing-service").html('<b>Contributor Agreements</b>: ' +
'Share the link with your contributors.'); 'Share the link with your contributors.');
$("#embed-esign").html(
htmlEscape('<script type="text/javascript">' + "\n" +
'var iframe = document.createElement(\'iframe\');' + "\n" +
'document.body.appendChild(iframe);' + "\n" +
'iframe.src = \'' + queryReady + '\';' + "\n" +
'iframe.id = \'e-sign-process\';' + "\n" +
'iframe.width = \'100%\';' + "\n" +
'iframe.height = \'100%\';' + "\n" +
'</script>')
);
$("#embedding-service-all").show();
} else { } else {
$("#link-esign").html( 'Need Project Email' ); $("#link-esign").html( 'Need Project Email' );
$("#link-esign").removeClass('btn-success'); $("#link-esign").removeClass('btn-success');
$("#link-esign").addClass('btn-danger'); $("#link-esign").addClass('btn-danger');
$("#signing-service").html('<b>Contributor Agreements</b>: ' + $("#signing-service").html('<b>Contributor Agreements</b>: ' +
'Share the link with your contributors.'); 'Share the link with your contributors.');
$("#embedding-service-all").hide();
} }
} else { } else {
$("#link-esign").attr("href", $('#contributor-process-url').val()); $("#link-esign").attr("href", $('#contributor-process-url').val());
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment