Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 6be84d46

Von Sven Schöling vor mehr als 3 Jahren hinzugefügt

  • ID 6be84d462062965cdfb2e5fe8b348f51c8b00465
  • Vorgänger 22c00994
  • Nachfolger 5c6e387a

LoginScreen: dump entfernt

Unterschiede anzeigen:

SL/Controller/LoginScreen.pm
168 168
  $::request->{layout} = $::request->is_mobile
169 169
    ? SL::Layout::Dispatcher->new(style => 'mobile_login')
170 170
    : SL::Layout::Dispatcher->new(style => 'login');
171

  
172
  $::lxdebug->dump(0,  "layout", $::request->{layout});
173 171
}
174 172

  
175 173
sub init_clients {
......
185 183
sub show_login_form {
186 184
  my ($self, %params) = @_;
187 185

  
188
  if ($::request->is_mobile) {
189
    $self->render('login_screen/mobile_login', %params, version => SL::Version->get_version, callback => $::form->{callback});
190
  } else {
191
    $self->render('login_screen/user_login', %params, version => SL::Version->get_version, callback => $::form->{callback});
192
  }
186
  $self->render('login_screen/user_login', %params, version => SL::Version->get_version, callback => $::form->{callback});
193 187
}
194 188

  
195 189
1;
templates/mobile_webpages/login_screen/user_login.html
1
[%- USE T8 %]
2
[%- USE HTML %][%- USE L -%][%- USE LxERP -%]
3

  
4
<center>
5
  <a href="https://www.kivitendo.de" target="_top" class="no-underlined-links center-align">
6
    <img src="image/kivitendo.png" class="responsive-img kivitendo-logo">
7
  </a>
8
</center>
9
<h5 class="center-align">[% LxERP.t8('kivitendo v#1', version) %]</h5>
10

  
11
<div class="section">
12
<div class="container">
13
[% IF error %]
14
  <div class="col s12 red">[% error | html %]</div>
15
[% END %]
16
[% IF warning %]
17
  <div class="col s12 blue lighten-3">[% warning | html %]</div>
18
[% END %]
19
[% IF info %]
20
  <div class="col s12 green lighten-1">[% ok | html %]</div>
21
[% END %]
22
</div>
23
</div>
24

  
25
<div class="section">
26
<div class="container">
27
  <div class="z-depth-1 grey lighten-4 row" style="padding: 32px 48px 0px 48px; border: 1px solid #EEE;">
28

  
29
    <form method="post" name="loginscreen" action="controller.pl" target="_top" class="col s12">
30
      <div class="row">
31
        <div class="input-field col s12">
32
          [% L.input_tag('{AUTH}login', FORM.$auth_login, id='auth_login', class='initial_focus validate', label=LxERP.t8('Login Name')) %]
33
          <label for='auth_login'>[% 'Login Name' | $T8 %]</label>
34
        </div>
35
      </div>
36
      <div class="row">
37
        <div class="input-field col s12">
38
          [% L.input_tag('{AUTH}password', '', type='password', id='auth_password', class='validate', label=LxERP.t8('Password')) %]
39
          <label for='auth_password'>[% 'Password' | $T8 %]</label>
40
        </div>
41
      </div>
42
      <div class="row">
43
        <div class="input-field col s12">
44
          [% L.select_tag('{AUTH}client_id', SELF.clients, id='auth_client_id', title_key='name', default=SELF.default_client_id) %]
45
          <label for='auth_client_id'>[% 'Client' | $T8 %]</label>
46
        </div>
47
      </div>
48

  
49

  
50
      <div class="row">
51
        [% L.hidden_tag("action", "LoginScreen/login") %]
52
        <button type='submit' name='btn_login' class='col s12 btn btn-large waves-effect'>Login</button>
53
      </div>
54
    </form>
55

  
56
  </div>
57
</div>
58
</div>
templates/mobile_webpages/menu/menu.html
1
[%- USE T8 %]
2
[%- USE L %]
3
[%- USE HTML %]
4
[%- USE LxERP -%]
5
<nav>
6
  <div class="nav-wrapper">
7
    <a class="brand-logo">Kivitendo</a>
8
    <a href="#" data-target="nav-mobile" class="sidenav-trigger"><i class="material-icons">menu</i></a>
9
    <ul id="nav" class="right hide-on-med-and-down">
10
      [% PROCESS menu_items %]
11
    </ul>
12
  </div>
13
</nav>
14

  
15
<ul id="nav-mobile" class="sidenav">
16
  [% PROCESS menu_items %]
17
</ul>
18

  
19

  
20
[%- BLOCK menu_items %]
21
 [%- IF MYCONFIG.login %]
22
  <li><a>[% 'User' | $T8 %]: [% MYCONFIG.login | html %]</a></li>
23
 [%- ELSE %]
24
  <li>[% L.link(C.url_for(controller='LoginScreen', action='user_login'), LxERP.t8('Login')) %]</li>
25
 [%- END %]
26

  
27
  <li><div class="divider"></div></li>
28

  
29
  [%- FOREACH node = menu.tree %]
30
    [%- NEXT UNLESS node.visible %]
31
    <li>[% L.link(menu.href_for_node(node) || '#', menu.name_for_node(node), target=node.target) %]</li>
32
  [%- END %]
33

  
34
  <li><div class="divider"></div></li>
35

  
36
 [%- IF MYCONFIG.login %]
37
  <li>[% L.link(C.url_for(controller='LoginScreen', action='logout'), LxERP.t8('Logout')) %]</li>
38
 [%- END %]
39
[% END %]
templates/webpages/login_screen/mobile_login.html
1
[%- USE T8 %]
2
[%- USE HTML %][%- USE L -%][%- USE LxERP -%]
3

  
4
<center>
5
  <a href="https://www.kivitendo.de" target="_top" class="no-underlined-links center-align">
6
    <img src="image/kivitendo.png" class="responsive-img kivitendo-logo">
7
  </a>
8
</center>
9
<h5 class="center-align">[% LxERP.t8('kivitendo v#1', version) %]</h5>
10

  
11
<div class="section">
12
<div class="container">
13
[% IF error %]
14
  <div class="col s12 red">[% error | html %]</div>
15
[% END %]
16
[% IF warning %]
17
  <div class="col s12 blue lighten-3">[% warning | html %]</div>
18
[% END %]
19
[% IF info %]
20
  <div class="col s12 green lighten-1">[% ok | html %]</div>
21
[% END %]
22
</div>
23
</div>
24

  
25
<div class="section">
26
<div class="container">
27
  <div class="z-depth-1 grey lighten-4 row" style="padding: 32px 48px 0px 48px; border: 1px solid #EEE;">
28

  
29
    <form method="post" name="loginscreen" action="controller.pl" target="_top" class="col s12">
30
      <div class="row">
31
        <div class="input-field col s12">
32
          [% L.input_tag('{AUTH}login', FORM.$auth_login, id='auth_login', class='initial_focus validate', label=LxERP.t8('Login Name')) %]
33
          <label for='auth_login'>[% 'Login Name' | $T8 %]</label>
34
        </div>
35
      </div>
36
      <div class="row">
37
        <div class="input-field col s12">
38
          [% L.input_tag('{AUTH}password', '', type='password', id='auth_password', class='validate', label=LxERP.t8('Password')) %]
39
          <label for='auth_password'>[% 'Password' | $T8 %]</label>
40
        </div>
41
      </div>
42
      <div class="row">
43
        <div class="input-field col s12">
44
          [% L.select_tag('{AUTH}client_id', SELF.clients, id='auth_client_id', title_key='name', default=SELF.default_client_id) %]
45
          <label for='auth_client_id'>[% 'Client' | $T8 %]</label>
46
        </div>
47
      </div>
48

  
49

  
50
      <div class="row">
51
        [% L.hidden_tag("action", "LoginScreen/login") %]
52
        <button type='submit' name='btn_login' class='col s12 btn btn-large waves-effect'>Login</button>
53
      </div>
54
    </form>
55

  
56
  </div>
57
</div>
58
</div>
templates/webpages/menu/material.html
1
[%- USE T8 %]
2
[%- USE L %]
3
[%- USE HTML %]
4
[%- USE LxERP -%]
5
<nav>
6
  <div class="nav-wrapper">
7
    <a class="brand-logo">Kivitendo</a>
8
    <a href="#" data-target="nav-mobile" class="sidenav-trigger"><i class="material-icons">menu</i></a>
9
    <ul id="nav" class="right hide-on-med-and-down">
10
      [% PROCESS menu_items %]
11
    </ul>
12
  </div>
13
</nav>
14

  
15
<ul id="nav-mobile" class="sidenav">
16
  [% PROCESS menu_items %]
17
</ul>
18

  
19

  
20
[%- BLOCK menu_items %]
21
 [%- IF MYCONFIG.login %]
22
  <li><a>[% 'User' | $T8 %]: [% MYCONFIG.login | html %]</a></li>
23
 [%- ELSE %]
24
  <li>[% L.link(C.url_for(controller='LoginScreen', action='user_login'), LxERP.t8('Login')) %]</li>
25
 [%- END %]
26

  
27
  <li><div class="divider"></div></li>
28

  
29
  [%- FOREACH node = menu.tree %]
30
    [%- NEXT UNLESS node.visible %]
31
    <li>[% L.link(menu.href_for_node(node) || '#', menu.name_for_node(node), target=node.target) %]</li>
32
  [%- END %]
33

  
34
  <li><div class="divider"></div></li>
35

  
36
 [%- IF MYCONFIG.login %]
37
  <li>[% L.link(C.url_for(controller='LoginScreen', action='logout'), LxERP.t8('Logout')) %]</li>
38
 [%- END %]
39
[% END %]

Auch abrufbar als: Unified diff