diff --git a/conf/ldv.conf.sample b/conf/ldv.conf.sample index 15f4895..76a810c 100644 --- a/conf/ldv.conf.sample +++ b/conf/ldv.conf.sample @@ -9,7 +9,7 @@ defclasses => ['inetOrgPerson'], defattrs => [ - 'displayname', 'mail', 'cn', 'sn', + 'displayname', 'mail', 'cn', 'sn', 'o', 'givenname', 'userpassword', 'uid', ], }, diff --git a/lib/LDV/User.pm b/lib/LDV/User.pm index eda90b0..c50d990 100644 --- a/lib/LDV/User.pm +++ b/lib/LDV/User.pm @@ -103,7 +103,7 @@ sub update { or die("wrong password\n"); my %attrs = (); - foreach my $key (qw(displayName mail org mobile)) { + foreach my $key (qw(displayName mail o mobile)) { my $value = $self->req->param(lc($key)); $attrs{$key} = $value; } diff --git a/templates/user/profile.html.ep b/templates/user/profile.html.ep index 1f23b48..35c8d13 100644 --- a/templates/user/profile.html.ep +++ b/templates/user/profile.html.ep @@ -1,6 +1,7 @@ % layout 'default'; % title l('User profile');

<%= l('User profile') %>

+% my $data = (stash 'user_data') || {}; % my @attrs = (method => 'POST', enctype => 'multipart/form-data'); %= form_for "/user/update" => (@attrs) => begin @@ -8,18 +9,22 @@ +% param displayname => $data->{displayName}; +% param mail => $data->{mail}; +% param o => $data->{o}; - + +% param mobile => $data->{mobile};
<%= l('Login') %> <%= session('useruid') %>
<%= l('Display name') %> <%= text_field 'displayname', placeholder => l('John Doe') %>
<%= l('Email') %> <%= text_field 'mail', type => 'email', placeholder => 'petrov@example.com' %>
<%= l('Organization') %><%= text_field 'org', placeholder => l('JSC Vector') %><%= text_field 'o', placeholder => l('JSC Vector') %>
<%= l('Cell phone') %> <%= text_field 'mobile', placeholder => '+79081235689' %>