<%= javascript_packs_with_chunks_tag "colorPreview", "clipboardCopy", defer: true %> <%= render "shared/webcomponents_loader_script" %>

Organization Members

<% @org_organization_memberships.each do |org_membership| %>

<%= org_membership.user.name %> <% if org_membership.user == @user %> You <% end %> <% if org_membership.type_of_user == "admin" %> Admin <% end %>

<% if org_membership.user == @user && org_membership.type_of_user == "admin" %> <% elsif org_membership.user != @user && org_membership.type_of_user == "admin" %> <%= form_tag "/users/remove_org_admin", onsubmit: "return confirm('Are you sure you want to take away admin status from #{org_membership.user.name}?');" do %> <%= hidden_field_tag "user_id", org_membership.user_id %> <%= hidden_field_tag "organization_id", @organization.id %> <% end %> <% else %> <%= form_tag "/users/add_org_admin", onsubmit: "return confirm('Are you sure you want to give #{org_membership.user.name} admin status?');" do %> <%= hidden_field_tag "user_id", org_membership.user_id %> <%= hidden_field_tag "organization_id", @organization.id %> <% end %> <%= form_tag "/users/remove_from_org", onsubmit: "return confirm('Are you sure you want remove #{org_membership.user.name} from the organization?');" do %> <%= hidden_field_tag "user_id", org_membership.user_id %> <%= hidden_field_tag "organization_id", @organization.id %> <% end %> <% end %>
<% end %>

Grow the team

Invite teammates by sending them the secret and the following instructions:

  1. Sign up at <%= app_url %>
  2. Navigate to <%= app_url(user_settings_path(:organization)) %>
  3. Paste the secret code below and click Join Organization

Your secret code is: <%= inline_svg_tag("copy.svg", aria: true, class: "crayons-icon", title: "Copy to clipboard") %>

<%= 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 %> <%= hidden_field_tag "organization[id]", @organization.id %> <% end %>

You should rotate this regularly!

Organization details

<%= form_for @organization, html: { class: "grid gap-6" } do |f| %> <%= f.hidden_field :id %>
<%= f.label :name, class: "crayons-field__label" %> <%= f.text_field :name, maxlength: 50, class: "crayons-textfield", placeholder: "Acme Inc." %>
<%= f.label :slug, "Username", class: "crayons-field__label" %> <%= f.text_field :slug, maxlength: 18, minlength: 2, class: "crayons-textfield", placeholder: "acmeinc" %>

Your organization's URL is: <%= app_url(@organization.slug) %>

<%= f.label :profile_image, "Profile image *", class: "crayons-field__label" %>
<%= f.file_field :profile_image, accept: "image/*", class: "crayons-card crayons-card--secondary p-3 flex items-center flex-1 w-100" %>
<%= f.label :nav_image, "Logo for light themes", class: "crayons-field__label" %>
<% if @organization.nav_image_url.present? %> <%= @organization.name %> profile image <% end %> <%= f.file_field :nav_image, accept: "image/*", class: "crayons-card crayons-card--secondary p-3 flex items-center flex-1 w-100" %>
<%= f.label :dark_nav_image, "Logo for dark themes", class: "crayons-field__label" %>
<% if @organization.dark_nav_image_url.present? %> <%= @organization.name %> profile image <% end %> <%= f.file_field :dark_nav_image, accept: "image/*", class: "crayons-card crayons-card--secondary p-3 flex items-center flex-1 w-100" %>
<%= f.label :twitter_username, "Twitter username", class: "crayons-field__label" %> <%= f.text_field :twitter_username, class: "crayons-textfield" %>
<%= f.label :github_username, "GitHub username", class: "crayons-field__label" %> <%= f.text_field :github_username, class: "crayons-textfield" %>
<%= f.label :url, "Website url", class: "crayons-field__label" %> <%= f.url_field :url, maxlength: 128, placeholder: "https://yoursite.com", class: "crayons-textfield" %>
<%= f.label :tag_line, class: "crayons-field__label" %> <%= f.text_field :tag_line, maxlength: 60, class: "crayons-textfield" %>

Limit of 60 characters

<%= f.label :summary, class: "crayons-field__label" %> <%= f.text_area :summary, maxlength: 250, class: "crayons-textfield" %>

Limit of 250 characters

<%= render partial: "shared/logo_design", locals: { f: f, account: @organization_membership.organization } %>
<%= f.label :location, class: "crayons-field__label" %> <%= f.text_field :location, maxlength: 64, class: "crayons-textfield", placeholder: "Halifax, Nova Scotia" %>

Limit of 64 characters

<%= f.label :email, "Support email", class: "crayons-field__label" %> <%= f.text_field :email, maxlength: 64, placeholder: "mail@example.com", class: "crayons-textfield" %>

Limit of 64 characters

<%= f.label :company_size, "Organization size", class: "crayons-field__label" %> <%= f.text_field :company_size, maxlength: 7, placeholder: "...", class: "crayons-textfield" %>

Enter a number

<%= f.label :story, "Our story", class: "crayons-field__label" %> <%= f.text_area :story, maxlength: 640, placeholder: "...", class: "crayons-textfield" %>

Limit of 640 characters

<%= f.label :tech_stack, "Our stack", class: "crayons-field__label" %> <%= f.text_area :tech_stack, maxlength: 640, placeholder: "...", class: "crayons-textfield" %>

Limit of 640 characters

Call-to-action box

Customizable text that appears to the right of every post for your organization. See an example from the " target="_blank" rel="noopener">DEV Team.

<%= f.label :cta_body_markdown, "Body text", class: "crayons-field__label" %> <%= f.text_area :cta_body_markdown, maxlength: 256, class: "crayons-textfield", placeholder: "..." %>

Limited markdown: _italic_ and **bold** is okay. Links, and headers etc. will not show up. 256 character limit.

<%= f.label :cta_button_text, "Link text", class: "crayons-field__label" %> <%= f.text_field :cta_button_text, maxlength: 20, placeholder: "Visit Acme Site", class: "crayons-textfield" %>

Limit of 20 characters

<%= f.label :cta_button_url, "Link url", class: "crayons-field__label" %> <%= f.text_field :cta_button_url, maxlength: 150, placeholder: "https://example.com", class: "crayons-textfield" %>
<% end %>