]> gitweb.fluxo.info Git - drupal/reminder.git/commitdiff
More fields
authorSilvio Rhatto <rhatto@riseup.net>
Fri, 30 Mar 2012 22:15:17 +0000 (19:15 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Fri, 30 Mar 2012 22:15:17 +0000 (19:15 -0300)
reminder.module

index 0ac0e641d7bceb40c9b7b64d21d203bc7b01946e..0f606b4dc52c5e92631234c68172324502ff7f06 100644 (file)
@@ -118,9 +118,6 @@ function reminder_node_access($node, $op, $account) {
 
 /**
  * Implementation of hook_node_form()
- *
- * @todo
- *   Date, remind and subscribe widgets.
  */
 function node_reminder_form(&$node) {
   global $user;
@@ -184,6 +181,21 @@ function node_reminder_form(&$node) {
      '#date_year_range'     => '0:+3',
   );
 
+  $form['interval'] = array(
+    '#type' => 'select',
+    '#title' => t('Interval'),
+    '#options' => array(
+      'hourly'     => t('Hourly'),
+      'daily'      => t('Daily'),
+      'weekly'     => t('Weekly'),
+      'monthly'    => t('Monthly'),
+      'yearly'     => t('Yearly'),
+      'decreasing' => t('Increasing (you get more reminders over time)'),
+    ),
+    '#default_value' => isset($node->interval) ? $node->interval : 'hourly',
+    '#description' => t('Choose the interval a reminder should be sent to you and all subscribers.'),
+  );
+
   $form['reminder_options'] = array(
     '#type' => 'fieldset',
     '#title' => t('Reminder options'),
@@ -198,6 +210,13 @@ function node_reminder_form(&$node) {
     '#default_value' => isset($node->secure) ? $node->secure : 0,
   );
 
+  $form['reminder_subscriptions'] = array(
+    '#type' => 'textarea',
+    '#title' => t('Subscribers'),
+    '#description' => t('One valid email address per line.'),
+    '#maxlength' => 100,
+  );
+
   return $form;
 }