groupdocs 1.6.0 → 1.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/CHANGELOG.md +34 -0
- data/LICENSE.txt +21 -0
- data/README.md +3 -0
- data/examples/api-samples/public/docs/sample01.html +23 -23
- data/examples/api-samples/public/docs/sample02.html +27 -27
- data/examples/api-samples/public/docs/sample03.html +81 -69
- data/examples/api-samples/public/docs/sample04.html +29 -29
- data/examples/api-samples/public/docs/sample05.html +48 -48
- data/examples/api-samples/public/docs/sample06.html +47 -46
- data/examples/api-samples/public/docs/sample07.html +35 -35
- data/examples/api-samples/public/docs/sample08.html +45 -45
- data/examples/api-samples/public/docs/sample09.html +57 -57
- data/examples/api-samples/public/docs/sample10.html +41 -41
- data/examples/api-samples/public/docs/sample11.html +96 -118
- data/examples/api-samples/public/docs/sample12.html +29 -50
- data/examples/api-samples/public/docs/sample13.html +36 -44
- data/examples/api-samples/public/docs/sample14.html +29 -29
- data/examples/api-samples/public/docs/sample15.html +24 -24
- data/examples/api-samples/public/docs/sample16.html +32 -32
- data/examples/api-samples/public/docs/sample17.html +38 -38
- data/examples/api-samples/public/docs/sample18.html +105 -101
- data/examples/api-samples/public/docs/sample19.html +101 -101
- data/examples/api-samples/public/docs/sample20.html +42 -42
- data/examples/api-samples/public/docs/sample21.html +109 -109
- data/examples/api-samples/public/docs/sample22.html +56 -56
- data/examples/api-samples/public/docs/sample23.html +39 -39
- data/examples/api-samples/public/docs/sample24.html +36 -36
- data/examples/api-samples/public/docs/sample25.html +67 -67
- data/examples/api-samples/public/docs/sample26.html +23 -23
- data/examples/api-samples/public/docs/sample27.html +72 -72
- data/examples/api-samples/public/docs/sample28.html +46 -45
- data/examples/api-samples/public/docs/sample29.html +30 -30
- data/examples/api-samples/public/docs/sample30.html +30 -30
- data/examples/api-samples/public/docs/sample31.html +114 -114
- data/examples/api-samples/public/docs/sample32.html +96 -96
- data/examples/api-samples/public/docs/sample33.html +56 -56
- data/examples/api-samples/public/docs/sample34.html +27 -27
- data/examples/api-samples/public/docs/sample35.html +134 -135
- data/examples/api-samples/public/docs/sample36.html +32 -32
- data/examples/api-samples/public/docs/sample37.html +103 -103
- data/examples/api-samples/public/docs/sample38.html +76 -76
- data/examples/api-samples/public/docs/sample39.html +136 -136
- data/examples/api-samples/public/docs/sample40.html +104 -104
- data/examples/api-samples/public/docs/sample41.html +137 -137
- data/examples/api-samples/public/docs/sample42.html +61 -61
- data/examples/api-samples/public/docs/sample43.html +72 -72
- data/examples/api-samples/public/docs/sample44.html +751 -0
- data/examples/api-samples/public/docs/sample45.html +236 -0
- data/examples/api-samples/public/templates/merge_field3_doc.docx +0 -0
- data/examples/api-samples/samples/sample01.rb +2 -2
- data/examples/api-samples/samples/sample02.rb +2 -2
- data/examples/api-samples/samples/sample03.rb +2 -2
- data/examples/api-samples/samples/sample04.rb +2 -2
- data/examples/api-samples/samples/sample05.rb +2 -2
- data/examples/api-samples/samples/sample06.rb +2 -2
- data/examples/api-samples/samples/sample07.rb +2 -2
- data/examples/api-samples/samples/sample08.rb +2 -2
- data/examples/api-samples/samples/sample09.rb +2 -2
- data/examples/api-samples/samples/sample10.rb +2 -2
- data/examples/api-samples/samples/sample11.rb +2 -2
- data/examples/api-samples/samples/sample12.rb +2 -2
- data/examples/api-samples/samples/sample13.rb +2 -2
- data/examples/api-samples/samples/sample14.rb +2 -2
- data/examples/api-samples/samples/sample15.rb +2 -2
- data/examples/api-samples/samples/sample16.rb +2 -2
- data/examples/api-samples/samples/sample17.rb +2 -2
- data/examples/api-samples/samples/sample18.rb +2 -2
- data/examples/api-samples/samples/sample19.rb +2 -2
- data/examples/api-samples/samples/sample20.rb +2 -2
- data/examples/api-samples/samples/sample21.rb +2 -2
- data/examples/api-samples/samples/sample22.rb +2 -2
- data/examples/api-samples/samples/sample23.rb +2 -2
- data/examples/api-samples/samples/sample24.rb +2 -2
- data/examples/api-samples/samples/sample25.rb +2 -2
- data/examples/api-samples/samples/sample26.rb +2 -2
- data/examples/api-samples/samples/sample27.rb +2 -2
- data/examples/api-samples/samples/sample28.rb +2 -2
- data/examples/api-samples/samples/sample29.rb +2 -2
- data/examples/api-samples/samples/sample30.rb +2 -2
- data/examples/api-samples/samples/sample31.rb +2 -2
- data/examples/api-samples/samples/sample32.rb +2 -2
- data/examples/api-samples/samples/sample33.rb +2 -2
- data/examples/api-samples/samples/sample34.rb +2 -2
- data/examples/api-samples/samples/sample35.rb +4 -4
- data/examples/api-samples/samples/sample36.rb +2 -2
- data/examples/api-samples/samples/sample37.rb +2 -2
- data/examples/api-samples/samples/sample38.rb +2 -2
- data/examples/api-samples/samples/sample39.rb +2 -2
- data/examples/api-samples/samples/sample40.rb +2 -2
- data/examples/api-samples/samples/sample41.rb +2 -2
- data/examples/api-samples/samples/sample42.rb +2 -2
- data/examples/api-samples/samples/sample43.rb +2 -2
- data/examples/api-samples/samples/sample44.rb +188 -0
- data/examples/api-samples/samples/sample45.rb +74 -0
- data/examples/api-samples/views/_others_samples.haml +47 -43
- data/examples/api-samples/views/index.haml +55 -44
- data/examples/api-samples/views/layout.haml +1 -6
- data/examples/api-samples/views/sample01.haml +62 -57
- data/examples/api-samples/views/sample02.haml +52 -46
- data/examples/api-samples/views/sample03.haml +78 -73
- data/examples/api-samples/views/sample04.haml +51 -45
- data/examples/api-samples/views/sample05.haml +77 -71
- data/examples/api-samples/views/sample06.haml +58 -52
- data/examples/api-samples/views/sample07.haml +51 -45
- data/examples/api-samples/views/sample08.haml +90 -84
- data/examples/api-samples/views/sample09.haml +86 -80
- data/examples/api-samples/views/sample10.haml +83 -77
- data/examples/api-samples/views/sample11.haml +124 -120
- data/examples/api-samples/views/sample12.haml +65 -59
- data/examples/api-samples/views/sample13.haml +62 -56
- data/examples/api-samples/views/sample14.haml +57 -51
- data/examples/api-samples/views/sample15.haml +49 -43
- data/examples/api-samples/views/sample16.haml +49 -43
- data/examples/api-samples/views/sample17.haml +53 -47
- data/examples/api-samples/views/sample18.haml +140 -134
- data/examples/api-samples/views/sample19.haml +87 -81
- data/examples/api-samples/views/sample20.haml +53 -47
- data/examples/api-samples/views/sample21.haml +115 -111
- data/examples/api-samples/views/sample22.haml +94 -88
- data/examples/api-samples/views/sample23.haml +83 -78
- data/examples/api-samples/views/sample24.haml +54 -48
- data/examples/api-samples/views/sample25.haml +89 -83
- data/examples/api-samples/views/sample26.haml +62 -57
- data/examples/api-samples/views/sample27.haml +114 -109
- data/examples/api-samples/views/sample28.haml +55 -49
- data/examples/api-samples/views/sample29.haml +67 -69
- data/examples/api-samples/views/sample30.haml +54 -48
- data/examples/api-samples/views/sample31.haml +106 -100
- data/examples/api-samples/views/sample32.haml +90 -84
- data/examples/api-samples/views/sample33.haml +60 -54
- data/examples/api-samples/views/sample34.haml +51 -46
- data/examples/api-samples/views/sample35.haml +84 -78
- data/examples/api-samples/views/sample36.haml +63 -58
- data/examples/api-samples/views/sample37.haml +122 -116
- data/examples/api-samples/views/sample38.haml +104 -98
- data/examples/api-samples/views/sample39.haml +6 -2
- data/examples/api-samples/views/sample40.haml +94 -89
- data/examples/api-samples/views/sample41.haml +127 -123
- data/examples/api-samples/views/sample42.haml +60 -54
- data/examples/api-samples/views/sample43.haml +81 -77
- data/examples/api-samples/views/sample44.haml +85 -0
- data/examples/api-samples/views/sample45.haml +85 -0
- data/groupdocs.gemspec +2 -0
- data/lib/groupdocs/datasource/field.rb +9 -0
- data/lib/groupdocs/document.rb +66 -4
- data/lib/groupdocs/document/annotation.rb +11 -6
- data/lib/groupdocs/document/editor.rb +53 -0
- data/lib/groupdocs/document/field.rb +16 -0
- data/lib/groupdocs/document/style.rb +30 -0
- data/lib/groupdocs/job.rb +24 -0
- data/lib/groupdocs/questionnaire.rb +2 -0
- data/lib/groupdocs/questionnaire/collector.rb +52 -0
- data/lib/groupdocs/questionnaire/collector_style.rb +54 -0
- data/lib/groupdocs/questionnaire/question.rb +9 -0
- data/lib/groupdocs/questionnaire/style/base_font.rb +17 -0
- data/lib/groupdocs/questionnaire/style/question_title.rb +17 -0
- data/lib/groupdocs/questionnaire/style/title.rb +17 -0
- data/lib/groupdocs/signature/envelope.rb +43 -8
- data/lib/groupdocs/signature/form.rb +113 -12
- data/lib/groupdocs/signature/recipient.rb +38 -3
- data/lib/groupdocs/signature/shared/field_methods.rb +4 -2
- data/lib/groupdocs/signature/template.rb +20 -1
- data/lib/groupdocs/storage/file.rb +3 -2
- data/lib/groupdocs/user.rb +148 -0
- data/lib/groupdocs/version.rb +1 -1
- data/spec/groupdocs/api/helpers/access_rights_helper_spec.rb +5 -5
- data/spec/groupdocs/document/annotation_spec.rb +1 -1
- data/spec/groupdocs/signature/envelope_spec.rb +1 -1
- data/spec/groupdocs/user_spec.rb +4 -4
- data/spec/support/shared_examples/signature/shared/field_methods.rb +5 -4
- metadata +18 -3
|
@@ -1,70 +1,68 @@
|
|
|
1
|
-
%
|
|
2
|
-
%
|
|
3
|
-
%
|
|
4
|
-
|
|
1
|
+
%head
|
|
2
|
+
%title Sample 29 - How to use Filepicker.io to upload document and get it's URL
|
|
3
|
+
%link(rel="stylesheet" type="text/css" href="/css/style.css")
|
|
4
|
+
%script{:src=>'//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js'}
|
|
5
|
+
%body
|
|
6
|
+
%script{:type => 'text/javascript', :src => '//api.filepicker.io/v1/filepicker.js'}
|
|
7
|
+
%h3{:style => 'text-align:center;'}
|
|
8
|
+
%a{:href => '/'}GroupDocs Ruby SDK Samples
|
|
9
|
+
%br/
|
|
10
|
+
Sample 29 - How to use Filepicker.io to upload document and get it's URL
|
|
11
|
+
.samplecontent{:style => 'padding:10px;'}
|
|
12
|
+
%i This sample will show how to use Filepicker.io to upload document and get it's URL using Ruby SDK
|
|
13
|
+
%br/
|
|
14
|
+
%br/
|
|
15
|
+
%span.documentation
|
|
16
|
+
%a{:href => '/docs/sample29.html'} Builtin documentation for this sample
|
|
17
|
+
%br/
|
|
18
|
+
%br/
|
|
19
|
+
%p
|
|
20
|
+
%font{:color => 'red'} #{(defined? err) ? err : ''}
|
|
21
|
+
#requestForm{:style => 'padding:20px; border:1px solid black;'}
|
|
22
|
+
%p Click "Pick file" to select file which will be uploaded and shown in iframe
|
|
23
|
+
%form{:name => 'gdform', :action => '/sample-29-how-to-use-filepicker-io-to-upload-document-and-get-it\'s-url', :enctype => 'multipart/form-data', :method => 'post'}
|
|
24
|
+
%label{:for => 'clientId'} GroupDocs Client ID
|
|
25
|
+
%br/
|
|
26
|
+
%input{:type=>'text', :name=>'clientId'}
|
|
27
|
+
%br/
|
|
28
|
+
%label{:for => 'serverType'} Base path
|
|
29
|
+
%br/
|
|
30
|
+
%input{:type=>'text', :name=>'serverType', :id => 'server_type'}
|
|
31
|
+
%br/
|
|
32
|
+
%input{:id => 'gdButton', :type => 'filepicker', :data => {'fp-store-access' => "public", 'fp-apikey' => "AjhtkJk6rRLWQxanzZAFVz", 'fp-store-path' => "files/"}, :value => 'Upload file', :onChange => "upload(event.fpfile.url)", :style => 'display: block'}
|
|
33
|
+
%span{:id => 'results_status', :style => 'color:red;display:none;' } (Please wait for ajax response)
|
|
34
|
+
%div{:id => 'iframeDiv', :style => 'padding:20px; border:1px solid black; display: none;'}
|
|
35
|
+
%iframe{:id=>"iframe", :frameborder=>"0", :width=>"800", :height=>"650", :src=>""}
|
|
36
|
+
= partial :_others_samples
|
|
5
37
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
var preLoad = document.getElementById("results_status");
|
|
38
|
-
preLoad.style.display = "block";
|
|
39
|
-
document.getElementById("gdButton").style.display = "none";
|
|
40
|
-
xhttp=new XMLHttpRequest();
|
|
41
|
-
xhttp.onreadystatechange= function() {
|
|
42
|
-
|
|
43
|
-
if (xhttp.readyState==4 && xhttp.status==200){
|
|
44
|
-
result = eval( "("+xhttp.responseText+")" );
|
|
45
|
-
iframe = result.iframe;
|
|
46
|
-
error = result['error'];
|
|
47
|
-
|
|
48
|
-
if (iframe != null) {
|
|
49
|
-
var button = document.getElementById("gdButton").style.display = "block";
|
|
50
|
-
var preLoad = document.getElementById("results_status");
|
|
51
|
-
preLoad.style.display = "none";
|
|
52
|
-
var iframeDiv = document.getElementById("iframeDiv");
|
|
53
|
-
var iframeShow = document.getElementById("iframe");
|
|
54
|
-
iframeShow.setAttribute("src", iframe);
|
|
55
|
-
iframeDiv.style.display = "block";
|
|
56
|
-
} else if (error != null) {
|
|
57
|
-
var message = '<span style="color:red;>' + error + '</span>';
|
|
58
|
-
iframe.style.display = "block";
|
|
59
|
-
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
xhttp.open('POST','/sample29',true);
|
|
66
|
-
xhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
|
|
67
|
-
var str= 'url=' + url + '&basePath=' + document.forms.gdform.server_type.value + '&clientId=' + document.forms.gdform.client_id.value;
|
|
68
|
-
xhttp.send(str);
|
|
69
|
-
|
|
70
|
-
}
|
|
38
|
+
:javascript
|
|
39
|
+
function upload(url) {
|
|
40
|
+
form = document.forms.gdform;
|
|
41
|
+
var preLoad = document.getElementById("results_status");
|
|
42
|
+
preLoad.style.display = "block";
|
|
43
|
+
document.getElementById("gdButton").style.display = "none";
|
|
44
|
+
xhttp=new XMLHttpRequest();
|
|
45
|
+
xhttp.onreadystatechange= function() {
|
|
46
|
+
if (xhttp.readyState==4 && xhttp.status==200){
|
|
47
|
+
result = eval( "("+xhttp.responseText+")" );
|
|
48
|
+
iframe = result.iframe;
|
|
49
|
+
error = result['error'];
|
|
50
|
+
if (iframe != null) {
|
|
51
|
+
var button = document.getElementById("gdButton").style.display = "block";
|
|
52
|
+
var preLoad = document.getElementById("results_status");
|
|
53
|
+
preLoad.style.display = "none";
|
|
54
|
+
var iframeDiv = document.getElementById("iframeDiv");
|
|
55
|
+
var iframeShow = document.getElementById("iframe");
|
|
56
|
+
iframeShow.setAttribute("src", iframe);
|
|
57
|
+
iframeDiv.style.display = "block";
|
|
58
|
+
} else if (error != null) {
|
|
59
|
+
var message = '<span style="color:red;>' + error + '</span>';
|
|
60
|
+
iframe.style.display = "block";
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
xhttp.open('POST','/sample29',true);
|
|
65
|
+
xhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
|
|
66
|
+
var str= 'url=' + url + '&basePath=' + document.forms.gdform.server_type.value + '&clientId=' + document.forms.gdform.client_id.value;
|
|
67
|
+
xhttp.send(str);
|
|
68
|
+
}
|
|
@@ -1,52 +1,58 @@
|
|
|
1
|
-
%
|
|
2
|
-
%
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
%
|
|
7
|
-
|
|
8
|
-
%span.documentation
|
|
9
|
-
%a{:href => '/docs/sample30.html'} Builtin documentation for this sample
|
|
10
|
-
%br/
|
|
11
|
-
%br/
|
|
12
|
-
%p
|
|
13
|
-
You entered:
|
|
14
|
-
%p
|
|
15
|
-
UserId = #{(defined? userId) ? userId : ''}
|
|
16
|
-
%p
|
|
17
|
-
PrivateKey = #{(defined? privateKey) ? privateKey : ''}
|
|
18
|
-
%p
|
|
19
|
-
FileId = #{(defined? name) ? name : ''}
|
|
20
|
-
%p
|
|
21
|
-
%font{:color => 'red'} #{(defined? err) ? err : ''}
|
|
22
|
-
%br/
|
|
23
|
-
#requestForm{:style => 'padding:20px; border:1px solid black;'}
|
|
24
|
-
%p Enter data for request and press "Make request" button
|
|
25
|
-
%form{:action => '/sample30', :method => 'post'}
|
|
26
|
-
%label{:for => 'clientId'} GroupDocs ClientID
|
|
27
|
-
%br/
|
|
28
|
-
%input{:type=>'text', :name=>'clientId'}
|
|
29
|
-
%br/
|
|
30
|
-
%label{:for => 'privateKey'} GroupDocs PrivateKey
|
|
31
|
-
%br/
|
|
32
|
-
%input{:type=>'text', :name=>'privateKey'}
|
|
33
|
-
%br/
|
|
34
|
-
%label{:for => 'fileName'} GroupDocs File Name
|
|
35
|
-
%br/
|
|
36
|
-
%input{:type=>'text', :name=>'fileName'}
|
|
37
|
-
%br/
|
|
38
|
-
%label{:for => 'basePath'} Base Path
|
|
39
|
-
%span{:class => 'optional'} (Optional)
|
|
40
|
-
%br/
|
|
41
|
-
%input{:type=>'text', :name=>'basePath'}
|
|
42
|
-
%br/
|
|
43
|
-
%br/
|
|
44
|
-
%input{:type => 'submit', :value => 'Delete'}/
|
|
45
|
-
%div{:style => 'padding:20px; border:1px solid black;'}
|
|
46
|
-
%p Results:
|
|
1
|
+
%head
|
|
2
|
+
%title Sample 30 - How to delete file from GroupDocs Storage
|
|
3
|
+
%link(rel="stylesheet" type="text/css" href="/css/style.css")
|
|
4
|
+
%script{:src=>'//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js'}
|
|
5
|
+
%body
|
|
6
|
+
%h3{:style => 'text-align:center;'}
|
|
7
|
+
%a{:href => '/'} GroupDocs Ruby SDK Samples
|
|
47
8
|
%br/
|
|
9
|
+
Sample 30 - How to delete file from GroupDocs Storage
|
|
10
|
+
.samplecontent{:style => 'padding:10px;'}
|
|
11
|
+
%i This sample will show how to delete file from GroupDocs Storage using Ruby SDK
|
|
12
|
+
%br/
|
|
13
|
+
%br/
|
|
14
|
+
%span.documentation
|
|
15
|
+
%a{:href => '/docs/sample30.html'} Builtin documentation for this sample
|
|
16
|
+
%br/
|
|
17
|
+
%br/
|
|
18
|
+
%p
|
|
19
|
+
You entered:
|
|
48
20
|
%p
|
|
49
|
-
|
|
21
|
+
UserId = #{(defined? userId) ? userId : ''}
|
|
22
|
+
%p
|
|
23
|
+
PrivateKey = #{(defined? privateKey) ? privateKey : ''}
|
|
24
|
+
%p
|
|
25
|
+
FileId = #{(defined? name) ? name : ''}
|
|
26
|
+
%p
|
|
27
|
+
%font{:color => 'red'} #{(defined? err) ? err : ''}
|
|
50
28
|
%br/
|
|
29
|
+
#requestForm{:style => 'padding:20px; border:1px solid black;'}
|
|
30
|
+
%p Enter data for request and press "Make request" button
|
|
31
|
+
%form{:action => '/sample-30-how-to-delete-file-from-groupdocs-storage', :method => 'post'}
|
|
32
|
+
%label{:for => 'clientId'} GroupDocs ClientID
|
|
33
|
+
%br/
|
|
34
|
+
%input{:type=>'text', :name=>'clientId'}
|
|
35
|
+
%br/
|
|
36
|
+
%label{:for => 'privateKey'} GroupDocs PrivateKey
|
|
37
|
+
%br/
|
|
38
|
+
%input{:type=>'text', :name=>'privateKey'}
|
|
39
|
+
%br/
|
|
40
|
+
%label{:for => 'fileName'} GroupDocs File Name
|
|
41
|
+
%br/
|
|
42
|
+
%input{:type=>'text', :name=>'fileName'}
|
|
43
|
+
%br/
|
|
44
|
+
%label{:for => 'basePath'} Base Path
|
|
45
|
+
%span{:class => 'optional'} (Optional)
|
|
46
|
+
%br/
|
|
47
|
+
%input{:type=>'text', :name=>'basePath'}
|
|
48
|
+
%br/
|
|
49
|
+
%br/
|
|
50
|
+
%input{:type => 'submit', :value => 'Delete'}/
|
|
51
|
+
%div{:style => 'padding:20px; border:1px solid black;'}
|
|
52
|
+
%p Results:
|
|
53
|
+
%br/
|
|
54
|
+
%p
|
|
55
|
+
%span{:style=>"color: red"}#{(defined? message) ? message : ''}
|
|
56
|
+
%br/
|
|
51
57
|
|
|
52
|
-
= partial :_others_samples
|
|
58
|
+
= partial :_others_samples
|
|
@@ -1,116 +1,122 @@
|
|
|
1
|
-
%
|
|
2
|
-
%
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
%
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
%p
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
%
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
%
|
|
43
|
-
%
|
|
44
|
-
|
|
45
|
-
%br/
|
|
46
|
-
%label{:for => 'templateGuid'} Template file GUID
|
|
47
|
-
%br/
|
|
48
|
-
%input{:type=>'text', :name=>'templateGuid'}
|
|
49
|
-
%br/
|
|
50
|
-
%br/
|
|
51
|
-
%div{:style => 'background-color:#e5e5e5;border:3px double gray;width:700px;padding:20px;font-size:10pt;'}
|
|
52
|
-
%label{:for => 'email'} What is your email?
|
|
53
|
-
%input{:type=>'text', :name=>'email'}
|
|
1
|
+
%head
|
|
2
|
+
%title Sample 31 - How to dynamically create Signature Form using data from HTML form
|
|
3
|
+
%link(rel="stylesheet" type="text/css" href="/css/style.css")
|
|
4
|
+
%script{:src=>'//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js'}
|
|
5
|
+
%body
|
|
6
|
+
%h3{:style => 'text-align:center;'}
|
|
7
|
+
%a{:href => '/'} GroupDocs Ruby SDK Samples
|
|
8
|
+
%br/
|
|
9
|
+
Sample 31 - How to dynamically create Signature Form using data from HTML form
|
|
10
|
+
.samplecontent{:style => 'padding:10px;'}
|
|
11
|
+
%span.description
|
|
12
|
+
%i
|
|
13
|
+
This sample will show how to dinamically create your own questionary using forms and build signature form from the result document using Ruby SDK
|
|
14
|
+
%br/
|
|
15
|
+
%br/
|
|
16
|
+
%span.documentation
|
|
17
|
+
%a{:href => '/docs/sample31.html'} Builtin documentation for this sample
|
|
18
|
+
%br/
|
|
19
|
+
%br/
|
|
20
|
+
%p
|
|
21
|
+
You entered:
|
|
22
|
+
%p
|
|
23
|
+
ClientID = #{(defined? userId) ? userId : ''}
|
|
24
|
+
%p
|
|
25
|
+
PrivateKey = #{(defined? privateKey) ? privateKey : ''}
|
|
26
|
+
%p
|
|
27
|
+
Template file GUID = #{(defined? templateGuid) ? templateGuid : ''}
|
|
28
|
+
%p
|
|
29
|
+
Name = #{(defined? name) ? name : ''}
|
|
30
|
+
%p
|
|
31
|
+
Email = #{(defined? email) ? email : ''}
|
|
32
|
+
%p
|
|
33
|
+
Country = #{(defined? country) ? country : ''}
|
|
34
|
+
%p
|
|
35
|
+
City = #{(defined? city) ? city : ''}
|
|
36
|
+
%p
|
|
37
|
+
Street = #{(defined? street) ? street : ''}
|
|
38
|
+
%p
|
|
39
|
+
%font{:color => 'red'} #{(defined? err) ? err : ''}
|
|
40
|
+
%br/
|
|
41
|
+
#requestForm{:style => 'padding:20px; border:1px solid black;'}
|
|
42
|
+
%p Enter data for request and press "Make request" button
|
|
43
|
+
%form{:action => '/sample-31-how-to-dynamically-create-signature-form-using-data-from-html-form', :enctype => 'multipart/form-data', :method => 'post'}
|
|
44
|
+
%label{:for => 'clientId'} GroupDocs ClientID
|
|
54
45
|
%br/
|
|
46
|
+
%input{:type=>'text', :name=>'clientId'}
|
|
55
47
|
%br/
|
|
56
|
-
%label{:for => '
|
|
57
|
-
%input{:type=>'text', :name=>'name'}
|
|
48
|
+
%label{:for => 'privateKey'} GroupDocs PrivateKey
|
|
58
49
|
%br/
|
|
50
|
+
%input{:type=>'text', :name=>'privateKey'}
|
|
59
51
|
%br/
|
|
60
|
-
%label{:for => '
|
|
61
|
-
%input{:type=>'text', :name=>'country'}
|
|
52
|
+
%label{:for => 'templateGuid'} Template file GUID
|
|
62
53
|
%br/
|
|
54
|
+
%input{:type=>'text', :name=>'templateGuid'}
|
|
63
55
|
%br/
|
|
64
|
-
%label{:for => 'city'} What is your city?
|
|
65
|
-
%input{:type=>'text', :name=>'city'}
|
|
66
56
|
%br/
|
|
57
|
+
%div{:style => 'background-color:#e5e5e5;border:3px double gray;width:700px;padding:20px;font-size:10pt;'}
|
|
58
|
+
%label{:for => 'email'} What is your email?
|
|
59
|
+
%input{:type=>'text', :name=>'email'}
|
|
60
|
+
%br/
|
|
61
|
+
%br/
|
|
62
|
+
%label{:for => 'name'} What is your name?
|
|
63
|
+
%input{:type=>'text', :name=>'name'}
|
|
64
|
+
%br/
|
|
65
|
+
%br/
|
|
66
|
+
%label{:for => 'country'} What is your country?
|
|
67
|
+
%input{:type=>'text', :name=>'country'}
|
|
68
|
+
%br/
|
|
69
|
+
%br/
|
|
70
|
+
%label{:for => 'city'} What is your city?
|
|
71
|
+
%input{:type=>'text', :name=>'city'}
|
|
72
|
+
%br/
|
|
73
|
+
%br/
|
|
74
|
+
%label{:for => 'street'} What is your street?
|
|
75
|
+
%input{:type=>'text', :name=>'street'}
|
|
76
|
+
%br/
|
|
67
77
|
%br/
|
|
68
|
-
%label{:for
|
|
69
|
-
|
|
78
|
+
%label{:for=>'callback'}
|
|
79
|
+
Callback URL
|
|
80
|
+
%span.optional (Optional)
|
|
81
|
+
%br/
|
|
82
|
+
%font{:color=>'grey'} (For test Callback you can use this URL: http://groupdocs-ruby-samples.herokuapp.com/sample31/callback)
|
|
83
|
+
%input{:type=>'text', :size=>'70', :value=>"#{(defined? callback) ? callback : ''}", :name=>'callback'}
|
|
84
|
+
|
|
85
|
+
%br/
|
|
86
|
+
%label{:for => 'basePath'} Base Path
|
|
87
|
+
%span{:class => 'optional'} (Optional)
|
|
88
|
+
%br/
|
|
89
|
+
%input{:type=>'text', :name=>'basePath'}
|
|
70
90
|
%br/
|
|
71
|
-
%br/
|
|
72
|
-
%label{:for=>'callback'}
|
|
73
|
-
Callback URL
|
|
74
|
-
%span.optional (Optional)
|
|
75
91
|
%br/
|
|
76
|
-
%font{:color=>'grey'} (For test Callback you can use this URL: http://groupdocs-ruby-samples.herokuapp.com/sample31/callback)
|
|
77
|
-
%input{:type=>'text', :size=>'70', :value=>"#{(defined? callback) ? callback : ''}", :name=>'callback'}
|
|
78
|
-
|
|
79
|
-
%br/
|
|
80
|
-
%label{:for => 'basePath'} Base Path
|
|
81
|
-
%span{:class => 'optional'} (Optional)
|
|
82
|
-
%br/
|
|
83
|
-
%input{:type=>'text', :name=>'basePath'}
|
|
84
|
-
%br/
|
|
85
|
-
%br/
|
|
86
92
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
93
|
+
%input{:type => 'submit', :value => 'Make request'}
|
|
94
|
+
%span{:id=>'results_status', :style=>'color:red;display:none;'} (Please wait for ajax response)
|
|
95
|
+
%br/
|
|
96
|
+
%a{:href=>'/templates/merge_feid2_doc.docx'} Download sample Docx file
|
|
97
|
+
%br/
|
|
98
|
+
%br/
|
|
99
|
+
%div{:style => 'padding:20px; border:1px solid black;'}
|
|
100
|
+
%p Results:
|
|
101
|
+
#{(defined? iframe) ? iframe : ''}
|
|
96
102
|
|
|
97
|
-
= partial :_others_samples
|
|
103
|
+
= partial :_others_samples
|
|
98
104
|
|
|
99
|
-
%script{:src=>'//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js'}
|
|
100
|
-
:javascript
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
105
|
+
%script{:src=>'//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js'}
|
|
106
|
+
:javascript
|
|
107
|
+
function check() {
|
|
108
|
+
$.get('/sample31/check', function(data) {
|
|
109
|
+
$('#results_status').fadeOut("slow");
|
|
110
|
+
$('#downloadframe').attr("src", "/sample31/downloads/" + data);
|
|
111
|
+
}, 'text');
|
|
112
|
+
}
|
|
107
113
|
|
|
108
|
-
|
|
109
|
-
|
|
114
|
+
$(function($){
|
|
115
|
+
callbackUrl = $("input[name=callback]").val();
|
|
110
116
|
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
117
|
+
if(callbackUrl !== "") {
|
|
118
|
+
$('#results_status').fadeIn("slow");
|
|
119
|
+
setTimeout(check, 5000)
|
|
120
|
+
}
|
|
115
121
|
|
|
116
|
-
|
|
122
|
+
});
|