在 contentBox 上添加操作代码 - Liferay - AUI Modal

Adding action codes on contentBox - Liferay - AUI Modal

我正在尝试在 aui-modal 上添加一些 html 代码,我不确定这是否是正确的方法,文本出现在模态上,但按钮不是 运行.

关注我的contentBox代码:

<div id="contentBox" >
<h3>Title...</h3>  </br>
<p> My text... </p> </br>

<p>
    <div id="myRadiogroup">
        <input id="1" input type="button" value="1" class="nota1" >
        <input id="2" type="button" value="2" class="nota2">
        <input id="3" type="button" value="3" class="nota3">
        <input id="4" type="button" value="4" class="nota4">
        <input id="5" type="button" value="5" class="nota5">
        <input id="6" type="button" value="6" class="nota6">
        <input id="7" type="button" value="7" class="nota7">
        <input id="8" type="button" value="8" class="nota8">
        <input id="9" type="button" value="9" class="nota9">
        <input id="10" type="button" value="10" class="nota10">        
    </div>
</p>
<div class="form-group">
    <label for="comment">Commentário (opcional)</label>
    <textarea rows="3" cols="50" id="comment"></textarea>
</div>      

这里是aui模态代码:

YUI().use(
'aui-modal',
function(Y) {
  var modal = new Y.Modal(
  {
      contentBox: '#contentBox',
    centered: true,
    destroyOnHide: false,
    headerContent: '<h3>Pesquisa de satistação</h3>',
    modal: true,
    render: '#modal',
    resizable: {
      handles: 'b, r'
    },        
    visible: true,
    width: 450
  }
).render();

modal.addToolbar(
  [
    {           
      label: 'Cancel',
      on: {
        click: function() {
          modal.hide();
        }
      }
    },
    {
      label: 'Finish',
      on: {
        click: function() {
          alert('Information sent.');
        }
      }
    }
  ]
);

Y.one('#showModal').on(
  'click',
  function() {
    modal.show();
  }
); 
});

当我添加 contentBox 时,模态出现如下所示: Image

模态上的按钮,似乎被禁用了,我点击但没有任何反应。

我正在使用这个参考:link

有人可以帮助我吗?

我不知道为什么,但我在 "contentBox" 中又添加了一个,一切都完成了。

我现在的代码是这样的:

<div id="contentBox" >

<!-- criação do action para submit -->
<portlet:actionURL name="dataSubmit" var="dataSubmit" />
<form action="<%=dataSubmit %>" method="Post">

    <div class="modal-content">

        <!-- div do header -->      
        <div class="modal-header">                  
            <img src="<%=request.getContextPath() %>/img/logo.jpg">           
        </div>

        <!-- div do body -->
        <div class="modal-body">
            My info here...

            <p>

            <!-- criação dos botões de nota -->
            <div id="myRadiogroup" class="radioClass">
                <input id="nota1" type="button" value="1" onclick="radioFunction(1)" class="nota1" >
                <input id="nota2" type="button" value="2" onclick="radioFunction(2)" class="nota2">
                <input id="nota3" type="button" value="3" onclick="radioFunction(3)" class="nota3">
                <input id="nota4" type="button" value="4" onclick="radioFunction(4)" class="nota4">
                <input id="nota5" type="button" value="5" onclick="radioFunction(5)" class="nota5">
                <input id="nota6" type="button" value="6" onclick="radioFunction(6)" class="nota6">
                <input id="nota7" type="button" value="7" onclick="radioFunction(7)" class="nota7">
                <input id="nota8" type="button" value="8" onclick="radioFunction(8)" class="nota8">
                <input id="nota9" type="button" value="9" onclick="radioFunction(9)" class="nota9">
                <input id="nota10" type="button" value="10" onclick="radioFunction(10)" class="nota10">
            </div>
            </p>

            <!-- input que recebe o valor da nota via javascript -->
            <input type='hidden' id= 'hiddenField' name='<portlet:namespace/>nota' value='' />

            <div class="form-group">
                <label for="comment">Commentário (opcional)</label>
                <textarea rows="3" cols="50" id="comment" name="<portlet:namespace/>comment"></textarea>
            </div>
        </div>

        <!-- div do rodapé -->
        <div class="modal-footer">
            <span id="closer" class="closeBtnFooter">Não quero dar feedback </span>                   
            <input id="enviar" type="Submit" class="btn btn-primary" value="Enviar feedback">
        </div>
    </div>
</form>
</div>