Skip to content

Commit

Permalink
Re Inclusão de captcha e correções
Browse files Browse the repository at this point in the history
  • Loading branch information
thiagourias committed Feb 26, 2019
1 parent 09aaa26 commit 9a92f2e
Show file tree
Hide file tree
Showing 13 changed files with 84 additions and 23 deletions.
Empty file added Booting
Empty file.
Empty file added Rails
Empty file.
Empty file added Run
Empty file.
Binary file added app/assets/images/favicon_ilb.ico
Binary file not shown.
Empty file.
65 changes: 61 additions & 4 deletions app/assets/stylesheets/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,18 @@
.tamanhoCard{
width: 100% !important;
}
.tamanhoCardSign{
width: 100% !important;
}
.classPaddingVoltar{
width: 100% !important;
}
.classPaddingConcluir{
width: 100% !important;
}
.propertiesDivCaptcha{
margin-bottom: -5% !important;
}

}

Expand All @@ -14,7 +26,18 @@
.tamanhoCard{
width: 100% !important;
}

.tamanhoCardSign{
width: 100% !important;
}
.classPaddingVoltar{
width: 100% !important;
}
.classPaddingConcluir{
width: 100% !important;
}
.propertiesDivCaptcha{
margin-bottom: -3% !important;
}
}

@media screen and
Expand All @@ -23,7 +46,12 @@
.tamanhoCard{
width: 80% !important;
}

.tamanhoCardSign{
width: 80% !important;
}
.propertiesDivCaptcha{
margin-bottom: -3% !important;
}
}

@media screen and
Expand All @@ -33,6 +61,12 @@
.tamanhoCard{
width: 80% !important;
}
.tamanhoCardSign{
width: 80% !important;
}
.propertiesDivCaptcha{
margin-bottom: -3% !important;
}
}

@media screen and
Expand All @@ -41,7 +75,12 @@
.tamanhoCard{
width: 70% !important;
}

.tamanhoCardSign{
width: 70% !important;
}
.propertiesDivCaptcha{
margin-bottom: -2% !important;
}
}

@media screen and
Expand Down Expand Up @@ -488,5 +527,23 @@ form[role=login] > div {
.cardSize{
width: 50%;
}
.classPaddingVoltar{
padding-left: 1%;
padding-right: 2px;
padding-top: 1%;
width: 50%;


}
.classPaddingConcluir{
padding-right: 1%;
padding-left: 2px;
padding-top: 1%;
width: 50%;
}
.propertiesDivCaptcha{
width: 100%;
text-align: center;
margin-top: 3%;
margin-left: 1%;
margin-bottom: -2%;
}
4 changes: 2 additions & 2 deletions app/controllers/users_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def create #isso precisa ser alterado, se já existir cadastro deve entrar pela



if verify_recaptcha && existent_user.present?
if existent_user.present?



Expand All @@ -31,7 +31,7 @@ def create #isso precisa ser alterado, se já existir cadastro deve entrar pela
else
redirect_to log_in_path(social: true)
end
else
elsif verify_recaptcha
conseguiu = @user.save
end
if conseguiu
Expand Down
4 changes: 1 addition & 3 deletions app/views/layouts/application.html.erb
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
<!DOCTYPE html>

<html>

<head>
<title>EscolamodeloWs</title>
<%= csrf_meta_tags %>
Expand All @@ -18,7 +16,7 @@
</head>

<body>
<nav class="navbar navbar-expand-lg navbar-light bg-light">
<nav class="navbar navbar-expand-lg navbar-light bg-light" style="height: 50px; position: fixed; width: 100%; z-index: 9999;">
<a class="navbar-brand" href="#">EVL</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
Expand Down
5 changes: 5 additions & 0 deletions app/views/sessions/new.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -74,3 +74,8 @@
</div>
</header>
<% end %>
<style>
.waves-input-wrapper{
display: block !important;
}
</style>
17 changes: 8 additions & 9 deletions app/views/users/_form.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@


<header class="business-header bg-signin">
<div class="container">
<div class="container" style="margin-top: 40px;">
<div class="row">
<div class="col-lg-12 text-center align">
<div>
Expand Down Expand Up @@ -73,17 +73,16 @@
<div class="pwstrength_viewport_progress"></div>
</div>

<div class="propertiesDivCaptcha">
<div class="g-recaptcha" data-theme="light" data-sitekey="6Lc4HZQUAAAAAFl32T78y4ijpR8tvEEDb-0AABOL" style="transform:scale(0.77);-webkit-transform:scale(0.77);transform-origin:0 0;-webkit-transform-origin:0 0;"></div>
</div>
<div class="card-body row" style="margin: 0px !important; padding: 0px !important;">




<div class="g-recaptcha" data-sitekey="6LeuTJIUAAAAAABrepBzg2kjJx7j1Rerq7sgSTl7"></div>

<div class="card-body row" style="margin: 0px !important;">
<div class="half" style="padding: 1%">
<div class="classPaddingVoltar" style="padding: 1%;">
<%= link_to 'Voltar', :back, class: "btn btn-primary btn-block block" %>
</div>
<div class="half" style="padding: 1%">

<div class="classPaddingConcluir" style="padding: 1%;">
<button type="submit" name="action" type="button" class="btn btn-success btn-block block">Concluir</button>
</div>
</div>
Expand Down
8 changes: 5 additions & 3 deletions app/views/users/show.html.erb
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@

<p><%= current_user.first_name %> <%= current_user.last_name %></p>
<p><%= current_user.email %></p>
<% if current_user.api_access.api_access_level_id > 2 %>
<p>Minha chave: <%= current_user.api_access.key %></p>
<% end %>

<%# if current_user.api_access.api_access_level_id > 2 %>
<!-- <p>Minha chave: <%#= current_user.api_access.key %></p>-->
<%# end %>
<%= link_to 'Atualizar Perfil', edit_user_path(current_user) %>
<br>
<%= link_to 'Apagar conta', user_path(current_user.id), method: 'delete',
Expand Down
4 changes: 2 additions & 2 deletions config/initializers/recaptcha.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Recaptcha.configure do |config|
config.site_key = '6LeuTJIUAAAAAABrepBzg2kjJx7j1Rerq7sgSTl7'
config.secret_key = '6LeuTJIUAAAAAMIxqnsTXL1SWywMUzcRBNKlLS9T'
config.site_key = '6Lc4HZQUAAAAAFl32T78y4ijpR8tvEEDb-0AABOL'
config.secret_key = '6Lc4HZQUAAAAAMqN3qnRrxQ1ONQW6Kb9qlrQcxnR'
end
Empty file added config/secrets.yml
Empty file.

0 comments on commit 9a92f2e

Please sign in to comment.