-
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
0.5.0a \Phalcon\Tag inconsistency #31
Comments
Same thing happens with textArea, passwordField, hiddenField, textField etc. Also one minor thing I noticed is that the attributes do not appear in constant order. This is very minor and has no effect in the operation of the component or the generation of the HTML but it is a nice to have. For instance I have seen: <element type=X id="" attribute="" ... name="" /> but also <element type=X id="" name="" attribute="" ... /> Again it would be nice if the order of the attributes remains constant. A suggestion is: <element type="" name="" id="" value="" attribute="" .... /> (that is of course if id and/or value are present. |
Also \Phalcon\Tag::image does not close the tag as XHTML. This is a minor one but it helps being consistent. \Phalcon\Tag::image('img/hello.gif') creates: <img src='/img/hello.gif'> (with a PHP_EOL at the end. It should be: <img src='/img/hello.gif' /> (with a PHP_EOL at the end). I am not sure why a PHP_EOL is needed at the end of the output. I would personally remove it. |
resetInput() I have the following code: use \Phalcon\Tag as Tg;
$options = 'some_field_name';
$expected = '<input type="text" id="some_field_name" value="Wall-E" name="some_field_name" />';
Tg::setDefault('some_field_name', 'Wall-E');
$actual = Tg::textField($options);
$this->assertEquals($expected, $actual, 'resetInput before does not contains a value');
Tg::resetInput();
$expected = '<input type="text" id="some_field_name" value="" name="some_field_name" />';
$this->assertEquals($expected, $actual, 'resetInput after contains a value'); The results are: Expected :<input type="text" id="some_field_name" value="" name="some_field_name" />
Actual :<input type="text" id="some_field_name" value="Wall-E" name="some_field_name" /> So unless I got this wrong, resetInput() does not reset the setDefault() earlier. |
Thanks, now these issues are part of the next alpha. |
Thanks!. I might add a couple more (if I find any) regarding Tag. Still working on the list of methods. |
Hi Nikolaos, these problems are now fixed in 0.5.0a3, thanks |
Awesome!!! |
I think that \Phalcon\Tag is not generating content correctly.
The syntax is: \Phalcon\Tag(array(name, <option => value>));
The above produces:
As you can see the above does set the id="myid" but it also sets id="myname".
Expected behavior: If id is in the list of parameters, it should override the preset one.
The above produces:
As you can see this one also produces a duplicate id but correctly changes the 'name' attribute is passed in the parameters.
The text was updated successfully, but these errors were encountered: