Token is not getting a value when the form sent by email - content-management-system

I'm developing a basic recruitment-type website.
I have an "Apply" CustomForm attached with a contenttype("Job"), but I can't get access fields outside of the CustomForm widget. I'm trying to add the reference number or the url to the email within the workflow. Orchard shows {Content.Fields.Input-Reference} token, but it returns no value when used.
Should I overwrite the handler when the form is created or how can I access fields of other zones?

As far as I understand the question, you don't actually need to add a custom token to your module. Custom Forms module takes care of that for you and adds the tokens for fields itself. You just need to use them in the email module.
Just look for a tokens named like this:
Content.Fields.[FormContentTypeName].[FieldName]
Not that the tasks of adding custom tokens to the system and accessing them inside the workflow are particularly hard, mind you.

Related

Yousign API: How to know if a procedure has been completely signed?

I'm using Yousign on my onboarding process to make my users sign a contract before accessing my application.
To achieve that:
On the YouSign UI, I manually create a new procedure from a template and copy the signature link (I get a URL like https://staging-app.yousign.com/procedure/sign?members=/members/a8xxxxxx)
I copy that link on my user account
When the user logs in, I open a modal and display the signature procedure in an iframe
When the users has signed on the iframe, I redirect him to a webpage where I trigger an event that closes the modal
At that stage, when the modal closes I'd like to check through a backend API call to YouSign API if the procedure has been fully signed.
But I can't find anything to do that in the API.
It seems I could use the GET /procedures/xxx method, but the Signature link does not contain any procedureID, only members IDs.
And there is no GET /members/xxx method, so I can't retrieve any procedure from there.
The use case of checking if a document has been signed seems pretty common for a e-signature API so I'm probably missing an obvious solution.

Azure AD B2C using custom HTML to request OTP verification via SendGrid

I'm using Azure AD B2C / IEF Custom Policies. As part of my Password Reset user journey, I want to use SendGrid to handle the email for the OTP / verification code. I also want to use custom HTML templates for the password reset page(s). The Azure docs give a good example for using SendGrid... BUT it uses DisplayControl elements to format the password reset page and it's not immediately obvious how to augment or replace the DisplayControl element to instead use Custom HTML.
Did anyone manage to get this working? Any pointers?
TIA
EDIT: Is it simply a case of adding a LoadUri element to the ContentDefinition that contains the DataUri?
Actually, it turns out that the DisplayControl works fine. It forms part of the HTML that is dynamically generated and injected into the Custom Template HTML ("App" element) by B2C.
Initially I was getting Server 500 errors from B2C, which lead be to believe there was a problem with the approach - but the I found the source of the errors elsewhere and once fixed, the DisplayControl components worked pretty seemlessly

How create cHash for an extbase action link

I need a link for an action, which I could send per email.
This works fine with using the viewhelper "f:link.action". Here an example:
<f:link.action action="changePw" id="changePw" absolute="true" arguments="{email : uSetup.uEmail, user : uSetup.uName}"></f:link.action>
Now I have the problem, that in the used form, the user can update his email. In this case, the link is not useful, because it includes the old email address and not the new one, which would be required!
I have looked for hours, but I could not find any useful solution.
The best would be, if could create the link in a php programm and than run a Typo3 php routine, which is creating me the required cHash value. For security resons, I would not switch off the cHash feature.
Is there a Typo3 function, which could create me the cHash value?
The other way, would be to update the viewhelper, that it is using the actual value from the email textfield. But how could I do it?
Thanks in advance for your support.
A cHash is generated automatically if you generate an URL.
Data can be transfered from the client to the server in two ways: GET and POST parameters.
If you want to protect these parameters you secure them with a cHash. the hash represents a list of static parameters. These are replaced on server side overwriting any values coming from the client.
so it is clear: you can't use a value in the cHash if that value could be changed in a form. you need to exclude the emailadress from cHash for the form where the email can be changed.
You might define an alternative field (other name => other URL parameter) where a new email can be inserted and after the submit the email could be updated by the alternative field.

Different registration forms for different roles. FOSUserBundle

I'm absolutely new of Symfony, and I'm trying to implement a registration form that works only with invitation
but that can redirect two different forms for two different roles.
In practice if I send an invitation for an USER_TYPE1 role the client can only register like USER_TYPE1, if I send an invitation for an USER_TYPE2 the client can only register like USER_TYPE2 (and, of course, assigns the corrispondent role).
Is it possible?
thank you in advance for your help
UPDATE:
I want two different form because one user will be allowed to update file, but will also have to set his position and other important settings. The second user will only allow to download the files uploaded by the first kind of user, and his profile needs completely different information.
I do not have enough reputation to ask for details, but one thing that is not clear in your question is: why do you need 2 different forms? In your question, you mention 2 different roles, but why do you need 2 different forms? If you really need 2 different forms, then you should first:
- create a new form type
- create a new view (twig)
Like Boris suggested, I would keep some kind of token for every invitation sent, and associate an email address, and a role to it. Then modify your registration route so you can pass a token in there, like this:
register:
pattern: /signup/{token}
defaults: { _controller: MyBundle:Registration:signup }
In the registration action of your controller, you created the correct form type and display the appropriate twig, depending on the ROLE associated to the token you just got. And when handling a POST, you check the Token again to see if it matches the email address, and assign the proper ROLE when creating the User.
public function signupAction($token) {
// 1. Get the Token entity matching the $token variable
// 2. Create the correct form type
// 3. Display the correct twig for GET, assign correct ROLE to new User for POST
}
But you can't use FOSUserBundle as-is. You will have to overwrite the registration process. You can read the FOSUserBundle documentation about that.
What's certain is that, for every invitation you send, you should keep a token with a matching email address and ROLE (the role you want to give to that person).

Drupal email users

I'm using Drupal 6.16: When a user creates an account on my site I have them select a category (ie children, youth, adult, etc). This is done with the select list box using the content_profile module. I have a content type that posts an announcement. In this content type is a check box that says 'email group'. Right now it does nothing, but what I would like for it to do is e-mail all the users that are associated with the group they chose when signing up for their account. If this will require extra code please be specific as I am not a strong php programmer.
Thanks for the help!!
msindle
There might be some module that do it exactly, but I don't think so.
I would have done it using few building blocks:
Retrieve the list of emails using Views - define a view that gives you the addresses according to a given group argument.
Use Rules module that will send an email notification after node is created.
Combine the two (this is the hard part) - insert the values from the view as the recipients for the email. You might be able to do it using PHP inside the Rule definition, plus view execution.
Try to accomplish it, and if you get into troubles, you are welcome to contact me via shushu.i#gmail.com
I would try http://drupal.org/project/subscriptions module + http://drupal.org/project/messaging module. You can set preferences for automatic subscribing to content type. Maybe Rules module can subscribe users automatically after creating or updating content_profile. Or maybe Rules can flag users after creating or updating content_profile and Subscription module could autosubscribe flagged users.