Gossamer Forum
Home : Products : Gossamer Links : Discussions :

[suggestion] Valadation Email Text Box

Quote Reply
[suggestion] Valadation Email Text Box
Just a suggestion,

But why not offer a couple of choices for the validation rejection email (I currently cut and past each time I reject to offer the exact reason for rejection):

Current setup uses the email-del.txt template...

[ ] Validate [ ] Delete witout Reason [ ] Delete and Email Reason

++++++++++++++++++++++++++++++++++++++++

Email-del message in here

++++++++++++++++++++++++++++++++++++++++




What I am suggesting is a couple of options which are defined in the language file which would be auto inserted into the rejection email template for reasons (tags):

[ ] Validate [ ] Delete witout Reason [ ] Delete and Email Reason

++++++++++++++++++++++++++++++++++++++++

Email-del message in here

++++++++++++++++++++++++++++++++++++++++


[X] Reason Text A
[X] Reason Text B
[X] Reason Text C
[X] Reason Text D
[X] Reason Text E
[X] Reason Text F


etc.....


http://www.iuni.com/...tware/web/index.html
Links Plugins

Last edited by:

Ian: Jul 15, 2002, 9:27 AM
Quote Reply
Re: [Ian] [suggestion] Valadation Email Text Box In reply to
Couldn't that be done with a javascript snippet??

I've wanted something like that, and you could set your default messages in the Admin area, and depending on which radio button you picked, you got a different message in the browser (it's only text, so holding it in a javascript array is trivial).


PUGDOG´┐Ż Enterprises, Inc.

The best way to contact me is to NOT use Email.
Please leave a PM here.
Quote Reply
Re: [Ian] [suggestion] Valadation Email Text Box In reply to
You could put them all in hidden fields then do something like:
Code:
<input type="radio" name="reason" value="You suck!" onclick="document.form.textarea.value=this.value;">

Obviously change form.textarea to the name of the rejection form field.

Last edited by:

Paul: Jul 15, 2002, 10:39 AM
Quote Reply
Re: [Paul] [suggestion] Valadation Email Text Box In reply to
Thanks for the comment guys.

I think GT should include this in the base program, so anyone could use it right off...but I'll change it in my own for now.


http://www.iuni.com/...tware/web/index.html
Links Plugins
Quote Reply
Re: [Ian] [suggestion] Valadation Email Text Box In reply to
That's a good idea. Mind sending me the code for that when you're done?

Not to cramp your coding style, but I was thinking something like this could be done:

The plugin or global would first look for a number of email templates with a strict filenaming syntax. Something like, link_denied_yourfilename.txt and with a regex and opendir you can pull all the filenames out.

Pull the files out and for each entry, parse the possible email with GT::Template

Then create a number of radiobuttons on the validate screen with the javascript code to fill the textarea.
Quote Reply
Re: [Aki] [suggestion] Valadation Email Text Box In reply to
Sure!

Though it sounds like you have just about written it! LOL


http://www.iuni.com/...tware/web/index.html
Links Plugins
Quote Reply
Re: [Ian] [suggestion] Valadation Email Text Box In reply to
Haha, I wish. Cool I would put it together for ya if I wasn't putting out a few fires. ouch ouch hot hot ;)
Quote Reply
Re: [Aki] [suggestion] Valadation Email Text Box In reply to
Code:
sub {

my $dir = %CFG->{admin_root_path} . '/templates/' . $CFG->{build_default_tpl};
my @reject = ();

opendir DIR, $dir or die $!;
while (defined ( my $reject = grep { /\.reject$/ } readdir(DIR) )) {
open FILE, "$dir/$reject" or die $!;
$reason = <FILE>;
close FILE;
$output .= qq|<input type="radio" name="reason" value="$reason" onclick="form.field.value=this.value;">|;
}
closedir DIR;

return $output;
}

Well there is some code...you'd just name the rejection emails blah.reject

I took a look at the template but everything is stored in <%output%> plus the form doesn't have a name which is needed for the radio clicking.

Last edited by:

Paul: Jul 15, 2002, 12:12 PM
Quote Reply
Re: [Paul] [suggestion] Valadation Email Text Box In reply to
Thanks Paul


http://www.iuni.com/...tware/web/index.html
Links Plugins
Quote Reply
Re: [Aki] [suggestion] Valadation Email Text Box In reply to
Ok, I'm having a look/go at this now....


http://www.iuni.com/...tware/web/index.html
Links Plugins

Last edited by:

Ian: Jul 16, 2002, 6:52 PM