ShawnClake / UserExtended

An extension to the existing RainLab.User plugin for OctoberCMS
http://octobercms.com/plugin/clake-userextended
GNU General Public License v3.0
23 stars 12 forks source link

"Create" group button can be clicked with no input #69

Closed QuinnBast closed 7 years ago

QuinnBast commented 7 years ago

The "Create" button in the backend can be clicked with no information entered. Because the jQuery scripts I added do not consider the description box, the user can create a group or role with a description and no name or code.

image

Solution: run the validate function initially once the partial is loaded.

ShawnClake commented 7 years ago

@QuinnBast

In terms of formatting, I might suggest changing the error text to red, removing the capital on 'Name' and removing the word 'Error:'

For example it might say: "You need to enter a name for the role" (And the text is colored burgundy redish.

When running initially on partial load, try to make it so it only disables the create button instead of also showing up error text. Lastly, be careful because when editing a role, theoretically it should already be error free as it should auto fill the form. In this case, disabling the create button wouldn't make sense.

QuinnBast commented 7 years ago

Backend looks good!