Login banner


From: BradSent: 6/26/2012 12:36 PM

To: Brad; rt-users@bestpractical.com

Subject: Login banner


From: Brad

Sent: 6/26/2012 10:14 AM

To: rt-users@bestpractical.com

Subject: Login banner

Hello,

Does anyone have a how-to on adding text above, below or in the default login box via the login page.

RT version 4.0.5 default theme

Have a requirement to have legal warning at all login prompts.

Thanks,

Brad


From: Zynda, Bradley V. (GSFC-423.0)[ADNET SYSTEMS INC]Sent: 6/27/2012 10:13 AM

To: Brad

Subject: Re: [rt-users] Login banner

Hi Jonathan,

I have added a test label to:

/opt/rt4/share/html/Elements/Login

Code I have inserted:

<div class=“input-row”>

<span class=“label”><&|/l&>TestLabel</&>:</span>

</div>

Snippet of the code with my inserted code:

% $m->callback( %ARGS, CallbackName => ‘Header’ );

<& /Elements/Header, Title => loc(‘Login’), Focus => ‘user’, RichText => 0

&>

<div id=“body” class=“login-body”>

<& /Elements/ListActions,

title       =&gt; loc('Error'),

titlebox    =&gt; { class =&gt; 'error', hideable =&gt; 0 },

actions     =&gt; $actions

&>

% $m->callback( %ARGS, CallbackName => ‘BeforeForm’ );

<div id=“login-box”>

<&| /Widgets/TitleBox, title => loc(‘Login’), titleright => $RT::VERSION,

hideable => 0 &>

% unless (RT->Config->Get(‘WebExternalAuth’) and

!RT->Config->Get(‘WebFallbackToInternalAuth’)) {

<form id=“login” name=“login” method=“post” action="<%

RT->Config->Get(‘WebPath’) %>/NoAuth/Login.html">

<div class=“input-row”>

&lt;span class="label"&gt;&lt;&amp;|/l&amp;&gt;Username&lt;/&amp;&gt;:&lt;/span&gt;

&lt;span class="input"&gt;&lt;input name="user" value="&lt;%$user%&gt;" id="user"

/></span>

</div>

<div class=“input-row”>

&lt;span class="label"&gt;&lt;&amp;|/l&amp;&gt;Password&lt;/&amp;&gt;:&lt;/span&gt;

&lt;span class="input"&gt;&lt;input type="password" name="pass"

autocomplete=“off” /></span>

</div>

<div class=“input-row”>

&lt;span class="label"&gt;&lt;&amp;|/l&amp;&gt;TestLabel&lt;/&amp;&gt;:&lt;/span&gt;

</div>

<input type=“hidden” name=“next” value="<% $next %>" />

<script type=“text/javascript”>

jQuery(function(){

if (window.location.hash) {

    var form = jQuery("form[name=login]");

    form.attr('action', form.attr('action') + '#' +

window.location.hash.replace(/^#/, ‘’));

}

});

Do I need to rebuild anything? As I am not seeing any changes on the login

page via the browser.

Note: I have cleared the browser cache prior to going to the page.

Thanks,

Brad

Hi Brad,

You’ll just need to clear RT’s mason cache. Instructions here:
http://requesttracker.wikia.com/wiki/CleanMasonCache

Thanks,
DanOn Wed, Jun 27, 2012 at 10:39 AM, Brad b_zynda@comcast.net wrote:


From: Zynda, Bradley V. (GSFC-423.0)[ADNET SYSTEMS INC]
Sent: 6/27/2012 10:13 AM
To: Brad
Subject: Re: [rt-users] Login banner

Hi Jonathan,

I have added a test label to:

/opt/rt4/share/html/Elements/Login

Code I have inserted:

<&|/l&>TestLabel:

Snippet of the code with my inserted code:

% $m->callback( %ARGS, CallbackName => ‘Header’ );
<& /Elements/Header, Title => loc(‘Login’), Focus => ‘user’, RichText => 0
&>

<& /Elements/ListActions,
title => loc(‘Error’),
titlebox => { class => ‘error’, hideable => 0 },
actions => $actions
&>

% $m->callback( %ARGS, CallbackName => ‘BeforeForm’ );

<&| /Widgets/TitleBox, title => loc('Login'), titleright => $RT::VERSION, hideable => 0 &>

% unless (RT->Config->Get(‘WebExternalAuth’) and
!RT->Config->Get(‘WebFallbackToInternalAuth’)) {

<&|/l&>Username:
<&|/l&>Password:
<&|/l&>TestLabel:
jQuery(function(){ if (window.location.hash) { var form = jQuery("form[name=login]"); form.attr('action', form.attr('action') + '#' + window.location.hash.replace(/^#/, '')); } }); Do I need to rebuild anything? As I am not seeing any changes on the login page via the browser. Note: I have cleared the browser cache prior to going to the page. Thanks, Brad On 6/27/12 10:01 AM, "Brad" wrote: > > > >________________________________________ >From: >Jonathan Khattir >Sent: >6/27/2012 4:03 AM >To: >Brad >Subject: >Re: [rt-users] Login banner > >Go to /html/Elements/Login > >2012/6/26 Brad > > > > >________________________________________ >From: >Brad >Sent: >6/26/2012 12:36 PM >To: >Brad; >rt-users@bestpractical.com >Subject: >Login banner > > > > >________________________________________ >From: >Brad >Sent: >6/26/2012 10:14 AM >To: >rt-users@bestpractical.com >Subject: >Login banner > >Hello, > >Does anyone have a how-to on adding text above, below or in the default >login box via the login page. > >RT version 4.0.5 default theme > >Have a requirement to have legal warning at all login prompts. > >Thanks, >Brad > > > > > > > >

Hi Dan,

That’s what was missing along with a quick httpd restart.

I also moved the legal garble up above the login widget with a div align center P and it looks rather nice.

Thanks all for the help.

Hi,

I think it was answered recently in another similar thread.On Tue, Jun 26, 2012 at 10:31 PM, Brad b_zynda@comcast.net wrote:


From: Brad
Sent: 6/26/2012 12:36 PM
To: Brad; rt-users@bestpractical.com
Subject: Login banner


From: Brad
Sent: 6/26/2012 10:14 AM
To: rt-users@bestpractical.com
Subject: Login banner

Hello,

Does anyone have a how-to on adding text above, below or in the default
login box via the login page.

RT version 4.0.5 default theme

Have a requirement to have legal warning at all login prompts.

Thanks,
Brad

Best regards, Ruslan.