"> "> <$mt:setvar name="position_actions_bottom" value="1"$> <__trans phrase="This boilerplate has been saved."> <__trans phrase="Your changes have been saved.">
" id="edit_formatted_text"> " /> " /> " id="id" /> " /> " /> "> " required="1"> " /> "> " /> (function($) { var formatted_texts = [ { id: "", label: "", } ]; Lexicon["The boilerplate '[_1]' is already in use in this blog."] = '<__trans phrase="The boilerplate '[_1]' is already in use in this blog." params="[_1]" escape="singlequotes" />'; jQuery.mtValidateAddRules({ '#label': function ($e) { var validator = this; var id = $('#id').val(); var new_label = $e.val(); jQuery.each(formatted_texts, function() { if (this.label == new_label && this.id != id) { validator.raise(trans("The boilerplate '[_1]' is already in use in this blog.", new_label)); return false; } }); return true; } }); var editor_manager = new MT.EditorManager('text'); $('#edit_formatted_text').submit(function () { editor_manager.currentEditor.save(); if ( !$(this).find(':input').mtValidate('simple')) { return false; } }); })(jQuery);