[bbb-greenlight: 26/39] Improvements to create room modal (#2152)




commit 56be1ad2aeb27f519b992756145e235b90fa8b9e
Author: Ahmad Farhat <ahmad af farhat gmail com>
Date:   Fri Oct 2 14:23:31 2020 -0400

    Improvements to create room modal (#2152)

 app/assets/stylesheets/rooms.scss                   |  4 ++++
 app/views/shared/modals/_create_room_modal.html.erb | 10 +++++++---
 2 files changed, 11 insertions(+), 3 deletions(-)
---
diff --git a/app/assets/stylesheets/rooms.scss b/app/assets/stylesheets/rooms.scss
index 1662785..da15ed4 100644
--- a/app/assets/stylesheets/rooms.scss
+++ b/app/assets/stylesheets/rooms.scss
@@ -121,4 +121,8 @@
 
 #room-owner-name {
   line-height: 12px;
+}
+
+.create-room-button {
+  width: 49%;
 }
\ No newline at end of file
diff --git a/app/views/shared/modals/_create_room_modal.html.erb 
b/app/views/shared/modals/_create_room_modal.html.erb
index 255ff57..cab6f6b 100644
--- a/app/views/shared/modals/_create_room_modal.html.erb
+++ b/app/views/shared/modals/_create_room_modal.html.erb
@@ -28,7 +28,7 @@
               <span class="input-icon-addon">
                 <i class="fas fa-chalkboard-teacher"></i>
               </span>
-              <%= f.text_field :name, id: "create-room-name", class: "form-control text-center", value: "", 
placeholder: t("modal.create_room.name_placeholder"), autocomplete: :off %>
+              <%= f.text_field :name, id: "create-room-name", class: "form-control text-center", value: "", 
placeholder: t("modal.create_room.name_placeholder"), autocomplete: :off, required: true %>
               <div class="invalid-feedback text-left"><%= t("modal.create_room.not_blank") %></div>
             </div>
 
@@ -91,8 +91,12 @@
               <span class="custom-switch-indicator float-right cursor-pointer"></span>
             </label>
           <div class="mt-4">
-            <%= f.submit t("modal.create_room.create"), class: "create-only btn btn-primary btn-block" %>
-            <%= f.submit t("modal.room_settings.update"), class: "update-only btn btn-primary btn-block" %>
+            <%= f.submit t("modal.create_room.create"), class: "create-only btn btn-primary 
create-room-button" %>
+            <%= f.submit t("modal.room_settings.update"), class: "update-only btn btn-primary 
create-room-button" %>
+
+            <button type="button" class="btn btn-secondary create-room-button" data-dismiss="modal">
+              <%= t("cancel") %>
+            </button>
           </div>
           <% end %>
         </div>


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]