@@ -1056,6 +1056,7 @@ var plugin_formcreator = new function() {
10561056 action : 'newTranslation' ,
10571057 id : formLanguageId ,
10581058 } ,
1059+ title : i18n . textdomain ( 'formcreator' ) . __ ( 'Add translations' , 'formcreator' ) ,
10591060 close : function ( ) {
10601061 reloadTab ( ) ;
10611062 } ,
@@ -1080,8 +1081,6 @@ var plugin_formcreator = new function() {
10801081 }
10811082
10821083 this . updateTranslation = function ( element ) {
1083- var that = this ;
1084- var form = document . querySelector ( 'form[name="plugin_formcreator_translation"]' ) ;
10851084 tinyMCE . triggerSave ( ) ;
10861085 $ . post ( {
10871086 url : '../ajax/translation.php' ,
@@ -1104,34 +1103,14 @@ var plugin_formcreator = new function() {
11041103 id : formLanguageId ,
11051104 plugin_formcreator_translations_id : translationId
11061105 } ,
1106+ title : i18n . textdomain ( 'formcreator' ) . __ ( 'Update a translation' , 'formcreator' ) ,
11071107 close : function ( ) {
11081108 reloadTab ( ) ;
11091109 } ,
11101110 fail : function ( ) {
11111111 displayAjaxMessageAfterRedirect ( ) ;
11121112 }
11131113 } ) ;
1114- return ;
1115-
1116- var modal = $ ( this . spinner ) ;
1117- modal . dialog ( this . modalSetings )
1118- . on ( 'dialogclose' , function ( e , ui ) {
1119- reloadTab ( ) ;
1120- } ) ;
1121- $ . post ( {
1122- url : '../ajax/form_language.php' ,
1123- data : {
1124- action : 'translation' ,
1125- id : formLanguageId ,
1126- plugin_formcreator_translations_id : translationId
1127- }
1128- } ) . done ( function ( data ) {
1129- modal . html ( data ) . dialog ( 'open' ) ;
1130- // we edit a translation, then close the dialog when saving the values
1131- modal . find ( 'form' ) . on ( 'submit' , function ( ) {
1132- modal . dialog ( 'close' ) ;
1133- } )
1134- } ) ;
11351114 }
11361115
11371116 // make a new selector equivalent to :contains(...) but case insensitive
0 commit comments