User tests: Successful: Unsuccessful:
Note: the point of it not being of type submit in that instance is because it is not allowed to have no search terms specified. It prevents the user from submitting the form if they don't enter anything. There is an onclick javascript which modified it from to a submit button when data has been entered. As such, for a small change it is better to make it of type button rather then submit. Mind you, I think it's better to validate server side and always let it be a submit button - use the javascript onClick event to validate, but for those who have javascript disabled let them submit and catch it server side. But that's a more involved bit of code.
I realized that beyond the problem of validation, Joomla 2.5.4, when accessed via IE7 (at least via IE9 with browser mode IE7), com_finder component button does not work. Test can be done on http://demo17.cloudaccess.net/using-joomla/extensions/components/search-component/smart-search.html . With enter on text field still working. This happens because IE7 need that button element has an explicit value equals to "submit" on type. So at least commit:137d207, the fist of this thread, solve this.
On commit:e7d5cd7 already has javascript to enable and disable submit via button and via pressing enter on input search field on component, and make possible change minimum length via template override, but still not make any additional check on back end, but I can do it.
Anyway. is allowed (or not a bad idea) to change "Allow Empty Search" or even add a new option on backend of com_finder for 2.5, or must wait for 3.0? Could be interesting to make possible flexible minimum length, because just one letter still more than one empty value, and at least two letters appears more reasonable.
Seems like sound logic to me. I'll test later on my Windows system to see how things behave.
The reason you allow for no terms is because you mght be using the filters and no terms at all.
Is this good to go? have people tested it? If so will you please report on the tracker so we can make it rtc or if not can we make it not pending anymore?
@elinw for me still ok from my last commit on this pull. But before do a merge, need confirmation that more people tested it just to be sure.
Also, if someone think that have a better way to do it, I can work a bit more on this pull. I will just avoid big changes before 3.0. I have a few ideas but they change com_finder parameters on administrator and could break layouts, so are not a good idea for Joomla 2.5 LTS and still better at least do in a different pull.
I have a feeling your (Solve HTML validation problem) patch may have been slightly out of date. As it doesn't
work properly for me.
I have created a new one here: it only solves the missing 'submit' value.
Jayflux@62bee6a
@Jayflux added a pull with just #190 (commits) on Jayflux@62bee6a that is now added to CMS.
So validation problem is OK now. All other changes, that also require add javascript, I will think again later for or maybe just a plain javascript version or made also a jQuery version instead of just a Mootools.
Thanks to everyone who participated in this pull.
Please cretae a tracker on Joomlacode and add reference here.