Permalink
Browse files

added labels for login page

  • Loading branch information...
1 parent 2790838 commit 72e4809dec64c5e08debce74e58524c188f22d6a Viktor Turskyi committed Apr 30, 2012
View
6 lib/Mojolicious/Plugin/UserManager.pm
@@ -268,8 +268,10 @@ sub _apply_conf_defaults {
$conf->{fields} //= [];
$conf->{site_url} //= 'http://localhost:3000/';
$conf->{home_url} //= 'user_update_form';
-
-
+ $conf->{login_labels}{title} //= '<h1>Login</h1>';
+ $conf->{login_labels}{user_id} //= 'Login';
+ $conf->{login_labels}{password} //= 'Password';
+ $conf->{login_labels}{submit} //= 'Login';
unless ( $conf->{storage} ) {
my $storage_dir = 'user_manager_' . $conf->{user_type};
View
8 lib/Mojolicious/Plugin/UserManager/templates/sessions/create_form.html.ep
@@ -1,6 +1,6 @@
% title 'Login';
-<h1>Login</h1> <br />
+<%== um_config->{login_labels}->{title} %> <br />
<%= form_for auth_create => (method => 'post') => begin %>
@@ -10,21 +10,21 @@
<table class='form'>
<tr>
<!-- <td class='fieldname'><%= schema_for_field('user_id')->{label} %></td> //TODO use this -->
- <td class='fieldname'>Login</td>
+ <td class='fieldname'><%== um_config->{login_labels}->{user_id} %></td>
<td><input type='text' name='user_id' value="<%= flash 'user_id' %>" /></td>
</tr>
<tr>
<!-- <td class='fieldname'><%= schema_for_field('password')->{label} %></td> //TODO use this -->
- <td class='fieldname'>Password</td>
+ <td class='fieldname'><%== um_config->{login_labels}->{password} %></td>
<td><input type='password' name='password' value="<%= flash 'password' %>" /></td>
</tr>
<tr>
<td></td>
- <td style='padding-top: 7px;'><input type='submit' value='Login' /></td>
+ <td style='padding-top: 7px;'><button type='submit' ><%== um_config->{login_labels}->{submit} %></button></td>
</tr>
<tr>

0 comments on commit 72e4809

Please sign in to comment.