Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

Fix problem with html_select_date all_empty(etc)

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Plugins
View previous topic :: View next topic  
Author Message
Svyat333
Smarty n00b


Joined: 01 Apr 2009
Posts: 1

PostPosted: Wed Apr 01, 2009 9:56 am    Post subject: Fix problem with html_select_date all_empty(etc) Reply with quote

Hi. Here problem:
if i receive $_GET['uid'] i assign value
$smarty->assign('user',$user->get_id($_GET['id']));
in template i write
{html_select_date prefix='bd' all_empty='---=---' time=$user.birthdate field_order='DMY' end_year="-18" start_year="-70"}
But if array user not assigned i receive selected option with current date. Not empty!

To correct this i modify funciton.html_select_date.php file
found string 'selected'=>(int)$time[1]?....
and replace with
(!is_null($params['time']) && (int)$time[1])?...
also modify for day and year select.

So now if i not assign value for time i receive select with default empty values Smile
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Plugins All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP