User tests: Successful: Unsuccessful:
Pull Request for Issue #20852.
Add attributes to joomla-field-switcher
if field is set to disable="true"
Make the field joomla-field-switcher
if field is set to disable="true"
Open global configuration and see outer html of the field "Search Engine Friendly URLs"
<joomla-field-switcher id="jform_sef" off-text="No" on-text="Yes" type="success">
<span class="switcher active has-success" tabindex="0" aria-checked="true" role="switch" aria-label="Yes"><input id="jform_sef0" name="jform[sef]" value="0" tabindex="-1" class="valid form-control-success" aria-invalid="false" type="radio"><input id="jform_sef1" name="jform[sef]" value="1" class="valid active form-control-success" tabindex="-1" checked="" aria-invalid="false" type="radio"><span class="switch"></span></span><span class="switcher-labels"><span class="switcher-label-0">No</span><span class="switcher-label-1 active">Yes</span></span></joomla-field-switcher>
Open /administrator/components/com_config/forms/application.xml
and change the field (insert disabled="true"
)
<field
name="sef"
type="radio"
label="COM_CONFIG_FIELD_SEF_URL_LABEL"
class="switcher"
default="1"
filter="boolean"
>
<option value="0">JNO</option>
<option value="1">JYES</option>
</field>
to
<field
name="sef"
type="radio"
label="COM_CONFIG_FIELD_SEF_URL_LABEL"
class="switcher"
disabled="true"
default="1"
filter="boolean"
>
<option value="0">JNO</option>
<option value="1">JYES</option>
</field>
Open again global configuration and see outer html of the field "Search Engine Friendly URLs". Now the text disabled=""
is added.
Apply this patch and see, that the text disabled="disabled"
is added to the joomla-field-switcher
and the inputs
of joomla-field-switcher
. See also, that the field now works as expected.
See also Issue #20852.
The field "Search Engine Friendly URLs" is disabled. You can not change it.
Nothing changed after making the field disabled. The field works as before. You can change the value.
Yes.
Status | New | ⇒ | Pending |
Category | ⇒ | JavaScript Repository Layout |
Labels |
Added:
?
|
@C-Lodder Thanks. Your are right, I forgot to disabling the keys
. I will have a look later.
A question ofttopic: What files should I put into this pr? only the js and css file build/webcomponents/ or the files after running node build.js --compilecescss
and node build.js --compilecejs
in the media folder?
Now this prevents being able to switch the switcher using the Enter and Esc keys on the keyboard.
What should I do with the hound violation?
@astridx can you please do the PR here: joomla/40-backend-template#395
We're moving to web components for the simple fields
I would say ignore the violation.
I created the PR here joomla/40-backend-template#445
Should I close this PR?
Closing as the pr got moved to the back end template repo.
Status | Pending | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2018-07-03 08:04:06 |
Closed_By | ⇒ | laoneo |
Are you this prevents being able to switch the switcher using the
Enter
andEsc
keys on the keyboard?If not, check the solution I provided in the issue