You are not logged in.
Pages: 1
hi
i have made a hook that sends reports by email, but i would need this code snippets if possible:
- a form like the one in the current sento email option, that allows the user to choose a recipient from a list of users. his mail address appears by default.
- a second simpler option, although less functional, would be to predefine the user email in an input box, and the user could change it
do you have a sample of any of the two?
kind regards
Offline
i have been able to accomplish the second option, but it would be nice to have the first one: a selection of users like the sento mail.
also, when popping the form it appears in a strange way, out of the actual content, instead to floating in the center:
def callback = [
consumes : { report ->
def config = new SendToClientConfig();
config.setTitle("....");
config.setIcon(".....");
config.setSelectFormat(true);
def user = GLOBALS.getRsService(AuthenticatorService.class).getCurrentUser();
config.setForm("""
{
"width": 600,
"height": 500,
"form" : {
"labelAlign": "left",
"fields": [{
"id": "email",
"type": "string",
"label": "Email Address",
"value":"""+"\""+ user.getEmail()+"\""+"""
}]
}
}
""")
return config;
Offline
Pages: 1