Update/fix org settings (#992)

* Update/fix org settings

* Small adjustment to an unrelated rake task

* Update app/views/users/_org_non_member.html.erb
This commit is contained in:
Ben Halpern 2018-10-23 17:21:17 -04:00 committed by GitHub
parent 7bbaf5f4dc
commit d5ceff4b12
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 31 additions and 24 deletions

View file

@ -207,7 +207,7 @@
}
}
}
button {
button.big-action {
width: 130px;
padding: 3px 0px;
font-size: 1.2em;

View file

@ -164,8 +164,8 @@
.primary-sticky-nav-org-cta-link-domain-small{
display: block;
padding-top: 2px;
font-size:0.8em;
color: darken($light-medium-gray, 4%);
font-size:0.75em;
color: darken($light-medium-gray, 7%);
font-family: $monospace;
}
&:hover {

View file

@ -35,14 +35,14 @@
<br>
<%= form_tag "/users/remove_association", method: :delete, onsubmit: "return confirm('Are you absolutely sure you want to remove your Twitter account?');" do %>
<%= hidden_field_tag :provider, "twitter" %>
<button class="danger-button small-button" type="submit">
<button class="big-action danger-button small-button" type="submit">
<img src="<%= asset_path('twitter-logo.svg') %>" /> REMOVE TWITTER
</button>
<% end %>
<span style="margin-left: 124px;">OR</span>
<br/>
<%= form_tag "/users/remove_association", method: :delete, onsubmit: "return confirm('Are you absolutely sure you want to remove your GitHub account?');" do %>
<%= hidden_field_tag :provider, "github" %>
<button class="danger-button small-button" type="submit">
<button class="big-action danger-button small-button" type="submit">
<img src="<%= asset_path('github-logo.svg') %>" /> REMOVE GITHUB
</button>
<% end %>
@ -70,7 +70,7 @@
<div class="field">
<input type="text" id="delete__account__verification__field">
</div>
<button class="danger-button small-button" id="delete__account__btn" type="submit" disabled="true">
<button class="big-action danger-button small-button" id="delete__account__btn" type="submit" disabled="true">
DELETE ACCOUNT
</button>
<% end %>

View file

@ -41,7 +41,13 @@
</div>
<% end %>
<h3>Grow the team</h3>
<h5>Invite teammates by sending them this secret. Keep the code secret and generate a new one regularly.</h5>
<h5>Invite teammates by sending them the secret and the following instructions:</h5>
<ol style="margin-bottom: 30px">
<li>Sign up at <a href="https://dev.to">https://dev.to</a>
<li>Navigate to <a href="https://dev.to/settings/organization">https://dev.to/settings/organization</a>
<li>Paste the secret code below and click <b>Join Organization</b></li>
</ol>
<h5>Your secret: (You should rotate this regularly)</h5>
<input type="text" class="settings-org-secret" id="settings-org-secret" value="<%= @organization.secret %>" readonly>
<%= form_tag "/organizations/generate_new_secret", onsubmit: "return confirm('Are you sure you want to generate a new secret? All outstanding secrets will be invalid.');" do %>
<button class="settings-generate-new-secret">Generate New Secret</button>
@ -112,21 +118,20 @@
<%= f.label :tech_stack, "Our Stack" %>
<%= f.text_area :tech_stack, maxlength: 640, placeholder: "Limit of 640 characters" %>
</div>
<% if @organization.approved %>
<h2>Post Call-to-action box</h2>
<div class="field">
<%= f.label "CTA Link Text" %>
<%= f.text_field :cta_button_text, maxlength: 12, placeholder: "Limit of 12 characters" %>
</div>
<div class="field">
<%= f.label "CTA Link URL" %>
<%= f.text_field :cta_button_url %>
</div>
<div class="field">
<%= f.label "Body text (markdown inline only)" %>
<%= f.text_area :cta_body_markdown, maxlength: 256, placeholder: "Limit of 256 characters" %>
</div>
<% end %>
<h2>Call-to-action box</h2>
<h4 style="margin-top:-25px">Customizable text that appears next to every post for your organization</h4>
<div class="field">
<%= f.label "Body text (markdown inline only)" %>
<%= f.text_area :cta_body_markdown, maxlength: 256, placeholder: "Limit of 256 characters" %>
</div>
<div class="field">
<%= f.label "CTA Link Text" %>
<%= f.text_field :cta_button_text, maxlength: 12, placeholder: "Limit of 12 characters" %>
</div>
<div class="field">
<%= f.label "CTA Link URL" %>
<%= f.text_field :cta_button_url %>
</div>
<div class="field">
<label></label>
<%= f.submit "SUBMIT", class: "cta" %>

View file

@ -1,5 +1,7 @@
<script src="https://cdnjs.cloudflare.com/ajax/libs/jscolor/2.0.4/jscolor.min.js" async="async"></script>
<h3>Join An Organization</h3>
<h5>Do you have the secret code?</h5>
<%= form_tag "/users/join_org" do %>
<div class="field">
<%= label_tag :org_secret, "Secret" %>

View file

@ -96,7 +96,7 @@ task remove_old_html_variant_data: :environment do
HtmlVariantTrial.where("created_at < ?", 1.week.ago).destroy_all
HtmlVariantSuccess.where("created_at < ?", 1.week.ago).destroy_all
HtmlVariant.find_each do |html_variant|
return if html_variant.html_variant_successes.size < 20
return if html_variant.html_variant_successes.size < 12
html_variant.calculate_success_rate!
end
end