Add feature to delete a translation
To delete a translation, a link has been added. This link works for the selected language. It hides all the things related to a language (the tab and the text_area) and empties the text area, so that the value is blank in the param hash. A variable called `delete_translations[]` is changed. e.g. If admin wants to remove English language, delete_translations[:en] will be 1; if not, it will be 0. When the milestone is updated, there is a before_action callback that cleans the selected languages for deletion (looking the delete_translations[] variable). Because of the deleted translations are blank in param hash, them won't be saved in DB.
This commit is contained in:
@@ -254,9 +254,13 @@ en:
|
||||
image: "Image"
|
||||
show_image: "Show image"
|
||||
documents: "Documents"
|
||||
form:
|
||||
add_language: Add language
|
||||
remove_language: Remove language
|
||||
new:
|
||||
creating: Create milestone
|
||||
date: Date
|
||||
description: Description
|
||||
edit:
|
||||
title: Edit milestone
|
||||
create:
|
||||
|
||||
Reference in New Issue
Block a user