X-Git-Url: https://git-public.kairo.at/?a=blobdiff_plain;f=classes%2Fdocument.php-class;h=198296f3e1a7eaa5ac8906ebec66f1cb3f2b5273;hb=0ffe81c3abbc0605cf010a4872a01363a26f408f;hp=f215f7bc36a275dbc54b320a6f0e7d60e8ceb508;hpb=d7403a92eac6ca945c5d163d860c0753be834f0a;p=php-utility-classes.git diff --git a/classes/document.php-class b/classes/document.php-class index f215f7b..198296f 100755 --- a/classes/document.php-class +++ b/classes/document.php-class @@ -173,8 +173,7 @@ class ExtendedDocument extends DOMDocument { // returns an ExtendedElement that is an HTML with the given src and alt attributes (set to '' by default) // // public function createElementForm($action, $method, $name) - // returns an ExtendedElement that is an HTML
that is a child of an HTML
- // with the given action, method, and name + // returns an ExtendedElement that is an HTML with the given action, method, and name // // public function createElementInputHidden($name, $value) // returns an ExtendedElement that is an HTML of type 'hidden' with the given name and value @@ -554,23 +553,25 @@ class ExtendedDocument extends DOMDocument { } public function createElementInputDate($name, $id = null, $min = null, $max = null, $value = null) { - $telfield = $this->createElement('input'); - $telfield->setAttribute('type', 'date'); - if (!is_null($id)) { $telfield->setAttribute('id', $id); } - if (!is_null($min)) { $rgfield->setAttribute('min', $min); } - if (!is_null($max)) { $rgfield->setAttribute('max', $max); } - if (!is_null($value)) { $telfield->setAttribute('value', $value); } - return $telfield; + $dtfield = $this->createElement('input'); + $dtfield->setAttribute('type', 'date'); + if (!is_null($id)) { $dtfield->setAttribute('id', $id); } + $dtfield->setAttribute('name', $name); + if (!is_null($min)) { $dtfield->setAttribute('min', $min); } + if (!is_null($max)) { $dtfield->setAttribute('max', $max); } + if (!is_null($value)) { $dtfield->setAttribute('value', $value); } + return $dtfield; } public function createElementInputTime($name, $id = null, $min = null, $max = null, $value = null) { - $telfield = $this->createElement('input'); - $telfield->setAttribute('type', 'time'); - if (!is_null($id)) { $telfield->setAttribute('id', $id); } - if (!is_null($min)) { $rgfield->setAttribute('min', $min); } - if (!is_null($max)) { $rgfield->setAttribute('max', $max); } - if (!is_null($value)) { $telfield->setAttribute('value', $value); } - return $telfield; + $timefield = $this->createElement('input'); + $timefield->setAttribute('type', 'time'); + if (!is_null($id)) { $timefield->setAttribute('id', $id); } + $timefield->setAttribute('name', $name); + if (!is_null($min)) { $timefield->setAttribute('min', $min); } + if (!is_null($max)) { $timefield->setAttribute('max', $max); } + if (!is_null($value)) { $timefield->setAttribute('value', $value); } + return $timefield; } public function createElementInputColor($name, $id = null, $value = null) {