Jump to content

  • You cannot start a new topic
  • You cannot reply to this topic

Duplicate Wysiwyg Rate Topic   - - - - -

  • natewallis
  • Senior Member
  • Members
  • Join Date: 11-Jan 13
  • 231 posts

Posted 04 November 2020 - 04:18 AM #1



I have a link that opens a dialog using the following code

        {include file="common/popupbox.tpl"

Clicking on the link opens a dialog with a WYSIWYG editor, defined by the following:

<form action="{""|fn_url}" method="post" enctype="multipart/form-data" class="form-horizontal form-edit cm-ajax cm-form-dialog-closer cm-ajax-force" enctype="multipart/form-data">
  <input type="hidden" name="question[kb_content_id]" value="{$smarty.get.kb_content_id}">
  <input type="hidden" name="question[question_id]" value="{$question->question_id}">
  <input type="hidden" name="result_ids" value="content_questions" />
    <div class="control-group">
      <label class="control-label" for="question">Question</label>
      <div class="controls">
        <input class="span9" type="text" name="question[question]" value="{$question->question}" id="question" placeholder="E.g. My fridge is not getting cold">
    <div class="control-group">
      <label class="control-label" for="answer">Answer</label>
      <div class="controls">
        <textarea id="answer" name="question[answer]" cols="55" rows="2" class="cm-wysiwyg input-large">{$question->answer}</textarea>
  <div class="buttons-container">
    {include file="buttons/save_changes.tpl" but_name="dispatch[`$dispatch`]" cancel_action="close" save=true}

Which all works fine.    Until I close the dialog and reopen it.  When I click on the link and launch the dialog again and the WYSIWYG editor is duplicated.  I have had a look at the js/tygh/core.js file and I can see that destory is called before the dialog is closed, but it still duplicates. 


Anyone experience this or have any thoughts?