1
0
mirror of https://github.com/projekteuler/projekteuler.git synced 2025-12-10 08:46:41 +01:00
projekteuler/app/views/translations/_form.html.erb

27 lines
954 B
Plaintext

<%= form_for [@problem, @translation], layout: :basic do |f| %>
<%= f.text_field :title %>
<%= nav id: 'translationNav' do %>
<%= link_to t('.source_code'), '#source', data: {toggle: 'tab'} %>
<%= link_to t('.preview'), '#preview', data: {toggle: 'tab'} %>
<% end %>
<div class="tab-content">
<div class="tab-pane active" id="source">
<%= f.text_area :content, placeholder: t('.translation_source_explanation') %>
</div>
<%= panel class: 'tab-pane', id: 'preview' do %>
<div class="panel-body problem-content">
</div>
<% end %>
</div>
<div class="alert alert-info">
<%= t '.copyright_warning_html' %>
<% if not user_signed_in? %>
<%= t '.not_logged_in_warning' %>
<% end %>
</div>
<%= f.submit %>
<% if user_signed_in? and current_user.admin? %>
<%= f.button t('.save_and_accept'), type: :submit, name: "accept", value: true, class: "btn-success" %>
<% end %>
<% end %>