From c8badaaa6c9531753c545bacb725b7765f43d3a0 Mon Sep 17 00:00:00 2001 From: Benjamin Renard Date: Tue, 14 Oct 2008 14:33:51 +0000 Subject: [PATCH] =?UTF-8?q?-=20LSformElement=5Ftext=20:=20l'autoGenerate?= =?UTF-8?q?=20devient=20optionnel=20lors=20de=20la=20cr=C3=A9ation?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- trunk/conf/LSobjects/config.LSobjects.LSeepeople.php | 3 ++- trunk/includes/js/LSformElement_text_field.js | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/trunk/conf/LSobjects/config.LSobjects.LSeepeople.php b/trunk/conf/LSobjects/config.LSobjects.LSeepeople.php index 1ecf9c48..650a87db 100644 --- a/trunk/conf/LSobjects/config.LSobjects.LSeepeople.php +++ b/trunk/conf/LSobjects/config.LSobjects.LSeepeople.php @@ -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', diff --git a/trunk/includes/js/LSformElement_text_field.js b/trunk/includes/js/LSformElement_text_field.js index 7f953082..27a5b020 100644 --- a/trunk/includes/js/LSformElement_text_field.js +++ b/trunk/includes/js/LSformElement_text_field.js @@ -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);