? ? Pending

User tests: Successful: Unsuccessful:

avatar chmst
chmst
16 Jun 2017

Summary of Changes
If there is a minyear in the future or a maxyear in the past, this pr sets the todaybutton attribute to "false"

Testing Instructions
Take any calendar field, for examle com_content/models/forms/article.xml
Modify the field "publish_up" like this, i.e. add the attribute maxyear="-2" or minyear="+4".

	<field
		id="publish_up"
		name="publish_up"
		type="calendar"
		label="JGLOBAL_FIELD_PUBLISH_UP_LABEL"
		description="JGLOBAL_FIELD_PUBLISH_UP_DESC"
		class="inputbox"
		translateformat="true"
		showtime="true"
		size="22"
		filter="user_utc"
		minyear="+1"
	/>

Open an article for editing and go the publishing tab.

Expected result
The calendar takes only Dates for the next year or later.

Actual result
If the the attribute todayButton is not explictely set to "false", there is a today button. The user can enter todays date

Apply the patch and refresh, the today button has gone

Documentation Changes Required
No

avatar chmst chmst - open - 16 Jun 2017
avatar chmst chmst - change - 16 Jun 2017
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 16 Jun 2017
Category Libraries
avatar chmst chmst - change - 16 Jun 2017
The description was changed
avatar chmst chmst - edited - 16 Jun 2017
avatar chmst chmst - change - 16 Jun 2017
The description was changed
avatar chmst chmst - edited - 16 Jun 2017
avatar chmst chmst - change - 16 Jun 2017
The description was changed
avatar chmst chmst - edited - 16 Jun 2017
avatar chmst chmst - change - 16 Jun 2017
Labels Added: ?
avatar chmst
chmst - comment - 16 Jun 2017

Tabs removed, thank you for the hint, @Quy.

avatar franz-wohlkoenig franz-wohlkoenig - test_item - 17 Jun 2017 - Tested successfully
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 17 Jun 2017

I have tested this item successfully on 5932f8d

Modified administrator/components/com_content/models/forms/article.xml using given Example. No "Today"-Button, only next Year (2018) is shown.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/16730.

avatar richard67
richard67 - comment - 17 Jun 2017

@franz-wohlkoenig Strange, I just tested, and with patch not only the "Today" but also the "Clear" button disappeared. Can you confirm that?

avatar franz-wohlkoenig franz-wohlkoenig - test_item - 17 Jun 2017 - Tested unsuccessfully
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 17 Jun 2017

I have tested this item ? unsuccessfully on 5932f8d
Thanks for hint, @richard67. Using PR "Clear"- and "Today"-Button are not shown.
bildschirmfoto 2017-06-17 um 13 59 30


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/16730.
avatar richard67
richard67 - comment - 17 Jun 2017

From code review this PR seems to be OK for me. I have no idea whiy it makes the "Clear" button disappear because this button is not handled in the function which is modified by this PR.

avatar chmst
chmst - comment - 17 Jun 2017

This is another issue, independent from this one. If the todaybutton is set to false, no matter which values are in maxyear and minyear, the "clear" button is net rendered.
I do not know if this is a bug or a feature ;)

avatar richard67
richard67 - comment - 17 Jun 2017

How do I set the button to false for a test without this PR?


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/16730.

avatar chmst
chmst - comment - 17 Jun 2017

Add the attribute todaybutton="false" in any calendarfield.

avatar chmst
chmst - comment - 17 Jun 2017

I've found the concerning piece of code.

		if (this.params.showsTodayBtn) {
			this._nav_save = hh(JoomlaCalLocale.save, '', 100, 'a', '', 'js-btn btn btn-clear', {"data-action": "clear"});

So this seems to be a feature.

avatar richard67 richard67 - test_item - 17 Jun 2017 - Tested successfully
avatar richard67
richard67 - comment - 17 Jun 2017

I have tested this item successfully on 5932f8d

Tested by modifying administrator/com_content/models/forms/article.xml (and not com_content/models/forms/article.xml as the testing instructions say) in the described way.

The fact that the "Clear" button disappears is not caused by this PR. I verified this by adding todaybutton="false" to the attibutes of the publish_down field.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/16730.

avatar richard67
richard67 - comment - 17 Jun 2017

@franz-wohlkoenig Can you alter your test result to "success"? We found that it is not a problem caused by this PR, see comments above and in my test result. No need to test again, there was nothing changed in this PR meanwhile.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/16730.

avatar richard67
richard67 - comment - 17 Jun 2017

@chmst An ugly feature from my point of view. If you think the same and will make a PR to change that, I will help with a test.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/16730.

avatar chmst
chmst - comment - 17 Jun 2017

@richard67 thank you for testing. And yes, this behaviour is faulty in my opinion too. I'll open an issue.

avatar franz-wohlkoenig franz-wohlkoenig - test_item - 17 Jun 2017 - Tested successfully
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 17 Jun 2017

I have tested this item successfully on 5932f8d


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/16730.

avatar franz-wohlkoenig franz-wohlkoenig - change - 17 Jun 2017
Status Pending Ready to Commit
avatar joomla-cms-bot joomla-cms-bot - edited - 17 Jun 2017
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 17 Jun 2017

RTC after two successful tests.

avatar rdeutz rdeutz - close - 20 Jun 2017
avatar rdeutz rdeutz - merge - 20 Jun 2017
avatar rdeutz rdeutz - change - 20 Jun 2017
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2017-06-20 11:27:23
Closed_By rdeutz
Labels Added: ?

Add a Comment

Login with GitHub to post a comment