Skip to content

Commit

Permalink
added labels for login page
Browse files Browse the repository at this point in the history
  • Loading branch information
Viktor Turskyi committed Apr 30, 2012
1 parent 2790838 commit 72e4809
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
6 changes: 4 additions & 2 deletions lib/Mojolicious/Plugin/UserManager.pm
Expand Up @@ -268,8 +268,10 @@ sub _apply_conf_defaults {
$conf->{fields} //= []; $conf->{fields} //= [];
$conf->{site_url} //= 'http://localhost:3000/'; $conf->{site_url} //= 'http://localhost:3000/';
$conf->{home_url} //= 'user_update_form'; $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} ) { unless ( $conf->{storage} ) {
my $storage_dir = 'user_manager_' . $conf->{user_type}; my $storage_dir = 'user_manager_' . $conf->{user_type};
Expand Down
@@ -1,6 +1,6 @@
% title 'Login'; % title 'Login';


<h1>Login</h1> <br /> <%== um_config->{login_labels}->{title} %> <br />


<%= form_for auth_create => (method => 'post') => begin %> <%= form_for auth_create => (method => 'post') => begin %>


Expand All @@ -10,21 +10,21 @@
<table class='form'> <table class='form'>
<tr> <tr>
<!-- <td class='fieldname'><%= schema_for_field('user_id')->{label} %></td> //TODO use this --> <!-- <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> <td><input type='text' name='user_id' value="<%= flash 'user_id' %>" /></td>
</tr> </tr>


<tr> <tr>
<!-- <td class='fieldname'><%= schema_for_field('password')->{label} %></td> //TODO use this --> <!-- <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> <td><input type='password' name='password' value="<%= flash 'password' %>" /></td>
</tr> </tr>


<tr> <tr>
<td></td> <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>
<tr> <tr>
Expand Down

0 comments on commit 72e4809

Please sign in to comment.