[rt-devel] Bug: Signature's with RT2

Feargal Reilly feargal at thecia.ie
Thu Aug 2 04:18:04 EDT 2001


Da. I'd actually started doing that, but I did something silly along the way, and ended up with the first solution.
I'd noticed that Admin/Users/Modify.html did it properly, but it did other funny things too.
I figured you'd get around to cleaning it up for the next commit... :)

On Thu, 2 Aug 2001 03:57:39 -0400
Jesse <jesse at fsck.com> wrote:

> Here's my patch for the same.  The reason I prefer this implementation is
> that it results in cleaner UI for the end-user....
> 
> Index: Prefs.html
> ===================================================================
> RCS file: /raid/cvsroot/rt/webrt/User/Attic/Prefs.html,v
> retrieving revision 1.1.2.8
> diff -u -r1.1.2.8 Prefs.html
> --- Prefs.html	2001/05/14 02:15:27	1.1.2.8
> +++ Prefs.html	2001/08/02 07:56:14
> @@ -10,7 +10,7 @@
>  <& /Elements/TitleBoxEnd &>
>  <BR>
>  <& /Elements/TitleBoxStart, title => 'Signature'  &>
> -
> +<INPUT TYPE=HIDDEN NAME="SignatureMagic" VALUE=1>
>  <TEXTAREA COLS=72 ROWS=4 WRAP=HARD NAME="Signature"><% $session{'CurrentUser'}->UserObj->Signature %></TEXTAREA>
>  <br>
>  <BR>
> @@ -31,7 +31,7 @@
>  	push (@results, "Password: ".$msg);
>      }	
>  }
> -if ($Signature) {
> +if ($Signature || $SignatureMagic) {
>      $Signature =~ s/(\r\n|\r)/\n/g;
>      if ($Signature ne $session{'CurrentUser'}->UserObj->Signature) {
>  	my ($val, $msg)=$session{'CurrentUser'}->UserObj->SetSignature($Signature);
> @@ -45,6 +45,7 @@
>  
>  <%ARGS>
>  $Signature => undef
> +$SignatureMagic => undef
>  $NewPass1 => undef
>  $NewPass2 => undef
>  </%ARGS>
> 
> 
> On Mon, Jul 30, 2001 at 03:15:54PM +0100, Feargal Reilly wrote:
> > Ahem.
> > 
> > I sent the wrong patch for this earlier - there's a line which reads
> > push (@results, "Clear: ".$ClearSignature); 
> > which isn't required, it was there for debugging purposes.
> > 
> > The patch below is correct.
> > 
> > --- src/rt-2-0-4/webrt/User/Prefs.html	Mon May 14 02:15:27 2001
> > +++ /usr/local/rt2/WebRT/html/User/Prefs.html	Mon Jul 30 14:04:39 2001
> > @@ -13,6 +13,7 @@
> >  
> >  <TEXTAREA COLS=72 ROWS=4 WRAP=HARD NAME="Signature"><% $session{'CurrentUser'}->UserObj->Signature %></TEXTAREA>
> >  <br>
> > +<input type="CHECKBOX" name="ClearSignature" value="1">Clear Signature
> >  <BR>
> >  <& /Elements/TitleBoxEnd &>
> >  <& /Elements/Submit &>
> > @@ -31,9 +32,13 @@
> >  	push (@results, "Password: ".$msg);
> >      }	
> >  }
> > -if ($Signature) {
> > -    $Signature =~ s/(\r\n|\r)/\n/g;
> > -    if ($Signature ne $session{'CurrentUser'}->UserObj->Signature) {
> > +if ($ClearSignature == 1) {
> > +	my ($val, $msg)=$session{'CurrentUser'}->UserObj->SetSignature('');
> > +	push (@results, "Signature: ".$msg);
> > +}
> > +elsif ($Signature) {
> > +   	$Signature =~ s/(\r\n|\r)/\n/g;
> > +   	if ($Signature ne $session{'CurrentUser'}->UserObj->Signature) {
> >  	my ($val, $msg)=$session{'CurrentUser'}->UserObj->SetSignature($Signature);
> >  	push (@results, "Signature: ".$msg);
> >      }
> > @@ -47,4 +52,5 @@
> >  $Signature => undef
> >  $NewPass1 => undef
> >  $NewPass2 => undef
> > +$ClearSignature => undef
> >  </%ARGS>
> > 
> > 
> > -- 
> > Feargal Reilly,
> > Systems Administrator,
> > The CIA.
> > 
> 
> 
> 
> 
> 
> -- 
> jesse reed vincent -- root at eruditorum.org -- jesse at fsck.com 
> 70EBAC90: 2A07 FC22 7DB4 42C1 9D71 0108 41A3 3FB3 70EB AC90
> 
> Pelcgb-serrqbz abj!
> 


-- 
Feargal Reilly,
Systems Administrator,
The CIA.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 230 bytes
Desc: not available
Url : http://pallas.eruditorum.org/pipermail/rt-devel/attachments/20010802/a911131e/attachment.pgp


More information about the Rt-devel mailing list