title: Buttons in jquery dialog don't show
body: <p>I'm trying to have a modal form on a page, for this I am using a jquery dialog.
  However, the buttons on the dialog don't appear when the form does.</p>
  
  <p>Here is the javascript creating the dialog :</p>
  
  <pre><code>   function showform() {
    $("#formplan").dialog({
       open: function(event, ui) {
          $(".ui-dialog-titlebar-close").hide();
       },
       modal: true,
       autoOpen: false,
       dialogClass: "dialogform",
       buttons: [{
          text: "Planifier",
          click: function() {
             $("#formplan").dialog("close");
             $("#formplan").submit();
          }
       }, {
          text: "Cancel",
          click: function() {
             $("#formplan").dialog("close");
             $("#formplan").dialog('destroy').remove();
          }
       }]
    });
    $("#formplan").dialog('open');
  };
  </code></pre>
  
  <p>And here is the form included along with the call to the script: </p>
  
  <pre><code>&lt;div id="formplan" class="dijitDialog" role="dialog" style="display:none"&gt;
     &lt;form style="" action="javascript:refreshTab('tabadministrationplanificateurtaches', '/profusion/scheduler/etat.html?onglet=tabadministrationplanificateurtaches&amp;mode=integre&amp;planed=ImportPays ' + getfromform())"&gt;
        &lt;br&gt;planification de la tache ImportPays :
        &lt;br&gt;
        &lt;input type="radio" name="periodicity" value="1" checked&gt; tout les jours
        &lt;br&gt;
        &lt;input type="radio" name="periodicity" value="2"&gt; par jours de la semaine :
        &lt;input type="checkbox" name="Daysofweek" value="1"&gt; dimanche
        &lt;input type="checkbox" name="Daysofweek" value="2"&gt; lundi
        &lt;input type="checkbox" name="Daysofweek" value="3"&gt; mardi
        &lt;input type="checkbox" name="Daysofweek" value="4"&gt; mercredi
        &lt;input type="checkbox" name="Daysofweek" value="5"&gt; jeudi
        &lt;input type="checkbox" name="Daysofweek" value="6"&gt; vendredi
        &lt;input type="checkbox" name="Daysofweek" value="7"&gt; samedi
        &lt;br&gt;
        &lt;input type="radio" name="periodicity" value="3"&gt; par mois :
        &lt;input type="text" name="Daysofmonth" placeholder="ex : 1:3:21"&gt;
        &lt;br&gt;effectuer à :
        &lt;input type="text" name="hours" placeholder="ex : HH:mm:ss/HH:mm:ss"&gt;
        &lt;br&gt; &lt;/form&gt;
  &lt;/div&gt;
  &lt;script&gt;
     showform();
  &lt;/script&gt;
  </code></pre>
  
  <p>This code is pushed to the HTML using JAVA , so the script calling <code>showform()</code> is there only if needed.
  Also, I noticed before than I could still click on the page behind, even with the <code>modal:true</code>, and if I clicked on the button generating the page( doing a refresh in the process), my form would appear twice.
   My guess is that it comes from the call of <code>showform()</code> directly (without being linked to an <code>onclick()</code> event).</p>
  
  <p>Thanks,</p>