Browse Source

* templates/user/profile.html.ep

master
Alex 'AdUser' Z 10 years ago
parent
commit
36fba797ca
  1. 2
      conf/ldv.conf.sample
  2. 2
      lib/LDV/User.pm
  3. 7
      templates/user/profile.html.ep

2
conf/ldv.conf.sample

@ -9,7 +9,7 @@
defclasses => ['inetOrgPerson'],
defattrs => [
'displayname', 'mail', 'cn', 'sn',
'displayname', 'mail', 'cn', 'sn', 'o',
'givenname', 'userpassword', 'uid',
],
},

2
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;
}

7
templates/user/profile.html.ep

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

Loading…
Cancel
Save