2012-11-25 - Re: [GRASE-Hotspot] Show “reset expiry” button on same day before expiration date

Header Data

From: Tim White <ti***8@gmail.com>
Message Hash: 42f0f2b938021e259f9b08d0de77fa5814cd2badaa97e6d783e4f54cdd7c7499
Message ID: <50B28E3D.5030104@gmail.com>
Reply To: <CA+9ZPKr+Yg=zRQv_J3ZPCfcR6cL_iefU+fYdqRmsAaC-twYMyQ@mail.gmail.com>
UTC Datetime: 2012-11-25 14:31:41 UTC
Raw Date: Mon, 26 Nov 2012 07:31:41 +1000

Raw message

On 20/11/12 10:18, Santiago Berniz wrote:
> Hi, Does anyone know how to show the "reset expiry" button on the day 
> or before the expiration date, I can see it shows only after the 
> account exppires, but i want it to show before it does
> Thanks

Have a look in edituser.tpl

The code is around line 41

     {if $user.ExpirationTimestamp > $smarty.now}{$user.FormatExpiration}
     {else}<strong>{t}This user account has 
expired{/t}</strong><br/>{$user.FormatExpiration}<br/>
     <button type="submit" name="unexpiresubmit">{t}Reset 
expiry{/t}</button>
     {/if}

I'd change it to something like below
     {$user.FormatExpiration}
     <button type="submit" name="unexpiresubmit">{t}Reset 
expiry{/t}</button>

Which will give you the expiry date, and a reset button. Unfortunately 
this will "reset" it from the current day (so expiry "+1 month" will add 
1 month from the day you push it, not 1 month past the end of the 
current expiry).

Not sure if you filed a ticket yet, but if you file a ticket a 
trac.grasehotspot.org I'll look at both exposing this button more, and 
also modifying it to be able to increase expiry from current end as well.

Tim




Thread