<%= csrf_meta_tags %> <%= csp_meta_tag %> <%= stylesheet_link_tag :app, "data-turbo-track": "reload" %> <%= javascript_importmap_tags %>

Sanasto Wiki

Initial Setup

Create Admin Account

Welcome! Let's create your administrator account to get started.

<%= form_with model: @user, url: setup_path, method: :post, class: "space-y-6" do |f| %> <% if @user.errors.any? %>

<%= pluralize(@user.errors.count, "error") %> prevented setup:

    <% @user.errors.full_messages.each do |message| %>
  • <%= message %>
  • <% end %>
<% end %>
<%= f.label :name, class: "block text-sm font-medium text-gray-700" %> <%= f.text_field :name, required: true, autofocus: true, class: "mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-blue-500 focus:ring-blue-500 sm:text-sm", placeholder: "Your full name" %>
<%= f.label :email, class: "block text-sm font-medium text-gray-700" %> <%= f.email_field :email, required: true, class: "mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-blue-500 focus:ring-blue-500 sm:text-sm", placeholder: "admin@example.com" %>

This will be the default contact email for the system.

<%= f.label :primary_language, "Preferred Language", class: "block text-sm font-medium text-gray-700" %> <%= f.select :primary_language, SupportedLanguage.order(:sort_order).pluck(:code, :native_name), { include_blank: "Select your primary language" }, required: true, class: "mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-blue-500 focus:ring-blue-500 sm:text-sm" %>
<%= f.label :password, class: "block text-sm font-medium text-gray-700" %> <%= f.password_field :password, required: true, class: "mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-blue-500 focus:ring-blue-500 sm:text-sm", placeholder: "Minimum 12 characters" %>

Choose a strong password with at least 12 characters.

<%= f.label :password_confirmation, "Confirm Password", class: "block text-sm font-medium text-gray-700" %> <%= f.password_field :password_confirmation, required: true, class: "mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-blue-500 focus:ring-blue-500 sm:text-sm", placeholder: "Re-enter your password" %>

Note: This account will have full administrator access and cannot be deleted through the UI.

<%= f.submit "Complete Setup", class: "w-full flex justify-center py-3 px-4 border border-transparent rounded-md shadow-sm text-sm font-medium text-white bg-gradient-to-r from-blue-600 to-indigo-600 hover:from-blue-700 hover:to-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 transition-all duration-200" %>
<% end %>