- LSformElement_text : l'autoGenerate devient optionnel lors de la création

This commit is contained in:
Benjamin Renard 2008-10-14 14:33:51 +00:00
parent 8f2a3c12d6
commit c8badaaa6c
2 changed files with 3 additions and 2 deletions

View file

@ -165,7 +165,8 @@ $GLOBALS['LSobjects']['LSeepeople'] = array (
'html_type' => 'text',
'html_options' => array(
'generate_value_format' => '%{givenName} %{sn}',
'autoGenerateOnModify' => true // default : false
'autoGenerateOnModify' => true, // default : false
'autoGenerateOnCreate' => true // default : false
),
'required' => 1,
'validation' => 'valid',

View file

@ -29,7 +29,7 @@ var LSformElement_text_field = new Class({
if (this.params.autoGenerateOnModify) {
force = 1;
}
if ((this.input.value=='')||(force)) {
if (((this.input.value=='')&&(this.params.autoGenerateOnCreate))||(force)) {
this.dependsFields = this.parent.getDependsFields(this.format);
this.dependsFields.each(function(el) {
var input = this.parent.getInput.bind(this.parent)(el);