?
avatar rjcf18
rjcf18
27 Mar 2017

Steps to reproduce the issue

Go to Users, Manage, select a user and when on the Edit Profile for a user click the close button.

deepinscreenshot20170327043503

Expected result

Clicking in the close button shouldn't produce errors and go back to the previous view.

Actual result

Clicking the close button produces an error and doesn't exit Edit Profile to return to the previous view.

deepinscreenshot20170327031344

deepinscreenshot20170327030153

System information (as much as possible)

Joomla! 4.0.0-dev
OS: Linux Deepin 15.3
Kernel: 4.4.0-3-deepin-amd64
Google Chrome: 56.0.2924.76 (64 bit)
PHP: 7.0.12-2

Additional comments

Votes

# of Users Experiencing Issue
1/1
Average Importance Score
3.00

avatar rjcf18 rjcf18 - open - 27 Mar 2017
avatar joomla-cms-bot joomla-cms-bot - change - 27 Mar 2017
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 27 Mar 2017
avatar marcochirienti
marcochirienti - comment - 27 Mar 2017

Actually none of the buttons in the edit view is working (exception made for the help button).
This is also true for the other edit views of the component:

administrator/components/com_users/views/group/tmpl/edit.php
administrator/components/com_users/views/level/tmpl/edit.php
administrator/components/com_users/views/note/tmpl/edit.php
administrator/components/com_users/views/user/tmpl/edit.php

The problem is that the form id has been changed.
The buttons call the Joomla.submitbutton() function and the Joomla.submitbutton() calls the Joomla.submitform() function.

	/**
	 * Default function. Usually would be overriden by the component
	 */
	Joomla.submitbutton = function( pressbutton ) {
		Joomla.submitform( pressbutton );
	};

The Joomla.submitform() function is looking for the form id "adminForm".

	/**
	 * Generic submit form
	 */
	Joomla.submitform = function(task, form, validate) {

		if (!form) {
			form = document.getElementById('adminForm');
		}

If this is not intentional and is not part of a planned development process, we need to revert the form id to "adminForm".

avatar rjcf18
rjcf18 - comment - 27 Mar 2017

Yes that's it. I've tried placing the form-validate class in the form html and it worked.

avatar marcochirienti
marcochirienti - comment - 27 Mar 2017

Changed a few days ago with this PR #14710.

avatar dgt41
dgt41 - comment - 27 Mar 2017

Check #14931

avatar rjcf18 rjcf18 - change - 27 Mar 2017
Title
[4.0] com_users: Close button not working in Edit Profile view
[4.0] com_users: Buttons not working in Edit Profile view
avatar rjcf18 rjcf18 - edited - 27 Mar 2017
avatar rjcf18
rjcf18 - comment - 27 Mar 2017

Ah ok right ;) I was going to make a PR to fix that.

avatar dgt41
dgt41 - comment - 27 Mar 2017

@rjcf18 please make a PR for all the rest forms that are missing the form-validate class

avatar marcochirienti
marcochirienti - comment - 27 Mar 2017

Thanks @dgt41

avatar rjcf18
rjcf18 - comment - 27 Mar 2017

Sure will do that @dgt41 .

avatar rjcf18 rjcf18 - change - 30 Mar 2017
Status New Closed
Closed_Date 0000-00-00 00:00:00 2017-03-30 12:51:30
Closed_By rjcf18
avatar rjcf18 rjcf18 - close - 30 Mar 2017

Add a Comment

Login with GitHub to post a comment