Changeset 1692
- Timestamp:
- 03/09/10 11:31:49 (5 months ago)
- Location:
- trunk/plugins/ullFlowPlugin
- Files:
-
- 3 modified
-
lib/form/ullFlowForm.php (modified) (2 diffs)
-
modules/ullFlow/lib/BaseUllFlowActions.class.php (modified) (3 diffs)
-
modules/ullFlow/templates/editSuccess.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/plugins/ullFlowPlugin/lib/form/ullFlowForm.php
r1688 r1692 28 28 $this->getWidgetSchema()->offsetSet('duration_seconds', new ullWidgetTimeDurationWrite()); 29 29 $this->getValidatorSchema()->offsetSet('duration_seconds', new ullValidatorTimeDuration(array('required' => false))); 30 31 $this->getWidgetSchema()->offsetSet('effort_date', new ullWidgetDateWrite(array(), array('size' => 10))); 32 $this->getValidatorSchema()->offsetSet('effort_date', new sfValidatorDate(array('required' => false))); 30 33 } 31 34 } … … 43 46 $this->setDefaults(array_merge($this->getDefaults(), 44 47 $this->object->getVirtualValuesAsArray())); 48 49 if (!$this->getDefault('effort_date')) 50 { 51 $this->setDefault('effort_date', date('Y-m-d')); 52 } 45 53 } 46 54 -
trunk/plugins/ullFlowPlugin/modules/ullFlow/lib/BaseUllFlowActions.class.php
r1688 r1692 173 173 ))); 174 174 175 $this->saveEffort Duration();175 $this->saveEffort(); 176 176 177 177 if (!$this->isStatusOnlyRequestAction()) … … 930 930 * @return none 931 931 */ 932 protected function saveEffort Duration()932 protected function saveEffort() 933 933 { 934 934 $memory = $this->doc->findLatestMemory(); 935 935 $projectId = $this->doc->ull_project_id; 936 936 $duration = $this->generator->getForm()->getValue('duration_seconds'); 937 $date = $this->generator->getForm()->getValue('effort_date'); 937 938 938 939 if ($duration && $projectId) … … 941 942 $reporting->ull_project_id = $projectId; 942 943 $reporting->ull_user_id = sfContext::getInstance()->getUser()->getAttribute('user_id'); 943 $reporting->date = date('Y-m-d');944 $reporting->date = $date; 944 945 $reporting->duration_seconds = $duration; 945 946 $reporting->linked_model = 'UllFlowMemory'; -
trunk/plugins/ullFlowPlugin/modules/ullFlow/templates/editSuccess.php
r1688 r1692 54 54 <?php echo $generator->getForm()->offsetGet('duration_seconds')->renderError() ?> 55 55 <dfn><?php echo __('Hours : minutes', null, 'ullFlowMessages') ?></dfn> 56 <?php echo __('am', null, 'common') ?> 57 <?php echo $generator->getForm()->offsetGet('effort_date')->render() ?> 58 <?php echo $generator->getForm()->offsetGet('effort_date')->renderError() ?> 59 56 60 </p> 57 61 <?php endif ?>
