? ? Pending

User tests: Successful: Unsuccessful:

avatar Bakual
Bakual
7 Apr 2017

Pull Request for Issue #13665 .

Summary of Changes

This PR adds support for readonly/disabled editors

Testing Instructions

  • Create a new custom field of the type "editor" and either set the permission so it is not editable (that's the case by default in the contact form) or enabled readonly or disabled in the field options
  • Check the item where the field appears
  • Test with all three core editors (TinyMCE, Codemirror, None)

Another test:

  • Edit the editor formfield spec in a form XML and add a readonly="true" attribute to it. Eg edit /administrator/models/forms/article.xml and change
<field 
	name="articletext"
	type="editor"
	label="COM_CONTENT_FIELD_ARTICLETEXT_LABEL"
	description="COM_CONTENT_FIELD_ARTICLETEXT_DESC"
	filter="JComponentHelper::filterText"
	buttons="true"
/>

to

<field
	name="articletext"
	type="editor"
	label="COM_CONTENT_FIELD_ARTICLETEXT_LABEL"
	description="COM_CONTENT_FIELD_ARTICLETEXT_DESC"
	filter="JComponentHelper::filterText"
	buttons="true"
	readonly="true"
/>
  • Check the item

Expected result

Editor should be readonly/disabled.

Actual result

You can edit the content fine.

Documentation Changes Required

https://docs.joomla.org/Editor_form_field_type can now have added attributes "readonly" and "disabled" (they both do the same thing here).

avatar Bakual Bakual - open - 7 Apr 2017
avatar Bakual Bakual - change - 7 Apr 2017
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 7 Apr 2017
Category Libraries Front End Plugins
avatar brianteeman brianteeman - test_item - 7 Apr 2017 - Tested unsuccessfully
avatar brianteeman
brianteeman - comment - 7 Apr 2017

I have tested this item ? unsuccessfully on 7fef75c

with tinymce as the editor I created an editor field for a contact and set it to read only.
I created a new contact and can confirm that the tinymce editor is disabled BUT I then click on the Toggle Editor and can enter text into the editor AND this text will be saved


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

avatar Bakual
Bakual - comment - 7 Apr 2017

Good catch, now to figure out where that comes from ?

avatar Bakual Bakual - change - 7 Apr 2017
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - change - 7 Apr 2017
Category Libraries Front End Plugins Layout Libraries Front End Plugins
avatar Bakual
Bakual - comment - 7 Apr 2017

@brianteeman Can you try again? I think I fixed that now.

avatar zero-24
zero-24 - comment - 7 Apr 2017
avatar brianteeman
brianteeman - comment - 7 Apr 2017

@Bakual that fixed that bug

avatar Bakual
Bakual - comment - 7 Apr 2017

Drone is complaining ;)

@zero-24 Fixed ?

@brianteeman Thanks for the confirmation.

avatar franz-wohlkoenig franz-wohlkoenig - test_item - 8 Apr 2017 - Tested successfully
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 8 Apr 2017

I have tested this item successfully on 58e0ce3


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

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 8 Apr 2017

@brianteeman can i alter your Test as successfully?


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

avatar AlexRed AlexRed - test_item - 8 Apr 2017 - Tested successfully
avatar AlexRed
AlexRed - comment - 8 Apr 2017

I have tested this item successfully on 58e0ce3

Patch ok for me


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

avatar franz-wohlkoenig franz-wohlkoenig - change - 8 Apr 2017
Status Pending Ready to Commit
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 8 Apr 2017

RTC after two successful tests.

avatar brianteeman
brianteeman - comment - 8 Apr 2017

@brianteeman can i alter your Test as successfully?

No - I did not fully test it - I only tested the one small part

avatar rdeutz rdeutz - change - 8 Apr 2017
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2017-04-08 18:29:09
Closed_By rdeutz
Labels Added: ?
avatar rdeutz rdeutz - close - 8 Apr 2017
avatar rdeutz rdeutz - merge - 8 Apr 2017

Add a Comment

Login with GitHub to post a comment