@(title: String, withNotes: Boolean = false)(implicit ctx: Context)

@if(withNotes) {
<div class="chat_menu">
  <a data-panel="messages_container" class="active">@title <input title="@trans.toggleTheChat()" class="toggle_chat" type="checkbox" /></a>
  <a data-panel="notes">@trans.notes()</a>
</div>
<div id="chat" class="side_box">
} else {
<div id="chat" class="side_box">
  <div class="top">
    <span>@title</span>
    <input title="@trans.toggleTheChat()" class="toggle_chat" type="checkbox" />
  </div>
}
  <div class="chat_panels">
    <div class="messages_container active">
      <ol class="messages content scroll-shadow-soft"></ol>
      <form action="#">
        <input class="lichess_say" value="" placeholder="@trans.talkInChat()" />
        <a class="send" data-icon="z"></a>
      </form>
    </div>
    @if(withNotes) {
    <div class="notes">
      <textarea placeholder="@trans.typePrivateNotesHere()"></textarea>
    </div>
    }
  </div>
</div>

@(title: String, withNotes: Boolean = false)(implicit ctx: Context)

@if(withNotes) {
<div class="chat_menu">
  <a data-panel="messages_container" class="active">@title <input title="@trans.toggleTheChat()" class="toggle_chat" type="checkbox" /></a>
  <a data-panel="notes">@trans.notes()</a>
</div>
<div id="chat" class="side_box">
} else {
<div id="chat" class="side_box">
  <div class="top">
    <span>@title</span>
    <input title="@trans.toggleTheChat()" class="toggle_chat" type="checkbox" />
  </div>
}
  <div class="chat_panels">
    <div class="messages_container active">
      <ol class="messages content scroll-shadow-soft"></ol>
      <form action="#">
        <input class="lichess_say" value="" placeholder="@trans.talkInChat()" maxlength="140" />
        <a class="send" data-icon="z"></a>
      </form>
    </div>
    @if(withNotes) {
    <div class="notes">
      <textarea placeholder="@trans.typePrivateNotesHere()"></textarea>
    </div>
    }
  </div>
</div>

Add maxlength attribute to chat input
Add maxlength attribute to chat input

When posting a chat message, you get an error if it's longer than 140 characters. When giving it a maxlength, users can see when they reached the maximum length.
