Request a New Entry
Is there a word you would like to see in this glossary?
<% if flash[:alert] %>
<%= flash[:alert] %>
<% end %>
<% if @pending_count && @pending_count > 0 %>
You have <%= @pending_count %> pending <%= "request".pluralize(@pending_count) %> being reviewed.
<% end %>
<%= form_with model: @entry, url: requests_path, class: "space-y-6", data: { turbo: false } do |f| %>
<% if @entry.errors.any? %>
Please fix the following errors:
<% @entry.errors.full_messages.each do |message| %>
- <%= message %>
<% end %>
<% end %>
<% if current_user %>
Submitting as: <%= current_user.name %> (<%= current_user.email %>)
<% else %>
<%= f.label :name, "Your Name", class: "block text-sm font-semibold text-gray-700 mb-2" %>
<%= f.text_field :name, required: true, class: "w-full px-4 py-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-indigo-500 focus:border-transparent transition" %>
<%= f.label :email, "Your Email", class: "block text-sm font-semibold text-gray-700 mb-2" %>
<%= f.email_field :email, required: true, class: "w-full px-4 py-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-indigo-500 focus:border-transparent transition" %>
<% end %>
<%= render 'entries/form_fields', f: f %>
<%= f.submit "Submit Request", class: "flex-1 bg-indigo-600 hover:bg-indigo-700 text-white font-semibold py-3 px-6 rounded-lg transition shadow-md hover:shadow-lg" %>
<%= link_to "Cancel", root_path, class: "flex-1 text-center bg-gray-100 hover:bg-gray-200 text-gray-800 font-semibold py-3 px-6 rounded-lg transition" %>
<% end %>
<% unless current_user %>
Already have an account? <%= link_to "Sign in", login_path, class: "text-indigo-600 hover:text-indigo-800 font-semibold" %>
<% end %>