<%
 import java.util.Calendar;
 import java.text.SimpleDateFormat;
 import org.exoplatform.ecm.utils.text.Text;
 private String getTimestampName() {
  Calendar now = Calendar.getInstance();
  SimpleDateFormat formatter = new SimpleDateFormat("yyyy.MM.dd '-' hh'h'mm'm'ss");
  return formatter.format(now.getTime());
 }
 String timestampName = Text.convertJcrChars(getTimestampName());
 def email = "ENTER YOUR E-MAIL";
  if(uiform.getParent().getId().equals("UIFCCPortlet")) {
   isFCCPortlet = true;
   uiform.setId("FCC_Subscribe");
   }
%>
<div class="grid_6">

<div id="subscribe-form" class="subscribe-form">
<div class="UITabPane uiTabNormal uiTabInPage">
<%uiform.begin()%>
  <% if (uiform.isShowActionsOnTop()) {
            uiform.processRenderAction()
          }
  %>
    <div class="form-inline box-module">
      <div class="control-group" style="display:none;">
        <label class="control-label"><%=_ctx.appRes("FormGenerator.dialog.label.Date")%></label>
        <div class="controls">
          $timestampName
          <div style="display:none;">
            <%
             String[] fieldName = ["jcrPath=/node", "mixintype=mix:i18n", "editable=if-null", "validate=empty", timestampName] ;
             uicomponent.addTextField("name", fieldName) ;
            %>
          </div>
        </div>
      </div>
      <label class="email">
      <%
      String[] your_email_addressFieldName = ["jcrPath=/node/exo:email", "defaultValues=", "validate=email,empty", ""];
      uicomponent.addTextField("email", your_email_addressFieldName);
     %>
      <!--span class="error">*Invalid email.</span>
      <span class="success">Subscription request sent!</span-->
  </label>
  <% if (!uiform.isShowActionsOnTop()) { %>
    <%
     for(action in uicomponent.getActions()) {
      String actionLabel = "Subscribe";
      String link = uicomponent.event(action);                  %>
            <button type="button" href="javascript:void(0);" onclick="$link" class="btn">$actionLabel</button>
     <% }  %>

  <% } %>
  </div>
  <%uiform.end()%>     
</div>
</div>
</div>
<script type="text/javascript">
  document.getElementById("email").setAttribute("placeholder", "$email");
</script>