docusign - adding tabs to the document using API: It only adds signhere tab and ignores all other - anchor

I am trying to add dateSingedTab, fullNameTab,signHereTab to my document. When I send the document, docusign is only adding the signHereTab and ignoring other tabs. Here is my xml. Can you please help.
<envelopeDefinition xmlns="http://www.docusign.com/restapi">
<emailSubject>API Call for adding signature request to document and sending</emailSubject>
<status>sent</status>
<documents>
<document>
<documentId>1</documentId>
<name>documentName</name>
</document>
</documents>
<recipients>
<signers>
<signer>
<recipientId>1</recipientId>
<email>custEmail</email>
<name>recipientNameCust</name>
<routingOrder>1</routingOrder>
<tabs>
<dateSignedTabs>
<dateSignedTab>
<anchorString>SIGNED on behalf of the Customer</anchorString>
<anchorXOffset>100</anchorXOffset>
<anchorYOffset>300</anchorYOffset>
<anchorIgnoreIfNotPresent>false</anchorIgnoreIfNotPresent>
<anchorUnits>Pixels</anchorUnits>
<documentId>1</documentId>
<recipientId>1</recipientId>
<tabLabel>Date Signed</tabLabel>
<name>Date Signed</name>
</dateSignedTab>
</dateSignedTabs>
<fullNameTabs>
<fullNameTab>
<anchorString>SIGNED on behalf of the Customer</anchorString>
<anchorXOffset>100</anchorXOffset>
<anchorYOffset>100</anchorYOffset>
<anchorIgnoreIfNotPresent>false</anchorIgnoreIfNotPresent>
<anchorUnits>Pixels</anchorUnits>
<documentId>1</documentId>
<recipientId>1</recipientId>
<tabLabel>Full Name</tabLabel>
<name>Full Name</name>
</fullNameTab>
</fullNameTabs>
<signHereTabs>
<signHere>
<anchorString>SIGNED on behalf of the Customer</anchorString>
<anchorXOffset>0</anchorXOffset>
<anchorYOffset>50</anchorYOffset>
<anchorIgnoreIfNotPresent>false</anchorIgnoreIfNotPresent>
<anchorUnits>Pixels</anchorUnits>
<documentId>1</documentId>
<recipientId>1</recipientId>
<tabLabel>Sign Here</tabLabel>
<name>Sign Here</name>
</signHere>
</signHereTabs>
</tabs>
</signer>
</signers>
</recipients></envelopeDefinition>
I got the tags wrong in above xml. I corrected them and they work fine. dateSignedTab is not correct, it should be dateSigned. Also fullNameTab is not correct, it should be fullName.
Please ignore this post.

You need to drop the tabs part of the inside tab names. For instance, for dateSigned tabs the <xml> nodes need to look like this:
<dateSignedTabs>
<dateSigned>
...
</dateSigned>
</dateSignedTabs>
Same thing with your other tabs... the full name tabs need to be setup like this:
<fullNameTabs>
<fullName>
...
</fullName>
</fullNameTabs>
Give that a try and it should work.

Related

Prestashop all translatable-field display none for product page

Just new in Prestashop (1.6.0.6), I've a problem with my product page in admin. All translatable-field are to display:none (I inspect the code with chrome).
So when I want to create a new product I can't because the name field is required.
I thought that it was simple to find the .js whose do that but it isn't.
If somebody could help me, I would be happy.
Thank you for your help
Hi,
I make some searches and see that the function hideOtherLanguage(id) hide and show translatable-field element.
function hideOtherLanguage(id)
{
console.log(id_language);
$('.translatable-field').hide();
$('.lang-' + id).show();
var id_old_language = id_language;
id_language = id;
if (id_old_language != id)
changeEmployeeLanguage();
updateCurrentText();
}
When I set the Id to 1 (default language), it works. It seems that when I load the page, the function is called twice and the last calling, the id value is undefined. So the show() function will not work.
If somebody could help me. Thank you.
In my console, I see only one error
undefined is not a function.
under index.php / Line 1002
...
$("#product_form").validate({
...
But I find the form.tpl template and set this lines in comment but nothing change.
EDIT: According to comment on this link http://forge.prestashop.com/browse/PSCFV-2928 this can possibly be caused by corrupted installation file(s) - so when on clean install - try to re-download and reinstall...
...otherwise:
I got into a similar problem - in module admin page, when creating configuration form using PrestaShop's HelperForm. I will provide most probable cases and their possible solutions.
The solution for HelperForm was tested on PS 1.6.0.14
Generally there are 2 cases when this will happen.
First, you have to check what html you recieve.
=> Display source code - NOT in developer tools/firebug/etc...!
=> I really mean the pure recieved (JavaScript untouched) html.
Check if your translatable-fields have already the inline style "display: none":
Case 1 - fields already have inline style(s) for "display: none"
This means the template/html was already prepared this way - most probably in some TPL file I saw codes similar to these:
<div class="translatable-field lang-{$language.id_lang}"
{if $language.id_lang != $id_lang_default}style="display:none"{/if}>
Or particularly in HelperForm template:
<div class="translatable-field lang-{$language.id_lang}"
{if $language.id_lang != $defaultFormLanguage}style="display:none"{/if}>
Case 1 is the most easy to solve, you just have to find, where to set this default language.
Solutions
HelperForm
Look where you've (or someone else) prepared the HelperForm object - something like:
$formHelper = new HelperForm();
...
Somewhere there will be something like $formHelper->default_form_language = ...;
My wrong first solution was to get default form language from context - which might not be set:
$this->context->controller->default_form_language; //THIS IS WRONG!
The correct way is to get the default language from configuration - something like:
$default_lang = new Language((int)Configuration::get('PS_LANG_DEFAULT'));
$formHelper->default_form_language = $default_lang->id;
...this particularly solved my problem...
Other form-creations
If there is something else than HelperForm used for form creations, the problem is still very similar.
You have to find where in files(probably tpls) is a condition for printing display:none for your case - then find where is the check-against-variable set and set it correctly yourself.
Case 2 - fields don't have inline style(s) for "display: none"
This means it is done after loading HTML by JavaScript. There are two options:
There is a call for hideOtherLanguage(), but there is wrongly set input language - that means no language will be displayed and all hidden.Solution for this one can be often solved by solving Case 1 (see above). In addition there can be programming error in not setting the after-used language id variable at all... then you would have to set it yourself (assign in JavaScript).
Some script calls some sort of .hide() on .translatable-field - you will have to search for it the hard way and remove/comment it out.
PS: Of course you can set the language to whatever you want, it is just common to set it to default language, because it is the most easier and the most clear way how to set it.

Render flux:field.inline.fal from page in content

I have defined a a FAL resource in my page template
<flux:field.inline.fal name="imageLinkboxMenu"
clear="true"
label="FAL image"
showThumbs="true"
allowedExtensions="jpg,jpeg,gif,png"
maxItems="1"/>
Now i want display this image in a conent element which refers to this page. I'm not able to get the page resource. I tried a
<flux:form.data field="tx_fed_page_flexform" table="pages" uid="{root}" as="fluxPageData">
{fluxPageData.imageLinkboxMenu}
</flux:form.data>
Which only returns 1. I also tried to acces the field via v:page.resource.fal which can not work from my point of view since this does not extract the data from the XML
<v:resource.image identifier="{v:page.resources.fal(field: 'imageLinkboxMenu') -> v:iterator.extract(key: 'id') -> v:iterator.first()}" as="resources" />
Any hints for me?
After some trial and error I finally got it work. The trick was to add to uid of the page. So I ended up with something like
<v:resource.image identifier="{v:page.resources.fal(field: 'imageLinkboxLogo', uid: '{root}') -> v:iterator.extract(key: 'id')}" />
I don't now why but it not work for some translation pages. I receive empty area. Aslo here https://fluidtypo3.org/viewhelpers/flux/master/Field/Inline/FalViewHelper.html we see Usage warning. So i recommend alternatively, you could use <flux:field.file>.

grails charts with sparklines/zingchart

I'm looking to make a bar graph for my webapp that takes data from a mySQL server. I want to use either sparklines or zinchart for my webapp. I've already tried to use them myself but I keep getting stuck. For sparklines I am using this in inside my body tads:
<sparklines:bar id="id" values="threads" />
where id is the id of my table and threads is the column with the relevant data. ID would be on the x axis and threads on the y. The sparkline code above compiled and seemed to work, except that where my graph was supposed to be there was just one word "Loading..."
As for zingapp I used the example in the plugin page:
<zing:chart type="area" width="700" height="350"
container="acceptToConvertChart" data="${data}" xLabels="${labels}" effect="4" />
but just changed data to dbContent, which is mapped from my controller to my view like so:
def appProjects = Threadcount.list()
[dbContent: appProjects]
and for "labels" I used dbContent.id. When I ran the zingChart code I got the following error:
No signature of method:
zingchart.ZingChartTagLib$_closure2_closure3.doCall() is applicable
for argument types: (threadsapp.Threadcount) values:
[threadsapp.Threadcount : 1] Possible solutions:
doCall(java.lang.Object, java.lang.Object), call(),
call([Ljava.lang.Object;), call(java.lang.Object),
call(java.lang.Object, java.lang.Object), findAll()
it also says that the line: container="acceptToConvertChart" data="${data}" xLabels="${labels}" effect="4"/>
is the culprit.
Does anyone know the proper syntax to make either of the two code snipets work? Or if you have had the same problem or something very similar, how did you fix it?

How to use locale entity in js-code

is it possible to get the value of an entity
<!ENTITY gatwayError "Gateway error">
using javascript? For now I reference them in my xul file using
&gatewayError;
UPDATE: In my ff-sidebar.xul within the <page> I have
<stringbundleset id="stringbundleset">
<stringbundle id="strings"
src="chrome://myaddon/locale/de/sidebar.properties"/>
</stringbundleset>
In my ff-sidebar.js I do on click:
var strbundle = document.getElementById("strings");
var localizedString = strbundle.getString("test");
This gives me following error
Should it not be
var strbundle = document.getElementById("stringbundleset");
This gives me no error but no result too.
Basically what Neil posted there is what you need to do (minus first paragraph rant :P )
Here's an example (basically digest from Neil's links):
Your XUL file:
<stringbundleset id="strbundles">
<stringbundle id="strings" src="chrome://yourextension/locale/something.properties"/>
</stringbundleset>
Your something.properties (there you define your localized strings key=value). Of course you can have as many files as you want/need:
something=Some text for localization
something2=Some more text
Your js file:
var strbundle = document.getElementById("strings");
var localizedString = strbundle.getString("something");
Hope this helps.
This works for small numbers of entities. For instance, menuitems sometimes have two entities with slightly different text depending on what the menuitem will be used for, and the correct entity is then copied to the label. The worst abuse of this was for the Delete menuitem in Thunderbird and SeaMonkey's mail windows, which had labels for unsubscribing from newsgroups, deleting folders, cancelling news posts, deleting single or multiple messages, or undeleting single or multiple messages from folders using the IMAP mark as delete model. Phew!
If you have lots of locale data then the best thing is to put it in its own .properties file and read it using a <stringbundle>. If your script doesn't have access to a <stringbundle> element it is also possible to manually retrieve an nsIStringBundle from the nsIStringBundleService.

Create tab/window with DOM document instead of URI?

I have a web service that requires special headers to be sent in the request. I am able to retrieve expected responseXMLs using an XMLHttpRequest and setRequestHeader().
Now I would like to create a new tab (or window) containing the response document. I would like the default XMLPrettyPrint.xsl file applied to it and when the source is viewed, I'd like to see the un-styled source as when viewing a normal .xml file.
Any ideas?
I ended up creating a protocol handler.
The biggest trick that I didn't find to be documented well was the fact that the XPCOM contract ID must start with "#mozilla.org/network/protocol;1?name=". E.g.,:
/* as in foo:// . This is called the scheme. */
var thisIsWhatMyProtocolStartsWith = "foo";
var contractID = "#mozilla.org/network/protocol;1?name=" + thisIsWhatMyProtocolStartsWith;

Resources