houdini/app/views/components/forms/_slug_field.html.erb

19 lines
949 B
Text
Raw Normal View History

2020-06-12 20:03:43 +00:00
<%- # License: AGPL-3.0-or-later WITH WTO-AP-3.0-or-later
# Full license explanation at https://github.com/houdiniproject/houdini/blob/master/LICENSE -%>
<!-- partial start components/forms/slug_field -->
<!-- fundraiser is event or campaign or nonprofit -->
<% fundraiser_name = fundraiser.class.name.downcase %>
<% full_url = 'https://commitchange.com' + url %>
<section>
<fieldset>
<label>URL Slug. This sets the URL path of your <%= fundraiser_name %>. Use only letters and hyphens.</label>
<p><small>Note that changing the <%= fundraiser_name %>'s slug will break any old links you might have shared</small></p>
<p class='u-color--grey'><%= full_url %>/<strong><%= fundraiser.slug %></strong></p>
<input data-slug-default='<%=fundraiser.name%>' class='js-sanitizeSlug' type='text' name='<%= fundraiser_name %>[slug]' value='<%= fundraiser.slug %>'>
</fieldset>
</section>
<!-- partial end components/forms/slug_field -->