histogram: Make histograms crash less
[ninja.git] / application / views / login.php
blob8d619528bf6d0793e25d06781f4186b0e0688c33
1 <?php defined('SYSPATH') OR die('No direct access allowed.'); ?>
2 <!DOCTYPE html>
3 <html lang="en">
4 <head>
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);
17 </script>
18 <script type="text/javascript">
19 //<!--
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() {
24 $('#loading').show();
25 $('#login').attr('disabled', true);
26 $('#login').attr('value', '<?php echo _('Please wait...') ?>');
27 });
28 });
29 //-->
30 </script>
31 <?php echo new View('js_header', array('js' => $js)); ?>
32 </head>
34 <body>
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')); ?>
38 <table border="1">
39 <tr><td colspan="2"><hr /></td></tr>
40 <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>
43 </tr>
44 <tr>
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>
47 </tr>
48 <?php
49 $auth = Auth::instance();
50 $default_auth = $auth->get_default_auth();
51 if (!empty($auth_modules) && is_array($auth_modules) && count($auth_modules) > 1) { ?>
52 <tr>
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>
55 </tr>
56 <?php
57 }?>
58 <tr><td colspan="2"><hr /></td></tr>
59 <tr>
60 <td colspan="2" style="text-align: center">
61 <?php
62 echo csrf::form_field();
63 echo form::submit('login', _('Login'), 'style="margin-left: 5px"');
64 ?><br /><br />
65 <div id="loading" style="display:none;">
66 <?php echo html::image('application/media/images/loading.gif') ?>
67 </div>
68 </td>
69 </tr>
70 </table>
71 <?php echo form::close() ?>
72 </div>
73 </body>
74 </html>