User tests: Successful: Unsuccessful:
Pull Request for Issue #31345 and #31355
Adds a check to ensure that the client name can not be saved with just blank characters
Adds a check to ensure that the contact name can not be saved with just blank characters
Repeat above for Client Name
Article is saved
Article is not saved with error message saying why
none
Status | New | ⇒ | Pending |
Category | ⇒ | Administration com_banners |
Labels |
Added:
?
|
With spaces in Name or in Contact Name the error message says in both cases:
Save failed with the following error: Please provide a valid, non-blank title.
Can it be adjusted to say Name or Contact Name as appropriate?
it could be - means more strings for translators - is it really needed?
Why this PR?
Is'nt #31354 fine?
If something has to be modified there, why not propose it there?
(I'm thinking of the maybe useless part concerning try/catch)
Also: JLIB_CMS_WARNING_PROVIDE_VALID_NAME uses the wording title
. New strings are correctly used in #31354
Note: instructions are wrong as this does not concern article.
Sorry I didnt see the other PR - I just saw two open issues and wrote a PR to fix them - there was no reference on those issues
As I said already I did not see the other PR as no one had referenced it on the issues and the issues were left open
The other PR is from a new contributor, so maybe that's why it didn't reference the issues, or only one of them. Sure we should try not to discourage him, but if it is better to use this PR here then I can try to find some nice words there and ask him to close his PR.
I looked into how to solve this problem client side. It would be nice if we could get a Javascript guru to take this on:
Add class="validate-notwhite" to any form field that is required but must not be white space.
As an experiment, put this in the code that displays the form:
$doc->addScriptDeclaration('
jQuery(document).ready(function(){
document.formvalidator.setHandler(\'notwhite\',
function (value) {
return value.trim().length > 0;
});
});
');
It would need something else for a field that is not required but if used must not be white space.
I have tested this item
Tested successfully in Beta6-dev of 16 November
I have tested this item
Status | Pending | ⇒ | Ready to Commit |
RTC
Imho I don’t think this pr is better than the other one.
A simple reason: the other pr has clear new strings for the error.
The other possible reason is the try/catch code which may be missing here.
Status | Ready to Commit | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2020-11-16 23:57:09 |
Closed_By | ⇒ | brianteeman | |
Labels |
Added:
?
|
@brianteeman Do I understand right that this PR here makes PR #31354 obsolete?