mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-23 18:48:51 +02:00
Code cleanup
SVN:trunk[5973]
This commit is contained in:
@@ -19,6 +19,8 @@
|
||||
|
||||
namespace Combodo\iTop\Form\Field;
|
||||
|
||||
use Closure;
|
||||
|
||||
/**
|
||||
* A field for Dates and Date & Times, supporting custom formats
|
||||
*/
|
||||
@@ -32,7 +34,7 @@ class DateTimeField extends StringField
|
||||
* Overloaded constructor
|
||||
*
|
||||
* @param string $sId
|
||||
* @param Closure $onFinalizeCallback (Used in the $oForm->AddField($sId, ..., function() use ($oManager, $oForm, '...') { ... } ); )
|
||||
* @param \Closure $onFinalizeCallback (Used in the $oForm->AddField($sId, ..., function() use ($oManager, $oForm, '...') { ... } ); )
|
||||
*/
|
||||
public function __construct($sId, Closure $onFinalizeCallback = null)
|
||||
{
|
||||
@@ -52,13 +54,13 @@ class DateTimeField extends StringField
|
||||
|
||||
/**
|
||||
*
|
||||
* @param string $sDateTimeFormat
|
||||
* @param string $sPHPDateTimeFormat
|
||||
*
|
||||
* @return \Combodo\iTop\Form\Field\DateTimeField
|
||||
*/
|
||||
public function SetPHPDateTimeFormat($sDateTimeFormat)
|
||||
public function SetPHPDateTimeFormat($sPHPDateTimeFormat)
|
||||
{
|
||||
$this->sPHPDateTimeFormat = $sDateTimeFormat;
|
||||
$this->sPHPDateTimeFormat = $sPHPDateTimeFormat;
|
||||
|
||||
return $this;
|
||||
}
|
||||
@@ -68,18 +70,18 @@ class DateTimeField extends StringField
|
||||
*/
|
||||
public function GetJSDateTimeFormat()
|
||||
{
|
||||
return $this->sDateTimeFormat;
|
||||
return $this->sJSDateTimeFormat;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param string $sDateTimeFormat
|
||||
* @param string $sJSDateTimeFormat
|
||||
*
|
||||
* @return \Combodo\iTop\Form\Field\DateTimeField
|
||||
*/
|
||||
public function SetJSDateTimeFormat($sDateTimeFormat)
|
||||
public function SetJSDateTimeFormat($sJSDateTimeFormat)
|
||||
{
|
||||
$this->sDateTimeFormat = $sDateTimeFormat;
|
||||
$this->sJSDateTimeFormat = $sJSDateTimeFormat;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
@@ -113,7 +113,7 @@ abstract class MultipleChoicesField extends Field
|
||||
{
|
||||
if (array_key_exists($value, $this->currentValue))
|
||||
{
|
||||
unset($this->currentValue[$sId]);
|
||||
unset($this->currentValue[$value]);
|
||||
}
|
||||
return $this;
|
||||
}
|
||||
|
||||
@@ -19,7 +19,6 @@
|
||||
|
||||
namespace Combodo\iTop\Form\Field;
|
||||
|
||||
use \Combodo\iTop\Form\Field\TextField;
|
||||
class StringField extends TextField
|
||||
{
|
||||
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
namespace Combodo\iTop\Form\Field;
|
||||
|
||||
use Str;
|
||||
use Closure;
|
||||
|
||||
/**
|
||||
* Description of UrlField
|
||||
@@ -36,7 +37,7 @@ class UrlField extends StringField
|
||||
* Default constructor
|
||||
*
|
||||
* @param string $sId
|
||||
* @param Closure $onFinalizeCallback (Used in the $oForm->AddField($sId, ..., function() use ($oManager, $oForm, '...') { ... } ); )
|
||||
* @param \Closure $onFinalizeCallback (Used in the $oForm->AddField($sId, ..., function() use ($oManager, $oForm, '...') { ... } ); )
|
||||
*/
|
||||
public function __construct($sId, Closure $onFinalizeCallback = null)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user