From 51a86ae836116ea2f909997af7fe09090fc94564 Mon Sep 17 00:00:00 2001 From: Rajat Talesra Date: Tue, 20 Dec 2022 11:49:22 +0530 Subject: [PATCH] Remove bootstrap from admin/badge_achievements, admin/organizations and admin/podcasts (#18877) * Removed bootstrap from admin/badge_achievements and admin/organizations * Removed bootstrap from admin/podcasts --- .../admin/badge_achievements/index.html.erb | 2 +- app/views/admin/organizations/index.html.erb | 8 +++---- app/views/admin/organizations/show.html.erb | 22 +++++++++---------- app/views/admin/podcasts/edit.html.erb | 2 +- app/views/admin/podcasts/index.html.erb | 8 +++---- 5 files changed, 20 insertions(+), 22 deletions(-) diff --git a/app/views/admin/badge_achievements/index.html.erb b/app/views/admin/badge_achievements/index.html.erb index 56d3ecdcd..f48715557 100644 --- a/app/views/admin/badge_achievements/index.html.erb +++ b/app/views/admin/badge_achievements/index.html.erb @@ -4,7 +4,7 @@ data-confirmation-modal-content-selector-value="#confirmation-modal" data-confirmation-modal-title-value="Confirm changes" data-confirmation-modal-size-value="m"> -
+
Note: If you remove a badge that is automatically rewarded it will simply be re-awarded despite being removed.
diff --git a/app/views/admin/organizations/index.html.erb b/app/views/admin/organizations/index.html.erb index 2f698b769..e4b2cb2e4 100644 --- a/app/views/admin/organizations/index.html.erb +++ b/app/views/admin/organizations/index.html.erb @@ -1,9 +1,7 @@ <%= form_tag(admin_organizations_path, method: "get") do %> -
-
- <%= text_field_tag(:search, params[:search], aria: { label: "Search" }) %> - <%= submit_tag("Search") %> -
+
+ <%= search_field_tag(:search, params[:search], aria: { label: "Search" }, class: "crayons-textfield") %> + <%= submit_tag("Search", class: "crayons-btn ml-2") %>
<% end %> diff --git a/app/views/admin/organizations/show.html.erb b/app/views/admin/organizations/show.html.erb index eb51f7882..d16d3bfb4 100644 --- a/app/views/admin/organizations/show.html.erb +++ b/app/views/admin/organizations/show.html.erb @@ -5,7 +5,7 @@
- <%= link_to "View @#{@organization.name}", "/#{@organization.slug}", class: "btn btn-primary", target: "_blank", rel: "noopener" %> + <%= link_to "View @#{@organization.name}", "/#{@organization.slug}", class: "crayons-btn", target: "_blank", rel: "noopener" %>
@@ -38,22 +38,22 @@
<% current_credits = @organization.unspent_credits_count %>

Credits (current: <%= current_credits %>)

- <%= form_tag update_org_credits_admin_organization_path(@organization), method: :patch, class: "form-inline justify-content-between mb-2" do %> -
+ <%= form_tag update_org_credits_admin_organization_path(@organization), method: :patch, class: "flex justify-content-between mb-2" do %> +
<%= hidden_field_tag :credit_action, :add %> - <%= number_field_tag :credits, nil, in: 1...100_000, required: true, class: "form-control mr-3", size: 5, aria: { label: "Credits" } %> - <%= text_field_tag :note, "", placeholder: "Why are you adding these credits?", size: 50, required: true, class: "form-control mr-3", aria: { label: "Reason" } %> + <%= number_field_tag :credits, nil, in: 1...100_000, required: true, class: "crayons-textfield w-auto mr-3", size: 5, aria: { label: "Credits" } %> + <%= text_field_tag :note, "", placeholder: "Why are you adding these credits?", size: 50, required: true, class: "crayons-textfield w-auto mr-3", aria: { label: "Reason" } %>
- <%= submit_tag "Add Org Credits", class: "btn btn-primary" %> + <%= submit_tag "Add Org Credits", class: "crayons-btn" %> <% end %> <% if current_credits.positive? %> - <%= form_tag update_org_credits_admin_organization_path(@organization), method: :patch, class: "form-inline justify-content-between mb-2" do %> -
+ <%= form_tag update_org_credits_admin_organization_path(@organization), method: :patch, class: "flex justify-content-between mb-2" do %> +
<%= hidden_field_tag :credit_action, :remove %> - <%= number_field_tag :credits, nil, in: 1..current_credits, required: true, class: "form-control mr-3", size: 5, aria: { label: "Credits" } %> - <%= text_field_tag :note, "", placeholder: "Why are you removing these credits?", size: 50, required: true, class: "form-control mr-3", aria: { label: "Reason" } %> + <%= number_field_tag :credits, nil, in: 1..current_credits, required: true, class: "crayons-textfield w-auto mr-3", size: 5, aria: { label: "Credits" } %> + <%= text_field_tag :note, "", placeholder: "Why are you removing these credits?", size: 50, required: true, class: "crayons-textfield w-auto mr-3", aria: { label: "Reason" } %>
- <%= submit_tag "Remove Org Credits", class: "btn btn-danger" %> + <%= submit_tag "Remove Org Credits", class: "crayons-btn crayons-btn--danger" %> <% end %> <% end %>
diff --git a/app/views/admin/podcasts/edit.html.erb b/app/views/admin/podcasts/edit.html.erb index 6ff27db71..a955d5bbf 100644 --- a/app/views/admin/podcasts/edit.html.erb +++ b/app/views/admin/podcasts/edit.html.erb @@ -29,7 +29,7 @@ <% if @podcast.owners.present? %>
    <% @podcast.owners.select(:id, :username).each do |owner| %> - <%= form_for @podcast, url: "#", html: { method: :delete, class: "form-inline" } do |f| %> + <%= form_for @podcast, url: "#", html: { method: :delete, class: "flex" } do |f| %>
  • <%= link_to "@#{owner.username}", user_url(owner), target: "_blank", rel: :noopener %> <%# f.hidden_field :user_id, value: owner.id %> diff --git a/app/views/admin/podcasts/index.html.erb b/app/views/admin/podcasts/index.html.erb index ba951a940..dfe7f224f 100644 --- a/app/views/admin/podcasts/index.html.erb +++ b/app/views/admin/podcasts/index.html.erb @@ -1,7 +1,7 @@ -<%= form_tag(admin_podcasts_path, method: "get", class: "mb-6") do %> -
    - <%= text_field_tag(:search, params[:search], aria: { label: "Search" }) %> - <%= submit_tag("Search") %> +<%= form_tag(admin_podcasts_path, method: "get") do %> +
    + <%= text_field_tag(:search, params[:search], aria: { label: "Search" }, class: "crayons-textfield") %> + <%= submit_tag("Search", class: "crayons-btn ml-2") %>
    <% end %>