forked from External/greenlight
redo rooms page
This commit is contained in:
@ -13,15 +13,14 @@
|
||||
<span class="input-icon-addon">
|
||||
<i class="fas fa-chalkboard-teacher"></i>
|
||||
</span>
|
||||
<%= f.text_field :name, class: "form-control", placeholder: "Enter a room name...", autocomplete: :off %>
|
||||
</div>
|
||||
<%= f.text_field :name, id: "room-name", class: "form-control", placeholder: "Enter a room name...", autocomplete: :off %> </div>
|
||||
<label class="custom-switch mt-5 mb-5 float-left">
|
||||
<%= f.check_box :auto_join, class: "custom-switch-input", checked: true %>
|
||||
<span class="custom-switch-indicator"></span>
|
||||
<span class="custom-switch-description">Automatically join me into the room when created.</span>
|
||||
<span class="custom-switch-description">Automatically join me into the room.</span>
|
||||
</label>
|
||||
<div class="form-footer">
|
||||
<%= f.submit "Create Room", class: "btn btn-outline-primary btn-block btn-pill" %>
|
||||
<%= f.submit "Create Room", id: "create-room-submit", class: "btn btn-outline-primary btn-block btn-pill" %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
@ -32,3 +31,15 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
|
||||
var roomCreateValidations = function(){
|
||||
if($('#room-name').val().length == 0){
|
||||
$('#room-name').addClass("is-invalid");
|
||||
}
|
||||
}
|
||||
|
||||
$('#create-room-submit').on('click', roomCreateValidations);
|
||||
|
||||
</script>
|
||||
|
@ -35,11 +35,7 @@
|
||||
<button type="submit" class="btn btn-outline-primary btn-block btn-pill">Login</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-footer">
|
||||
<%= link_to "Don't have an account, sign up!", "google.com" %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
38
app/views/shared/modals/_signup_modal.html.erb
Normal file
38
app/views/shared/modals/_signup_modal.html.erb
Normal file
@ -0,0 +1,38 @@
|
||||
<div class="modal fade" id="signupModal" tabindex="-1" role="dialog">
|
||||
<div class="modal-dialog modal-dialog-centered" role="document">
|
||||
<div class="modal-content text-center">
|
||||
<div class="modal-body">
|
||||
<div class="card-body p-6">
|
||||
<div class="card-title text-primary">
|
||||
<h3>Signup</h3>
|
||||
</div>
|
||||
|
||||
<hr class="small-rule">
|
||||
|
||||
<%= form_for(@user, url: signup_path) do |f| %>
|
||||
<div class="form-group">
|
||||
<%= f.label :name, "Full Name", class: "form-label text-left" %>
|
||||
<%= f.text_field :name, class: "form-control", placeholder: "Full Name" %>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<%= f.label :email, "Email", class: "form-label text-left" %>
|
||||
<%= f.text_field :email, class: "form-control", placeholder: "Email" %>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<%= f.label :password, "Password", class: "form-label text-left" %>
|
||||
<%= f.password_field :password, class: "form-control", placeholder: "Password" %>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<%= f.label :password, "Password Confirmation", class: "form-label text-left" %>
|
||||
<%= f.password_field :password, class: "form-control", placeholder: "Password Confirmation" %>
|
||||
</div>
|
||||
|
||||
<div class="form-footer">
|
||||
<%= f.submit "Signup", class: "btn btn-outline-primary btn-block btn-pill" %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
Reference in New Issue
Block a user