examples/api-samples/views/sample22.haml in groupdocs-1.5.7 vs examples/api-samples/views/sample22.haml in groupdocs-1.5.8

- old
+ new

@@ -1,10 +1,10 @@ %h3{:style => 'text-align:center;'} %a{:href => '/'} GroupDocs Ruby SDK Samples \- Sample22 .samplecontent{:style => 'padding:10px;'} - %i This sample will show how to View Document pages as images using Ruby SDK + %i This sample will show how create or update user and add him to collaborators using PHP SDK %br/ %br/ %span.documentation %a{:href => '/docs/sample22.html'} Builtin documentation for this sample %br/ @@ -18,46 +18,83 @@ %p FileId = #{(defined? fileId) ? fileId : ''} %p Email = #{(defined? email) ? email : ''} %p - First Name = #{(defined? first_name) ? first_name : ''} + First Name = #{(defined? firstName) ? firstName : ''} %p - Last Name = #{(defined? last_name) ? last_name : ''} + Last Name = #{(defined? lastName) ? lastName : ''} %p %font{:color => 'red'} #{(defined? err) ? err : ''} %br/ #requestForm{:style => 'padding:20px; border:1px solid black;'} %p Enter data for request and press "Make request" button %form{:action => '/sample22', :method => 'post'} - %label{:for => 'client_id'} GroupDocs ClientID + %label{:for => 'clientId'} GroupDocs ClientID %br/ - %input{:type=>'text', :name=>'client_id'} + %input{:type=>'text', :name=>'clientId'} %br/ - %label{:for => 'private_key'} GroupDocs PrivateKey + %label{:for => 'privateKey'} GroupDocs PrivateKey %br/ - %input{:type=>'text', :name=>'private_key'} + %input{:type=>'text', :name=>'privateKey'} %br/ - %label{:for => 'file_id'} GroupDocs FileID - %br/ - %input{:type=>'text', :name=>'fileId'} - %br/ %label{:for => 'email'} E-mail %br/ %input{:type=>'text', :name=>'email'} %br/ - %label{:for => 'first_name'} First name + %label{:for => 'firstName'} First name %br/ - %input{:type=>'text', :name=>'first_name'} + %input{:type=>'text', :name=>'firstName'} %br/ - %label{:for => 'last_name'} Last name + %label{:for => 'lastName'} Last name %br/ - %input{:type=>'text', :name=>'last_name'} + %input{:type=>'text', :name=>'lastName'} %br/ + %div.guid_radio + %input{:type=>'radio', :name=>'source', :value=>'guid', :checked=>'checked'} File ID (GUID) + %br/ + %input{:type=>'radio', :name=>'source', :value=>'local'}Upload local file + %br/ + %input{:type=>'radio', :name=>'source', :value=>'url'} Upload file from URL + %br/ + + %div.guid_field + %label{:for=>'fileId', :id=>'guid'} File ID (GUID) + %br/ + %input{:type=>'text', :name=>'fileId'} + + %div.guid_field{:style=>'display:none;'} + %label{:for=>'file'} Upload local file + %br/ + %input{:type=>'file', :name=>'file'} + + %div.guid_field{:style=>'display:none;'} + %label{:for=>'url', :id=>'url'} Upload file from URL + %br/ + %input{:type=>'text', :name=>'url'} + + %br/ + %label{:for => 'basePath'} Base Path + %span{:class => 'optional'} (Optional) + %br/ + %input{:type=>'text', :name=>'basePath'} + %br/ %input{:type => 'submit', :value => 'Make request'}/ %div{:style => 'padding:20px; border:1px solid black;'} %p Results: #{(defined? message) ? message : ''} #{(defined? iframe) ? iframe : ''} -= partial :_others_samples \ No newline at end of file += partial :_others_samples + +%script{:src=>'//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js'} +:javascript + + $(function($){ + + $('.guid_radio input').change(function(){ + var elementIndex = $(this).parent().children('input').index($(this)); + $('.guid_field').hide(); + $('.guid_field').eq(elementIndex).show(); + }); + });