<%inherit file="/template.html" />
<%namespace name="components" file="/components.html"/>
<%namespace name="forms" file="/forms.html"/>
<%def name="title()">${_("Send mass message")}</%def>

<%def name="massmessage_form()">
  <h3>${_('Send mass message')}</h3>

  ${_('Please note that users may not necessarily receive this message '
      'by email. The message will however show up in their dashboards.')}

  <form name="create_message" class="inplace" method="POST"
        action="${h.entity_url(c.proposal, member='message')}">
      ${h.field_token()|n}

      <fieldset class="massmessage_filter">
        <legend>${_("Send to ...")}</legend>
        <ul class="nobullet">
            <li>${forms.checkbox(_('Creators'), 'creators', help=_('Users who have participated in writing "%s"') % c.proposal.title)}</li>
            <li>${forms.checkbox(_('Supporters'), 'supporters', help=_('Users who have voted in favour of "%s"') % c.proposal.title)}</li>
            <li>${forms.checkbox(_('Opponents'), 'opponents', help=_('Users who have voted against "%s"') % c.proposal.title)}</li>
        </ul>
      </fieldset>

      <fieldset>
        <legend>${_("Subject")}</legend>
        <input name="subject" required="required" />
      </fieldset>

      <fieldset>
        <legend>${_("Body")}</legend>
        <textarea name="body" required="required"></textarea>
      </fieldset>

      <div class="mainbar">
        ${components.savebox(h.entity_url(c.proposal), save_text=_("Send"))}
      </div>
  </form>
</%def>


<%block name="main_content">
  ${massmessage_form()}
</%block>
