Sha256: 97fcc36b2f6c4b9a5496084b4b75f0a507372675d43c19193696a2484208f9d4
Contents?: true
Size: 1.46 KB
Versions: 3
Compression:
Stored size: 1.46 KB
Contents
<%= form_with model: locale, class: "grid gap-2", data: { turbo_frame: "_top" } do |f| %> <% if @locale.errors[:code].any? %> <div class="rounded-md bg-red-50 p-4"> <div class="flex"> <div class="flex-shrink-0"> <svg class="h-5 w-5 text-red-400" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true"> <path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zM8.28 7.22a.75.75 0 00-1.06 1.06L8.94 10l-1.72 1.72a.75.75 0 101.06 1.06L10 11.06l1.72 1.72a.75.75 0 101.06-1.06L11.06 10l1.72-1.72a.75.75 0 00-1.06-1.06L10 8.94 8.28 7.22z" clip-rule="evenodd" /> </svg> </div> <div class="ml-3"> <div class="text-sm text-red-700"> Please check the format of your locale code, and make sure it does not already exist. </div> </div> </div> </div> <% end %> <div> <%= f.label :name, class: "label" %> <%= f.text_field :name, placeholder: "E.g. French", class: "input max-w-xs", required: true %> </div> <div> <%= f.label :code, class: "label" %> <%= f.text_field :code, placeholder: "E.g. fr, en-GB", class: "input max-w-28", required: true %> <p class="mt-1 text-sm leading-6 text-gray-600"> Downcase letters followed by an optional region specifier in uppercase letters, separated by a dash. E.g. <span class="badge">fr</span> or <span class="badge">en-GB</span>. </p> </div> <%= f.submit class: "btn btn-primary mt-2" %> <% end %>
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
rosetta-rails-0.2.1 | app/views/rosetta/locales/_form.html.erb |
rosetta-rails-0.2.0 | app/views/rosetta/locales/_form.html.erb |
rosetta-rails-0.1.1 | app/views/rosetta/locales/_form.html.erb |