yii-user profile fields

Hello,

I’ve some trouble using the yii-user extension with proper internationalisation.

The default profile table includes a column ‘birthday’ with a ‘Date’ datatyp.

The yii-user extension generates a login and a update profile form using this field.

Unfortunately this is alway formatted with ‘yyyy-mm-dd’ and not taking care for the

language set in the configuration (‘language’ => ‘de’) to format the date to ‘dd.mm.yyyy’.

Is internationalisation not implemented or am I missing some information on how to use it?

Second problem with this field is the usage of UWjuidate which calls the juidatepicker.

It ist possible to set some parameters like {"ui-theme":"redmond","language":"de"}.

The language should derived from the locale->language to allow applications using

multiple languages.

Something else what seems to be useful is using the "changeMonth: true, changeYear: true" options

to easyily select a year and month. But I don’t now how to pass this parmeters to this widget. Any

help is welcome.

look at the code:


<?php echo UserModule::t('JSON string (example: {example}).',array('{example}'=>CJavaScript::jsonEncode(array('param1'=>array('val1','val2'),'param2'=>array('k1'=>'v1','k2'=>'v2'))))); ?>

return:

JSON string (example: {"param1":["val1","val2"],"param2":{"k1":"v1","k2":"v2"}})

I had a similar problem with this widget on this extension. I wanted to use the field for a Birthday field, but the extension is set to display by default the today date, without letting the user change the year directly.

I realized that the widget used is Jquery (google it)

So, I modified this code to add year modification options in UWjuidate class on ./modules/user/components/UWjuidate.php line 61, as follows:

	&#036;options['dateFormat'] = 'yy-mm-dd';		


	&#036;options['changeMonth'] = true; //added by me to support month changing


	&#036;options['changeYear'] = true; //added by me to support year changing


	&#036;options=CJavaScript::encode(&#036;options);

You could do the same for your date format.