NEW The setup for mandatory field can be done on combo list too.

This commit is contained in:
Laurent Destailleur
2021-02-15 15:37:43 +01:00
parent fd5fe5b427
commit b98a654321
2 changed files with 5 additions and 2 deletions

View File

@@ -7872,7 +7872,10 @@ function printCommonFooter($zone = 'private')
// Add property 'required' on input // Add property 'required' on input
print 'jQuery("input[name=\''.$paramkey.'\']").prop(\'required\',true);'."\n"; print 'jQuery("input[name=\''.$paramkey.'\']").prop(\'required\',true);'."\n";
print 'jQuery("textarea[name=\''.$paramkey.'\']").prop(\'required\',true);'."\n"; print 'jQuery("textarea[name=\''.$paramkey.'\']").prop(\'required\',true);'."\n";
print 'jQuery("select[name=\''.$paramkey.'\']").prop(\'required\',true);'."\n"; // required on a select works only if key is "", this does not happen in Dolibarr print '// required on a select works only if key is "", so we add the required attributes but also we reset the key -1 or 0 to an empty string'."\n";
print 'jQuery("select[name=\''.$paramkey.'\']").prop(\'required\',true);'."\n";
print 'jQuery("select[name=\''.$paramkey.'\'] option[value=\'-1\']").prop(\'value\', \'\');'."\n";
print 'jQuery("select[name=\''.$paramkey.'\'] option[value=\'0\']").prop(\'value\', \'\');'."\n";
} }
} }
} }

View File

@@ -1987,7 +1987,7 @@ SocialNetworkSetup=Setup of module Social Networks
EnableFeatureFor=Enable features for <strong>%s</strong> EnableFeatureFor=Enable features for <strong>%s</strong>
VATIsUsedIsOff=Note: The option to use Sales Tax or VAT has been set to <strong>Off</strong> in the menu %s - %s, so Sales tax or Vat used will always be 0 for sales. VATIsUsedIsOff=Note: The option to use Sales Tax or VAT has been set to <strong>Off</strong> in the menu %s - %s, so Sales tax or Vat used will always be 0 for sales.
SwapSenderAndRecipientOnPDF=Swap sender and recipient address position on PDF documents SwapSenderAndRecipientOnPDF=Swap sender and recipient address position on PDF documents
FeatureSupportedOnTextFieldsOnly=Warning, feature supported on text fields only. Also an URL parameter action=create or action=edit must be set OR page name must end with 'new.php' to trigger this feature. FeatureSupportedOnTextFieldsOnly=Warning, feature supported on text fields and combo lists only. Also an URL parameter action=create or action=edit must be set OR page name must end with 'new.php' to trigger this feature.
EmailCollector=Email collector EmailCollector=Email collector
EmailCollectorDescription=Add a scheduled job and a setup page to scan regularly email boxes (using IMAP protocol) and record emails received into your application, at the right place and/or create some records automatically (like leads). EmailCollectorDescription=Add a scheduled job and a setup page to scan regularly email boxes (using IMAP protocol) and record emails received into your application, at the right place and/or create some records automatically (like leads).
NewEmailCollector=New Email Collector NewEmailCollector=New Email Collector