GRN-69: Fixed javascript bug related to room validation (#388)

* Fixed javascript bug related to room validation

* More javascript bugs

* Removed room name length error

* Fixed issue with room post url
This commit is contained in:
farhatahmad
2019-03-05 15:07:14 -05:00
committed by Jesus Federico
parent 37af17fae1
commit ef8fc2c0e4
4 changed files with 29 additions and 31 deletions

View File

@ -57,7 +57,7 @@
</label>
<% end %>
<label id="auto-join-label" class="create-only custom-switch mt-3 mb-3 w-100 text-left d-inline-block">
<label id="auto-join-label" class="create-only custom-switch pl-0 mt-3 mb-3 w-100 text-left d-inline-block">
<span class="custom-switch-description"><%= t("modal.create_room.auto_join") %></span>
<%= f.check_box :auto_join, class: "custom-switch-input", checked: false %>
<span class="custom-switch-indicator float-right"></span>
@ -76,15 +76,3 @@
</div>
</div>
</div>
<script>
// Handle validation messages client-side because
// form is served in modal, and they are minimal.
var roomCreateValidations = function(){
if($('#room-name').val().length == 0){
$('#room-name').addClass("is-invalid");
}
}
$('#create-room-submit').on('click', roomCreateValidations);
</script>