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
This commit is contained in:
Rajat Talesra 2022-12-20 11:49:22 +05:30 committed by GitHub
parent bec8283399
commit 51a86ae836
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 20 additions and 22 deletions

View file

@ -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">
<div class="alert alert-warning">
<div class="crayons-notice crayons-notice--warning mb-4">
<strong>Note: If you remove a badge that is automatically rewarded it will simply be re-awarded despite being removed.</strong>
</div>

View file

@ -1,9 +1,7 @@
<%= form_tag(admin_organizations_path, method: "get") do %>
<div class="form-row">
<div class="form-group">
<%= text_field_tag(:search, params[:search], aria: { label: "Search" }) %>
<%= submit_tag("Search") %>
</div>
<div class="inline-flex">
<%= search_field_tag(:search, params[:search], aria: { label: "Search" }, class: "crayons-textfield") %>
<%= submit_tag("Search", class: "crayons-btn ml-2") %>
</div>
<% end %>

View file

@ -5,7 +5,7 @@
</div>
<div class="ml-auto">
<%= 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" %>
</div>
</header>
@ -38,22 +38,22 @@
<div class="crayons-card p-6 mb-6">
<% current_credits = @organization.unspent_credits_count %>
<h3 class="mb-4">Credits (current: <%= current_credits %>)</h3>
<%= form_tag update_org_credits_admin_organization_path(@organization), method: :patch, class: "form-inline justify-content-between mb-2" do %>
<div class="form-group">
<%= form_tag update_org_credits_admin_organization_path(@organization), method: :patch, class: "flex justify-content-between mb-2" do %>
<div>
<%= 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" } %>
</div>
<%= 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 %>
<div class="form-group">
<%= form_tag update_org_credits_admin_organization_path(@organization), method: :patch, class: "flex justify-content-between mb-2" do %>
<div>
<%= 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" } %>
</div>
<%= submit_tag "Remove Org Credits", class: "btn btn-danger" %>
<%= submit_tag "Remove Org Credits", class: "crayons-btn crayons-btn--danger" %>
<% end %>
<% end %>
</div>

View file

@ -29,7 +29,7 @@
<% if @podcast.owners.present? %>
<ul class="list-group list-group-flush mb-3">
<% @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| %>
<li class="list-group-item w-100">
<%= link_to "@#{owner.username}", user_url(owner), target: "_blank", rel: :noopener %>
<%# f.hidden_field :user_id, value: owner.id %>

View file

@ -1,7 +1,7 @@
<%= form_tag(admin_podcasts_path, method: "get", class: "mb-6") do %>
<div class="form-group">
<%= text_field_tag(:search, params[:search], aria: { label: "Search" }) %>
<%= submit_tag("Search") %>
<%= form_tag(admin_podcasts_path, method: "get") do %>
<div class="inline-flex">
<%= text_field_tag(:search, params[:search], aria: { label: "Search" }, class: "crayons-textfield") %>
<%= submit_tag("Search", class: "crayons-btn ml-2") %>
</div>
<% end %>