tools==>Notices & slips==>Edit. When multilingual is enabled , add multilingual email templates. Set the preference TranslateNotices to 'Don't allow'. The email setting should show only the default,but now it just changed from 'tab' to 'list', still showing all the language settings.
Created attachment 93887 [details] [review] Bug 23765 - After TranslateNotices is set to 'Don't allow', email settings still show multiple languages To test: 1. Enable multi-languages 2. Set the preference 'TranslateNotices' on 'Allow' 3. Go to: tools==>Notices & slips==>Edit, make sure it has multilingual email templates. 4. Set the preference TranslateNotices on 'Don't allow'. 5. Go to: tools==>Notices & slips==>Edit ,the template still shows all the languages. 6. Apply the patch. 7. Repeat the steps 4 and 5 8. Success. It only shows the default template when TranslateNotices is 'Dont allow'.
Created attachment 93903 [details] [review] Bug 23765: After TranslateNotices is set to 'Don't allow', email settings still show multiple languages To test: 1. Enable multi-languages 2. Set the preference 'TranslateNotices' on 'Allow' 3. Go to: tools==>Notices & slips==>Edit, make sure it has multilingual email templates. 4. Set the preference TranslateNotices on 'Don't allow'. 5. Go to: tools==>Notices & slips==>Edit ,the template still shows all the languages. 6. Apply the patch. 7. Repeat the steps 4 and 5 8. Success. It only shows the default template when TranslateNotices is 'Dont allow'. Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Note: I can only see the problem, if I add something to a translated template first. Then with turning off the pref, this tab will remain in the list, so you end up with 2 email tabs and can't see which language it is anymore.
Hmmm, I'm wondering if this should be caught at a higher level.. the issue to me is that C4::Letters::GetLetterTemplates returns multiple languages even if TranslateNotices is set to "Don't allow"... I'm wondering if fixing it at this level would catch some other cases where TranslateNotices isn't being checked perhaps?
Created attachment 95136 [details] [review] Bug 23765: Do not display localized templates if TranslateNotices is off To test: 1. Enable multi-languages 2. Set the preference 'TranslateNotices' on 'Allow' 3. Go to: tools==>Notices & slips==>Edit, make sure it has multilingual email templates. 4. Set the preference TranslateNotices on 'Don't allow'. 5. Go to: tools==>Notices & slips==>Edit, the template shows several tab for the same transport type. 6. Apply the patch. 7. Repeat the steps 4 and 5 8. Success. It only shows the default template when TranslateNotices is 'Dont allow'.
(In reply to Martin Renvoize from comment #4) > Hmmm, > > I'm wondering if this should be caught at a higher level.. the issue to me > is that C4::Letters::GetLetterTemplates returns multiple languages even if > TranslateNotices is set to "Don't allow"... I'm wondering if fixing it at > this level would catch some other cases where TranslateNotices isn't being > checked perhaps? Yes, definitely!
Thanks for implementing that Jonathan, looks great... Just testing it now. Thanks Bin Wen for raising it and submitting the first version :)
Created attachment 95306 [details] [review] Bug 23765: Do not display localized templates if TranslateNotices is off To test: 1. Enable multi-languages 2. Set the preference 'TranslateNotices' on 'Allow' 3. Go to: tools==>Notices & slips==>Edit, make sure it has multilingual email templates. 4. Set the preference TranslateNotices on 'Don't allow'. 5. Go to: tools==>Notices & slips==>Edit, the template shows several tab for the same transport type. 6. Apply the patch. 7. Repeat the steps 4 and 5 8. Success. It only shows the default template when TranslateNotices is 'Dont allow'. Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Works well, Signing off.
Created attachment 95375 [details] [review] Bug 23765: Do not display localized templates if TranslateNotices is off To test: 1. Enable multi-languages 2. Set the preference 'TranslateNotices' on 'Allow' 3. Go to: tools==>Notices & slips==>Edit, make sure it has multilingual email templates. 4. Set the preference TranslateNotices on 'Don't allow'. 5. Go to: tools==>Notices & slips==>Edit, the template shows several tab for the same transport type. 6. Apply the patch. 7. Repeat the steps 4 and 5 8. Success. It only shows the default template when TranslateNotices is 'Dont allow'. Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Nice work! Pushed to master for 19.11.00
Pushed to 19.05.x for 19.05.05