Skip to content
This repository has been archived by the owner on Mar 12, 2020. It is now read-only.

Commit

Permalink
replace modal with danger zone text
Browse files Browse the repository at this point in the history
  • Loading branch information
tarebyte committed Aug 23, 2015
1 parent 2f2e40c commit 826a990
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 129 deletions.
81 changes: 0 additions & 81 deletions app/assets/stylesheets/components/modal.scss

This file was deleted.

6 changes: 6 additions & 0 deletions app/assets/stylesheets/layout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -176,3 +176,9 @@ a {
hr {
border-bottom: 1px solid #e3e3e3;
}

.dangerzone-container {
border: 1px solid #e3e3e3;
border-radius: 3px;
padding-bottom: 13px;
}
28 changes: 0 additions & 28 deletions app/views/organizations/_remove_organization_modal.html.erb

This file was deleted.

51 changes: 31 additions & 20 deletions app/views/organizations/edit.html.erb
Original file line number Diff line number Diff line change
@@ -1,26 +1,37 @@
<h1 class="page-header">Edit Organization</h1>
<div class="columns">
<div class="one-half column centered">
<%= form_for @organization do |f| %>
<%= render 'shared/error_messages', object: f.object %>
<%= render 'organizations/organization_banner' %>

<dl class="form">
<dt><%= f.label :title, class: 'input-label' %></dt>
<dd><%= f.text_field :title, class: 'textfield' %></dd>
</dl>
<div class="site-content">
<div class="site-content-cap">
<h2 class="site-content-heading"><%= @organization.title %> settings</h2>
</div>
</div>

<div class="form-actions left">
<%= link_to 'Cancel', @organization, class: 'btn', role: 'button' %>
<%= f.submit 'Update Organization', class: 'btn btn-primary' %>
<div class="site-content-body">
<%= form_for @organization do |f| %>
<%= render 'shared/error_messages', object: f.object %>

<div class="columns">
<div class="two-thirds column">
<dl class="form">
<dt><%= f.label :title %></dt>
<dd><%= f.text_field :title, class: 'textfield' %></dd>
</dl>
</div>
<% end %>

<!-- I promise I'll come and style this later -->
<br><br><br><br>
<!-- -->
<div class="one-third column dangerzone-container">
<p class="text-emphasized">Remove this organization</p>
<p class="text-muted">Once you remove this organization, there is not going back. Please be certain.</p>
<p class="text-muted">Everything you have created, and every student that you have invited will also be removed from your organization on github.com</p>

<%= link_to 'Remove Organization', '#delete-organization', class: 'btn btn-danger', role: 'button' %>
</div>
</div>
<%= form_for @organization, html: { method: :delete } do |f| %>
<%= f.submit 'Remove this organization', class: 'btn btn-block btn-danger' %>
<% end %>
</div>
</div>

<%= render partial: 'remove_organization_modal', locals: { modal_id: 'delete-organization' } %>
<div class="form-actions">
<%= f.submit 'Save changes', class: 'btn btn-green' %>
<%= link_to 'Cancel', @organization, class: 'btn', role: 'button' %>
</div>
<% end %>
</div>

0 comments on commit 826a990

Please sign in to comment.