  <div id="dialog-assetupload"
    class="wrapper wrapper-dialog wrapper-dialog-assetupload <% if(shown) { print('is-shown') } %>"
    aria-describedby="dialog-assetupload-description"
    aria-labelledby="dialog-assetupload-title"
    aria-hidden="<%= !shown %>"
    role="dialog">
    <div class="dialog confirm">

<form class="upload-dialog" method="POST" action="<%= url %>" enctype="multipart/form-data">
  <div class="form-content">
  <h2 class="title"><%= title %></h2>
  <% if(error) {%>
    <div id="upload_error" class="message message-status message-status error is-shown" name="upload_error">
      <p><%= error.message %></p>
    </div>
  <% } %>
  <p id="dialog-assetupload-description" class="message"><%= message %></p>
  <input type="file" name="file" <% if(error && error.attributes && error.attributes.selectedFile) {%>class="error"<% } %> />

    <div class="status-upload">

    <% if(uploading) { %>
      <div class="wrapper-progress">
      <% if (uploadedBytes && totalBytes) { %>
          <progress value="<%= uploadedBytes %>" max="<%= totalBytes %>"><%= uploadedBytes/totalBytes*100 %>%</progress>
      <% } else { %>
        <progress></progress>
      <% } %>
      </div>
    <% } %>

    <% if(finished) { %>
      <div id="upload_confirm" class="message message-status message-status confirm is-shown" name="upload_confirm">
        <p><%= gettext("Success!") %></p>
      </div>
    <% } %>

    </div>
  </div>

  <div class="actions">
    <h3 class="sr"><%= gettext('Form Actions') %></h3>
  <ul>
  <li class="action-item">
    <a href="#" class="button action-primary action-upload <% if (!selectedFile || error) { %>disabled<% } %>"><%= gettext('Upload') %></a>
  </li>
  <li class="action-item">
    <a href="#" class="button action-secondary action-cancel"><%= gettext('Cancel') %></a>
  </li>
  </ul>
  </div>
</form>

    </div>
</div>
