diff --git a/base/gamuform.php b/base/gamuform.php index b0f6f20..1a8c431 100644 --- a/base/gamuform.php +++ b/base/gamuform.php @@ -46,29 +46,31 @@ function gamuform_declarer_tables_objets_sql($tables) { 'type' => 'gamuform', 'principale' => 'oui', 'field'=> array( - 'id_gamuform' => 'bigint(21) NOT NULL', - 'titre' => 'varchar(255) NOT NULL DEFAULT ""', - 'label' => 'varchar(255) NOT NULL DEFAULT ""', - 'type' => 'varchar(255) NOT NULL DEFAULT ""', - 'class_container' => 'varchar(255) NOT NULL DEFAULT ""', - 'class' => 'varchar(255) NOT NULL DEFAULT ""', - 'choix' => "text NOT NULL", - 'defaut' => 'varchar(255) NOT NULL DEFAULT ""', - 'statut' => 'varchar(20) DEFAULT "0" NOT NULL', - 'date' => 'datetime NOT NULL DEFAULT "0000-00-00 00:00:00"', - 'rang' => 'tinyint(4) NOT NULL', - 'maj' => 'TIMESTAMP' + 'id_gamuform' => 'bigint(21) NOT NULL', + 'objet' => 'VARCHAR(25) DEFAULT "" NOT NULL', + 'titre' => 'varchar(255) NOT NULL DEFAULT ""', + 'label' => 'varchar(255) NOT NULL DEFAULT ""', + 'type' => 'varchar(255) NOT NULL DEFAULT ""', + 'class_container' => 'varchar(255) NOT NULL DEFAULT ""', + 'class' => 'varchar(255) NOT NULL DEFAULT ""', + 'choix' => "text NOT NULL", + 'defaut' => 'varchar(255) NOT NULL DEFAULT ""', + 'statut' => 'varchar(20) DEFAULT "0" NOT NULL', + 'date' => 'datetime NOT NULL DEFAULT "0000-00-00 00:00:00"', + 'rang' => 'tinyint(4) NOT NULL', + 'maj' => 'TIMESTAMP' ), 'key' => array( - 'PRIMARY KEY' => 'id_gamuform', - 'KEY statut' => 'statut', + 'PRIMARY KEY' => 'id_gamuform', + 'KEY objet' => 'objet', + 'KEY statut' => 'statut', ), 'titre' => 'titre AS titre, "" AS lang', 'date' => 'date', //'champs_editables' => array('titre'), //'champs_versionnes' => array('titre'), //'rechercher_champs' => array(), - 'tables_jointures' => array('spip_gamuforms_liens'), + 'tables_jointures' => array('spip_gamuforms_valeurs'), 'statut_textes_instituer' => array( 'prepa' => 'texte_statut_en_cours_redaction', 'publie' => 'texte_statut_publie', @@ -101,16 +103,15 @@ function gamuform_declarer_tables_objets_sql($tables) { */ function gamuform_declarer_tables_auxiliaires($tables) { - $tables['spip_gamuforms_liens'] = array( + $tables['spip_gamuforms_valeurs'] = array( 'field' => array( 'id_gamuform' => 'bigint(21) DEFAULT "0" NOT NULL', 'id_objet' => 'bigint(21) DEFAULT "0" NOT NULL', 'objet' => 'VARCHAR(25) DEFAULT "" NOT NULL', - 'type' => 'VARCHAR(6) DEFAULT "form" NOT NULL', 'valeur' => "text NOT NULL", ), 'key' => array( - 'PRIMARY KEY' => 'id_gamuform,id_objet,objet,type', + 'PRIMARY KEY' => 'id_gamuform,id_objet,objet', 'KEY id_gamuform' => 'id_gamuform', ) ); diff --git a/content/creer_gamuform.html b/content/creer_gamuform.html new file mode 100644 index 0000000..61f2392 --- /dev/null +++ b/content/creer_gamuform.html @@ -0,0 +1,6 @@ +
+

creer formulaire pour les clients

+ + + +
diff --git a/formulaires/editer_gamuform.html b/formulaires/editer_gamuform.html index 22d9303..3807ce3 100644 --- a/formulaires/editer_gamuform.html +++ b/formulaires/editer_gamuform.html @@ -9,6 +9,9 @@
+ + + [(#REM) ajouter les saisies supplementaires : extra et autre, a cet endroit ]

diff --git a/gamuform_administrations.php b/gamuform_administrations.php index 058c3dd..5fc5109 100644 --- a/gamuform_administrations.php +++ b/gamuform_administrations.php @@ -26,7 +26,7 @@ if (!defined('_ECRIRE_INC_VERSION')) { function gamuform_upgrade($nom_meta_base_version, $version_cible) { $maj = array(); - $maj['create'] = array(array('maj_tables', array('spip_gamuforms', 'spip_gamuforms_liens'))); + $maj['create'] = array(array('maj_tables', array('spip_gamuforms', 'spip_gamuforms_valeurs'))); include_spip('base/upgrade'); maj_plugin($nom_meta_base_version, $version_cible, $maj); @@ -43,7 +43,7 @@ function gamuform_upgrade($nom_meta_base_version, $version_cible) { function gamuform_vider_tables($nom_meta_base_version) { sql_drop_table('spip_gamuforms'); - sql_drop_table('spip_gamuforms_liens'); + sql_drop_table('spip_gamuforms_valeurs'); # Nettoyer les liens courants (le génie optimiser_base_disparus se chargera de nettoyer toutes les tables de liens) sql_delete('spip_documents_liens', sql_in('objet', array('gamuform'))); diff --git a/img/add.svg b/img/add.svg new file mode 100644 index 0000000..bb0be92 --- /dev/null +++ b/img/add.svg @@ -0,0 +1,25 @@ + +image/svg+xml diff --git a/inclure/creer_gamuform.html b/inclure/creer_gamuform.html new file mode 100644 index 0000000..ae6a00a --- /dev/null +++ b/inclure/creer_gamuform.html @@ -0,0 +1,36 @@ + +objet = #ENV{objet} + +
+ + + + + + + + + + + + + + + + + + +
+ + #ICON{plus,icon-lg} + + + #ICON{move,icon-lg,Rechercher} +
+ +
diff --git a/inclure/gamuform.html b/inclure/gamuform.html new file mode 100644 index 0000000..56e2fb2 --- /dev/null +++ b/inclure/gamuform.html @@ -0,0 +1,2 @@ +[
(#ENV**|unserialize|print_r{1})
] +