Framework: Rename DateTime form element to DateTimePicker

refs #4440
This commit is contained in:
Eric Lippmann 2013-08-06 16:08:15 +02:00
parent 94ea09b552
commit 1f10cb3124
4 changed files with 10 additions and 11 deletions

View File

@ -33,7 +33,7 @@ use Zend_Form_Element_Xhtml;
/**
* Datetime form element
*/
class DateTime extends Zend_Form_Element_Xhtml
class DateTimePicker extends Zend_Form_Element_Xhtml
{
/**
* Default form view helper to use for rendering

View File

@ -28,7 +28,7 @@
namespace Monitoring\Form\Command;
use Icinga\Web\Form\Element\DateTime;
use Icinga\Web\Form\Element\DateTimePicker;
use \DateTime as PhpDateTime;
use \DateInterval;
use Icinga\Web\Form\Element\Note;
@ -94,14 +94,14 @@ class AcknowledgeForm extends CommandForm
$interval = new DateInterval('PT1H'); // Add 3600 seconds
$now->add($interval);
$expireTime = new DateTime(
$expireTime = new DateTimePicker(
array(
'name' => 'expiretime',
'label' => t('Expire time'),
'value' => $now->format($this->getDateFormat())
)
);
$this->addElements(array($expireNote, $expireCheck, $expireTime));
} else {
$this->addElements(array($expireNote, $expireCheck));

View File

@ -28,7 +28,7 @@
namespace Monitoring\Form\Command;
use Icinga\Web\Form\Element\DateTime;
use Icinga\Web\Form\Element\DateTimePicker;
use Zend_Form_Element_Checkbox;
use DateTime as PhpDateTime;
@ -45,8 +45,7 @@ class RescheduleNextCheckForm extends WithChildrenCommandForm
{
$now = new PhpDateTime();
$dateElement = new DateTime(
$dateElement = new DateTimePicker(
array(
'name' => 'checktime',
'label' => t('Check time'),

View File

@ -28,7 +28,7 @@
namespace Monitoring\Form\Command;
use Icinga\Web\Form\Element\DateTime;
use Icinga\Web\Form\Element\DateTimePicker;
use Icinga\Protocol\Commandpipe\Downtime;
use Icinga\Protocol\Commandpipe\Comment;
use \DateTime as PhpDateTime;
@ -146,7 +146,7 @@ class ScheduleDowntimeForm extends WithChildrenCommandForm
list($timestampStart, $timestampEnd) = $this->generateDefaultTimestamps();
$dateTimeStart = new DateTime(
$dateTimeStart = new DateTimePicker(
array(
'name' => 'starttime',
'label' => t('Start time'),
@ -156,7 +156,7 @@ class ScheduleDowntimeForm extends WithChildrenCommandForm
$dateTimeStart->setRequired(true);
$dateTimeStart->addValidator($this->createDateTimeValidator(), true);
$dateTimeEnd = new DateTime(
$dateTimeEnd = new DateTimePicker(
array(
'name' => 'endtime',
'label' => t('End time'),
@ -188,7 +188,7 @@ class ScheduleDowntimeForm extends WithChildrenCommandForm
);
$this->enableAutoSubmit(array('type'));
if ($this->getRequest()->getPost('type') === self::TYPE_FLEXIBLE) {
$hoursText = new Zend_Form_Element_Text('hours');
$hoursText->setLabel(t('Flexible duration'));