1 <?php
defined('SYSPATH') OR die('No direct access allowed.'); ?
>
5 <meta http
-equiv
="Content-Type" content
="text/html; charset=utf-8" />
6 <title
><?php
echo Kohana
::config('config.product_name').' '._('login'); ?
></title
>
7 <link type
="text/css" rel
="stylesheet" href
="<?php echo ninja::add_path('css/default/common.css') ?>" media
="all" />
8 <link type
="text/css" rel
="stylesheet" href
="<?php echo ninja::add_path('css/default/print.css') ?>" media
="print" />
9 <link type
="text/css" rel
="stylesheet" href
="<?php echo ninja::add_path('css/default/jquery-ui-custom.css') ?>" />
10 <?php
echo html
::link($this->add_path('icons/16x16/favicon.ico'),'icon','image/icon') ?
>
11 <?php
echo html
::script('application/media/js/jquery.js'); ?
>
12 <script type
="text/javascript">
13 var this_page
= "<?php echo Kohana::config('config.site_domain').
14 Kohana::config('config.index_page').'/'.Kohana::config('routes.log_in_form'); ?>";
15 if (window
.location
.pathname
!= this_page
)
16 window
.location
.replace(this_page
);
18 <script type
="text/javascript">
20 var _site_domain
= '<?php echo Kohana::config('config
.site_domain
') ?>';
21 var _index_page
= '<?php echo Kohana::config('config
.index_page
') ?>';
22 $
(document
).ready(function() {
23 $
('#login_form').bind('submit', function() {
25 $
('#login').attr('disabled', true);
26 $
('#login').attr('value', '<?php echo _('Please wait
...') ?>');
31 <?php
echo new View('js_header', array('js' => $js)); ?
>
35 <div id
="login-table">
36 <?php
if (isset($error_msg)) echo $error_msg; ?
>
37 <?php
echo form
::open('default/do_login', array('id' => 'login_form')); ?
>
39 <tr
><td colspan
="2"><hr
/></td
></tr
>
41 <td
><label
for="username"><?php
echo _('Username') ?
></label
></td
>
42 <td
><?php
echo form
::input(array('name'=>'username', 'class'=>'login_field'),'','class="i160"') ?
></td
>
45 <td
><label
for="password"><?php
echo _('Password') ?
></label
></td
>
46 <td
><?php
echo form
::password(array('name'=>'password', 'class'=>'login_field'),'','class="i160"') ?
></td
>
49 $auth = Auth
::instance();
50 $default_auth = $auth->get_default_auth();
51 if (!empty($auth_modules) && is_array($auth_modules) && count($auth_modules) > 1) { ?
>
53 <td
><?php
echo _('Login method') ?
></td
>
54 <td
><?php
echo form
::dropdown(array('name'=>'auth_method', 'class'=>'login_field'), array_combine( $auth_modules, $auth_modules ), $default_auth ) ?
></td
>
58 <tr
><td colspan
="2"><hr
/></td
></tr
>
60 <td colspan
="2" style
="text-align: center">
62 echo csrf
::form_field();
63 echo form
::submit('login', _('Login'), 'style="margin-left: 5px"');
65 <div id
="loading" style
="display:none;">
66 <?php
echo html
::image('application/media/images/loading.gif') ?
>
71 <?php
echo form
::close() ?
>