<div class="edit-mode-controls center l-box">
  <% if edit_mode? %>
    <a href="<%= url_for(params.except(:edit_mode)) %>" alt="Leave edit mode">
      <button class="leave-edit-mode pure-button s-margin">Leave edit mode</button>
    </a>
    <button disabled="disabled" class="pure-button select-all s-margin">Select all</button>
    <button disabled="disabled" class="pure-button deselect-all s-margin">Deselect all</button>
    <button type="submit" name="delete" value="true" class="pure-button s-margin">Delete</button>
    <button type="submit" name="add_to_album" value="true" class="pure-button s-margin">Add to album</button>
  <% else %>
    <a href="<%= url_for(params.merge(:edit_mode => true)) %>" alt="Edit mode">
      <button class="pure-button s-margin">
        Edit mode
      </button>
    </a>
  <% end %>
</div>

<div class="edit-mode-controls center l-box">
  <% if edit_mode? %>
    <a href="<%= url_for(params.except(:edit_mode)) %>" alt="Leave edit mode">
      <button type="button" class="leave-edit-mode pure-button s-margin">Leave edit mode</button>
    </a>
    <button type="button" disabled="disabled" class="pure-button select-all s-margin">Select all</button>
    <button type="button" disabled="disabled" class="pure-button deselect-all s-margin">Deselect all</button>
    <button type="submit" name="delete" value="true" class="pure-button s-margin">Delete</button>
    <button type="submit" name="add_to_album" value="true" class="pure-button s-margin">Add to album</button>
  <% else %>
    <a href="<%= url_for(params.merge(:edit_mode => true)) %>" alt="Edit mode">
      <button class="pure-button s-margin" type="button">
        Edit mode
      </button>
    </a>
  <% end %>
</div>

Set button type to prevent form being submitted
Set button type to prevent form being submitted
