infopark_fiona7 1.2.0.2.1 → 1.2.0.2.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 95e1d0c153cae176d4413ba9de85700117ff2119
4
- data.tar.gz: 073a4693abd33326b6d2218d7d0f69eb95a6c81a
3
+ metadata.gz: a8031af6f4f105005e994649c92cf9fa54bbd3e2
4
+ data.tar.gz: 3883dca2b5d3014599ee86386644091e7b6fa7cf
5
5
  SHA512:
6
- metadata.gz: e4684651e4eea73bcc38691a9ae8b0441063c190cd71b6a67637c2022eb9b2bcfb14fd306a9dda84f5d1b9dd3141f2f4594a8b373db98354b304780915cf1e8b
7
- data.tar.gz: 47871bc4bdd0a6ee52369e9b07f83b89af87a0c16a483c63fd0d2ed89a11d56fa0cf8425081a58912800f7814edcfa5813b2e47508f90e3343cc02234b4f66e6
6
+ metadata.gz: 13ed041d1617545fafc18b486384fea941593bdf73f3834535376fe90809e67c626ef3380ebb1ce0c714b4923857745f5c39b5f14c5f8c2f18d7342ed0be361d
7
+ data.tar.gz: c4358b8963db06312bcd4d38942e9a69ac3eb90ed01889d47e927b65eb82d5f24f5d51a3481da5da12d3bbe35604600b2279b8a80ec79e3c61fb58af6c0e8448
@@ -7,7 +7,7 @@ module Fiona7
7
7
  if valid_credentials?(login, password)
8
8
  rsession.user_name = login
9
9
 
10
- redirect_to true_root_path
10
+ redirect_to login_redirect
11
11
  else
12
12
  flash[:error] = I18n.t(:"fiona7.invalid_credentails")
13
13
  begin
@@ -28,6 +28,10 @@ module Fiona7
28
28
  @login_page = Fiona7LoginPage.instance || Scrivito::BasicObj.root
29
29
  end
30
30
 
31
+ def login_redirect
32
+ session[:login_redirect].presence || true_root_path
33
+ end
34
+
31
35
  def true_root_path
32
36
  if Fiona7.mode == :standalone
33
37
  '/'
@@ -18,6 +18,9 @@ class Fiona7LoginPageController < parent_class
18
18
  end
19
19
 
20
20
  def index
21
+ if request.referrer.present?
22
+ session[:login_redirect] ||= request.referrer
23
+ end
21
24
  super
22
25
  end
23
26
 
@@ -1,6 +1,12 @@
1
1
  <%= scrivito_tag :h1, @obj, :title %>
2
2
  <%= scrivito_tag :div, @obj, :body %>
3
3
 
4
+ <% if flash[:error].present? %>
5
+ <div class="alert alert-danger" role="alert">
6
+ <%= flash[:error] %>
7
+ </div>
8
+ <% end %>
9
+
4
10
  <%= form_tag fiona7_login_path, role: 'form' do %>
5
11
  <div class="form-group">
6
12
  <%= label_tag :login, t(:"fiona7.login_field") %>
@@ -1,3 +1,3 @@
1
1
  module Fiona7
2
- VERSION = "1.2.0.2.1"
2
+ VERSION = "1.2.0.2.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: infopark_fiona7
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0.2.1
4
+ version: 1.2.0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tomasz Przedmojski
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-04-07 00:00:00.000000000 Z
11
+ date: 2017-05-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails