communications: Add email preferences.
[org.fsf.memberdashboard.git] / templates / CRM / Memberdashboard / Page / Communications.tpl
index 9a122508caf991dcbc307159b2226d1e81d3fbe1..b33320e5f6f4048b0022332f2b1eb9918f363f72 100644 (file)
   {include file="CRM/Contact/Page/View/UserDashBoard/GroupContact.tpl"}
 </div>
 
+<div>
+  <div class="header-dark">
+    {ts}Email Preferences{/ts}
+  </div>
+
+  <form method="post" action="{crmURL p='/civicrm/member-dashboard/communications'}">
+    <div class="form-item">
+      <label for="preferred_mail_format">Preferred Email Format</label>
+      <select name="preferred_mail_format">
+        {foreach from=$mailFormats item=format}
+          <option
+            {if $contact.preferred_mail_format eq $format}
+              selected="selected"
+            {/if}
+              value="{$format}">
+            {$format}
+          </option>
+        {/foreach}
+      </select>
+      <input type="submit" value="Save"/>
+    </div>
+  </form>
+</div>
+
 {include file="CRM/Memberdashboard/Page/DashboardElement.tpl"
          element=$dashboardElements.CiviEvent }