OpenProject is the leading open source project management software.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
openproject/app/cells/views/settings/text_setting/show.erb

42 lines
1.2 KiB

<%# The javscript for this cell is included in `settings.js.erb`. %>
<div class="form--field">
<%# Empty label for styling only %>
<%= styled_label_tag "lang", '' %>
<div class="form--field-container">
<%=
styled_select_tag(
"lang",
options_for_select(lang_options_for_select(false), current_language.to_s),
id: "lang-for-#{name}",
class: "lang-select-switch",
container_class: '-slim'
)
%>
</div>
</div>
<% Setting.available_languages.each do |lang| %>
<div id="lang-for-<%= name %>-<%= lang %>"
<%= "style=\"display:none\"" unless lang == current_language.to_s %>
class="lang-select lang-for-<%= name %>"
>
<div class="form--field">
<%= styled_label_tag "settings[#{name}][#{lang}]", t("setting_#{name}") %>
<div class="form--field-container">
<%=
styled_text_area_tag(
"settings[#{name}][#{lang}]",
Setting.send(name)[lang],
label: false,
id: "settings-#{name}-#{lang}",
class: 'wiki-edit',
rows: 5,
container_class: '-wide'
)
%>
</div>
</div>
</div>
<% end %>