ee
Showing
1 changed file
with
36 additions
and
1 deletions
| ... | @@ -28,7 +28,7 @@ function getInputFormValues($validation, $name) { | ... | @@ -28,7 +28,7 @@ function getInputFormValues($validation, $name) { |
| 28 | </div> | 28 | </div> |
| 29 | <?php endif; ?> | 29 | <?php endif; ?> |
| 30 | 30 | ||
| 31 | <form enctype="multipart/form-data" method="post" action="/wp-admin/admin.php?page=notifications-create-new"> | 31 | <form enctype="multipart/form-data" method="post" id="notifications-create-new" action="/wp-admin/admin.php?page=notifications-create-new"> |
| 32 | 32 | ||
| 33 | <input type="hidden" name="_POSTED_" value="yes"/> | 33 | <input type="hidden" name="_POSTED_" value="yes"/> |
| 34 | 34 | ||
| ... | @@ -291,6 +291,40 @@ function getInputFormValues($validation, $name) { | ... | @@ -291,6 +291,40 @@ function getInputFormValues($validation, $name) { |
| 291 | 291 | ||
| 292 | <script> | 292 | <script> |
| 293 | jQuery(document).ready(function ($) { | 293 | jQuery(document).ready(function ($) { |
| 294 | |||
| 295 | var codeCleaned = false; | ||
| 296 | |||
| 297 | $("#notifications-create-new").on("submit", function(e){ | ||
| 298 | if (!codeCleaned) { | ||
| 299 | |||
| 300 | e.preventDefault(); | ||
| 301 | |||
| 302 | $('#fr_html_ifr').contents().find('td:last-child').each(function(){ | ||
| 303 | $(this).addClass('tdlast-child'); | ||
| 304 | |||
| 305 | }); | ||
| 306 | |||
| 307 | $('#fr_html_ifr').contents().find('tr:last-child').each(function(){ | ||
| 308 | $(this).addClass('trlast-child'); | ||
| 309 | |||
| 310 | }); | ||
| 311 | |||
| 312 | $('#en_html_ifr').contents().find('td:last-child').each(function(){ | ||
| 313 | $(this).addClass('tdlast-child'); | ||
| 314 | |||
| 315 | }); | ||
| 316 | |||
| 317 | $('#en_html_ifr').contents().find('tr:last-child').each(function(){ | ||
| 318 | $(this).addClass('trlast-child'); | ||
| 319 | |||
| 320 | }); | ||
| 321 | |||
| 322 | codeCleaned = true; | ||
| 323 | // $(this).trigger('submit'); | ||
| 324 | } | ||
| 325 | }); | ||
| 326 | |||
| 327 | |||
| 294 | $('#tabs').tabs(); | 328 | $('#tabs').tabs(); |
| 295 | 329 | ||
| 296 | // Update system message type clone when changing the message type | 330 | // Update system message type clone when changing the message type |
| ... | @@ -371,6 +405,7 @@ function getInputFormValues($validation, $name) { | ... | @@ -371,6 +405,7 @@ function getInputFormValues($validation, $name) { |
| 371 | jQuery('.scheduled_sendto').hide(); | 405 | jQuery('.scheduled_sendto').hide(); |
| 372 | jQuery('.trigger-extended').show(); | 406 | jQuery('.trigger-extended').show(); |
| 373 | }else if (type == "newsletter") { | 407 | }else if (type == "newsletter") { |
| 408 | |||
| 374 | 409 | ||
| 375 | jQuery("#tabs").append('<input type="hidden" id="email_style" name="email_style" class="wide-input-field" />'); | 410 | jQuery("#tabs").append('<input type="hidden" id="email_style" name="email_style" class="wide-input-field" />'); |
| 376 | jQuery("#email_style").val('newsletter'); | 411 | jQuery("#email_style").val('newsletter'); | ... | ... |
-
Please register or sign in to post a comment