summaryrefslogtreecommitdiffstats
path: root/application/forms/EventEdit.php
diff options
context:
space:
mode:
Diffstat (limited to 'application/forms/EventEdit.php')
-rwxr-xr-xapplication/forms/EventEdit.php116
1 files changed, 104 insertions, 12 deletions
diff --git a/application/forms/EventEdit.php b/application/forms/EventEdit.php
index 1aa7d1d..fcacf9a 100755
--- a/application/forms/EventEdit.php
+++ b/application/forms/EventEdit.php
@@ -142,6 +142,54 @@ class Application_Form_EventEdit extends Zend_Form
));
}
+ if(isset($this->params['repeatType'])) {
+ $this->addElement('select', 'repeatType', array(
+ 'multioptions' => array(
+ 'day' => 'Daily',
+ 'week' => 'Once a week',
+ 'week2' => 'Every couple of weeks',
+ 'month' => 'Every month',
+ ),
+ 'required' => false,
+ 'value' => $this->params['repeatType'],
+ 'label' => 'Repeat Type:',
+ ));
+ } else {
+ $this->addElement('select', 'repeatType', array(
+ 'multioptions' => array(
+ 'day' => 'Daily',
+ 'week' => 'Once a week',
+ 'week2' => 'Every couple of weeks',
+ 'month' => 'Every month',
+ ),
+ 'required' => false,
+ 'label' => 'Repeat Type:',
+ ));
+ }
+
+ if(isset($this->params['repeatOption'])) {
+ $this->addElement('select', 'repeatOption', array(
+ 'multioptions' => array(
+ 'after' => 'After',
+ 'date' => 'Date',
+ ),
+ 'required' => false,
+ 'label' => 'Repeat End:',
+ 'value' => $this->params['repeatOption'],
+ 'onchange' => 'repeatOptionChanged("repeatOption");',
+ ));
+ } else {
+ $this->addElement('select', 'repeatOption', array(
+ 'multioptions' => array(
+ 'after' => 'After',
+ 'date' => 'Date',
+ ),
+ 'required' => false,
+ 'label' => 'Repeat End:',
+ 'onchange' => 'repeatOptionChanged("repeatOption");',
+ ));
+ }
+
if(isset($this->params['repeatEnd'])) {
$this->addElement('text', 'repeatEnd', array(
'filters' => array('StringTrim'),
@@ -149,8 +197,8 @@ class Application_Form_EventEdit extends Zend_Form
array('StringLength', false, array(0, 16)),
),
'required' => false,
- 'label' => 'Repeat end:',
- 'value' => $this->params['repeatEnd']
+ 'label' => 'Repeat End Date:',
+ 'value' => $this->params['repeatEnd'],
));
} else {
$this->addElement('text', 'repeatEnd', array(
@@ -159,30 +207,74 @@ class Application_Form_EventEdit extends Zend_Form
array('StringLength', false, array(0, 16)),
),
'required' => false,
- 'label' => 'Repeat end:',
- 'value' => 'mm/dd/yyyy H:min'
+ 'label' => 'Repeat End Date:',
+ 'value' => 'mm/dd/yyyy H:min',
));
}
- $this->addElement('text', 'participants', array(
+ if(isset($this->params['repeatings'])) {
+ $this->addElement('text', 'repeatings', array(
+ 'filters' => array('StringTrim'),
+ 'validators' => array(
+ array('StringLength', false, array(0, 16)),
+ ),
+ 'required' => false,
+ 'label' => 'Repeatings:',
+ 'value' => $this->params['repeatings'],
+ ));
+ } else {
+ $this->addElement('text', 'repeatings', array(
+ 'filters' => array('StringTrim'),
+ 'validators' => array(
+ array('StringLength', false, array(0, 16)),
+ ),
+ 'required' => false,
+ 'label' => 'Repeatings:',
+ 'value' => '1',
+ ));
+ }
+
+ if(isset($this->params['participants'])) {
+ $this->addElement('text', 'participants', array(
'filters' => array('StringTrim'),
'validators' => array(
- array('StringLength', false, array(0, 4)),
- ),
+ array('StringLength', false, array(0, 4)),
+ ),
'required' => false,
'label' => 'Participants:',
'value' => $this->params['participants'],
- ));
+ ));
+ } else {
+ $this->addElement('text', 'participants', array(
+ 'filters' => array('StringTrim'),
+ 'validators' => array(
+ array('StringLength', false, array(0, 4)),
+ ),
+ 'required' => false,
+ 'label' => 'Participants:',
+ ));
+ }
- $this->addElement('text', 'note', array(
+ if(isset($this->params['note'])) {
+ $this->addElement('text', 'note', array(
'filters' => array('StringTrim'),
'validators' => array(
- array('StringLength', false, array(0, 140)),
- ),
+ array('StringLength', false, array(0, 140)),
+ ),
'required' => false,
'label' => 'Note:',
'value' => $this->params['note'],
- ));
+ ));
+ } else {
+ $this->addElement('text', 'note', array(
+ 'filters' => array('StringTrim'),
+ 'validators' => array(
+ array('StringLength', false, array(0, 140)),
+ ),
+ 'required' => false,
+ 'label' => 'Note:',
+ ));
+ }
$poolfield = $this->createElement('select','pbs_poolID');
$poolfield ->setLabel('Pool:');