Skip to content
Snippets Groups Projects
Commit e627ea51 authored by Mauricio Giacomini Girardello's avatar Mauricio Giacomini Girardello
Browse files

adding users new view and form

parent 3bbd0177
No related branches found
No related tags found
No related merge requests found
module Management::UsersHelper
end
\ No newline at end of file
<body>
<div>
<%= form_for([:management, @user], html: {class: 'ls-form row'}) do |f| %>
<%= form_tag( :action => "create", method: "post") do %>
<div>
<%= label_tag :name, "Nome" %><br><br>
<%= text_field_tag :name,'', placeholder: "nome completo" %>
</div>
<% if @user.errors.any? %>
<div class="ls-alert-danger">
<h2><%= pluralize(@user.errors.count, "erro") %> <%= "happened".pluralize(@user.errors.count) %>:</h2>
<ul>
<% @user.errors.full_messages.each do |message| %>
<li><%= message %></li>
<% end %>
</ul>
</div>
<% end %>
<div>
<%= label_tag :email, "E-mail " %><br><br>
<%= email_field_tag :email, '', placeholder: "e-mail" %>
<%= submit_tag "Salvar", class: "ls-btn" %>
</div>
<fieldset>
<label class="ls-label col-md-3">
<b class="ls-label-text">Nome</b>
<div>
<%= label_tag :state, "Estado " %><br><br>
<%= text_field_tag :state, '', placeholder: "" %>
<%= submit_tag "Salvar", class: "ls-btn" %>
</div>
<p>Digite o nome completo</p>
<%= f.text_field :name, {required: true} %>
</label>
<label class="ls-label col-md-5">
<b class="ls-label-text">E-mail</b>
<div>
<%= label_tag :password, "Senha " %><br><br>
<%= password_field_tag :password, '', placeholder: "senha" %>
<%= submit_tag "Salvar", class: "ls-btn" %>
</div>
<p>Um e-email válido, pois será utilizado para validar a conta</p>
<%= f.email_field :email, {required: true} %>
</label>
</fieldset>
<hr>
<fieldset>
<label class="ls-label col-md-4">
<b class="ls-label-text">Senha</b>
<div class="ls-prefix-group">
<%= f.password_field :password, {required: true, minlenght: 6, id: 'pass'} %>
<a class="ls-label-text-prefix ls-toggle-pass ls-ico-eye" data-toggle-class="ls-ico-eye, ls-ico-eye-blocked" data-target="#pass" href="#"></a>
</div>
</label>
</fieldset>
<hr>
<fieldset>
<div class="ls-label col-md-5">
<p>Selecione as responsabilidades do usuário:</p>
<%= f.collection_check_boxes :role_ids, @roles, :id, :name %>
</div>
</fieldset>
<div>
<%= label_tag :confirm_password, "Confirmação da Senha " %><br><br>
<%= password_field_tag :confirm_password, '', placeholder: "confirme sua senha" %>
<%= submit_tag "Salvar", class: "ls-btn" %>
<div class="ls-actions-btn">
<button class="ls-btn">Salvar</button>
<button class="ls-btn-danger">Cancelar</button>
</div>
<% end %>
</div>
</body>
<% end %>
\ No newline at end of file
<h1 class="ls-title-intro ls-ico-users">Usuários</h1>
<ol class="ls-breadcrumb">
<li><a href="#">Usuários</a></li>
<li>Novo usuário</li>
</ol>
<%= render 'form' %>
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment