Skip to content

Commit

Permalink
fix: move photos/data to main language (#7758)
Browse files Browse the repository at this point in the history
Moves the "product characteristics" section above the "front image" section in the product edit form, and puts the checkbox for moderators to move data and photos to another language close to the main language field.
  • Loading branch information
stephanegigandet authored Nov 25, 2022
1 parent 5a2acdc commit d50cf13
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion cgi/product_multilingual.pl
Original file line number Diff line number Diff line change
Expand Up @@ -898,7 +898,7 @@ ($product_ref, $field, $language)

# For moderators, add a checkbox to move all data and photos to the main language
# this needs to be below the "add (language name) in all field labels" above, so that it does not change this label.
if (($User{moderator}) and ($tabsid eq "front_image")) {
if (($User{moderator}) and ($tabsid eq "product")) {

my $msg = f_lang(
"f_move_data_and_photos_to_main_language",
Expand Down
4 changes: 2 additions & 2 deletions templates/web/pages/product_edit/display_input_tabs.tt.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
[% IF tab.tabid != "new" %]
<div class="tabs content[% tab.active %][% tab.new_lc %] tabs_[% tab.tabid %]" id="tabs_[% tabsid %]_[% tab.tabid %]">

[% IF moderator && tabsid == "front_image" %]
<div class="move_data_and_images_to_main_language" id="[% tab.moveid %]_div" style="display:hidden">
[% IF moderator && tabsid == "product" %]
<div class="move_data_and_images_to_main_language" id="[% tab.moveid %]_div" style="display:none;">
<input class="move_data_and_images_to_main_language_checkbox" type="checkbox" id="[% tab.moveid %]" name="[% tab.moveid %]" />
<label for="[% tab.moveid %]" class="checkbox_label">[% tab.msg %]</label><br/>
<div id="[% tab.moveid %]_radio" style="display:hidden">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,15 +105,7 @@ <h1>[% title %]</h1>
[% END %]

</div>
</section>

<section id="product_image" class="card fieldset">
<div class="card-section">
<legend>[% lang("product_image") %]</legend>
<input type="hidden" id="sorted_langs" name="sorted_langs" value="[% product_ref_sorted_langs %]"/>
[% display_tab_product_picture %]
</div>
</section>
</section>

<section id="product_characteristics" class="fieldset card">
<div class="card-section">
Expand All @@ -134,6 +126,14 @@ <h1>[% title %]</h1>
</div>
</section>

<section id="product_image" class="card fieldset">
<div class="card-section">
<legend>[% lang("product_image") %]</legend>
<input type="hidden" id="sorted_langs" name="sorted_langs" value="[% product_ref_sorted_langs %]"/>
[% display_tab_product_picture %]
</div>
</section>

<section id="ingredients" class="card fieldset">
<div class="card-section">
<legend>[% lang('ingredients') %]</legend>
Expand Down

0 comments on commit d50cf13

Please sign in to comment.