Added the language selection in the user account.

dev
Loic d'Anterroches 2008-12-19 11:30:50 +01:00
parent d11b107ce1
commit d2323c6d97
2 changed files with 18 additions and 0 deletions

View File

@ -49,6 +49,18 @@ class IDF_Form_UserAccount extends Pluf_Form
'size' => 20,
),
));
$this->fields['language'] = new Pluf_Form_Field_Varchar(
array('required' => true,
'label' => __('Language'),
'initial' => $this->user->language,
'widget' => 'Pluf_Form_Widget_SelectInput',
'widget_attrs' => array(
'choices' =>
Pluf_L10n::getInstalledLanguages()
),
));
$this->fields['password'] = new Pluf_Form_Field_Varchar(
array('required' => false,
'label' => __('Your password'),

View File

@ -28,6 +28,12 @@
</td>
</tr>
<tr>
<th>{$form.f.language.labelTag}:</th>
<td>{if $form.f.language.errors}{$form.f.language.fieldErrors}{/if}
{$form.f.language|unsafe}
</td>
</tr>
<tr>
<th>{$form.f.password.labelTag}:</th>
<td>{if $form.f.password.errors}{$form.f.password.fieldErrors}{/if}
{$form.f.password|unsafe}<br />