From 2ae78852244f12c9ac9014eccd651534c5f72b76 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Fri, 30 Mar 2012 19:15:17 -0300 Subject: More fields --- reminder.module | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/reminder.module b/reminder.module index 0ac0e64..0f606b4 100644 --- a/reminder.module +++ b/reminder.module @@ -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; } -- cgit v1.2.3