From d4eefc0823813eca5aa42586f11b2e175c2701c0 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 19 Jul 2009 23:46:09 +0000 Subject: [PATCH] Look: Uniformize look --- htdocs/adherents/type.php | 97 ++++++++++++++++++++------------------- 1 file changed, 49 insertions(+), 48 deletions(-) diff --git a/htdocs/adherents/type.php b/htdocs/adherents/type.php index f3a230014ad..920a1e34492 100644 --- a/htdocs/adherents/type.php +++ b/htdocs/adherents/type.php @@ -1,7 +1,7 @@ * Copyright (C) 2003 Jean-Louis Bergamo - * Copyright (C) 2004-2008 Laurent Destailleur + * Copyright (C) 2004-2009 Laurent Destailleur * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -19,11 +19,11 @@ */ /** - \file htdocs/adherents/type.php - \ingroup adherent - \brief Page de configuration des types d'adhérents - \version $Id$ -*/ + * \file htdocs/adherents/type.php + * \ingroup adherent + * \brief Page de configuration des types d'adh�rents + * \version $Id$ + */ require("./pre.inc.php"); require_once(DOL_DOCUMENT_ROOT."/adherents/adherent.class.php"); @@ -37,12 +37,12 @@ $rowid=isset($_GET["rowid"])?$_GET["rowid"]:$_POST["rowid"]; /* * Actions */ -if ($user->rights->adherent->configurer && $_POST["action"] == 'add') +if ($user->rights->adherent->configurer && $_POST["action"] == 'add') { if ($_POST["button"] != $langs->trans("Cancel")) { $adht = new AdherentType($db); - + $adht->libelle = trim($_POST["libelle"]); $adht->cotisation = trim($_POST["cotisation"]); $adht->note = trim($_POST["comment"]); @@ -71,7 +71,7 @@ if ($user->rights->adherent->configurer && $_POST["action"] == 'add') } } -if ($user->rights->adherent->configurer && $_POST["action"] == 'update') +if ($user->rights->adherent->configurer && $_POST["action"] == 'update') { if ($_POST["button"] != $langs->trans("Cancel")) { @@ -82,12 +82,12 @@ if ($user->rights->adherent->configurer && $_POST["action"] == 'update') $adht->note = trim($_POST["comment"]); $adht->mail_valid = trim($_POST["mail_valid"]); $adht->vote = trim($_POST["vote"]); - + $adht->update($user->id); Header("Location: type.php?rowid=".$_POST["rowid"]); exit; - } + } } if ($user->rights->adherent->configurer && $_GET["action"] == 'delete') @@ -106,6 +106,9 @@ if ($user->rights->adherent->configurer && $_GET["action"] == 'commentaire') } +/* + * View + */ llxHeader(); @@ -113,28 +116,27 @@ $form=new Form($db); /* ************************************************************************** */ /* */ -/* Liste des types d'adhérents */ +/* Liste des types d'adh�rents */ /* */ /* ************************************************************************** */ if (! $rowid && $_GET["action"] != 'create' && $_GET["action"] != 'edit') { - print_titre($langs->trans("MembersTypeSetup")); - print '
'; + print_fiche_titre($langs->trans("MembersTypeSetup")); $sql = "SELECT d.rowid, d.libelle, d.cotisation, d.vote"; $sql .= " FROM ".MAIN_DB_PREFIX."adherent_type as d"; - + $result = $db->query($sql); - if ($result) + if ($result) { $num = $db->num_rows($result); $i = 0; - + print ''; - + print ''; print ''; print ''; @@ -142,7 +144,7 @@ if (! $rowid && $_GET["action"] != 'create' && $_GET["action"] != 'edit') print ''; print ''; print "\n"; - + $var=True; while ($i < $num) { @@ -184,15 +186,14 @@ if (! $rowid && $_GET["action"] != 'create' && $_GET["action"] != 'edit') /* ************************************************************************** */ /* */ -/* Création d'un type adherent */ +/* Cr�ation d'un type adherent */ /* */ /* ************************************************************************** */ if ($_GET["action"] == 'create') { $htmls = new Form($db); - print_titre($langs->trans("NewMemberType")); - print '
'; + print_fiche_titre($langs->trans("NewMemberType")); if ($mesg) print '
'.$mesg.'
'; @@ -202,7 +203,7 @@ if ($_GET["action"] == 'create') print ''; - print ''; + print ''; print '
'.$langs->trans("Ref").''.$langs->trans("Label").''.$langs->trans("VoteAllowed").' 
'.$langs->trans("Label").'
'.$langs->trans("Label").'
'.$langs->trans("SubscriptionRequired").''; print $htmls->selectyesno("cotisation",1,1); @@ -235,7 +236,7 @@ if ($_GET["action"] == 'create') print "\n"; print "
\n"; -} +} /* ************************************************************************** */ /* */ /* Edition de la fiche */ @@ -251,7 +252,7 @@ if ($rowid > 0) $h=0; - + $head[$h][0] = $_SERVER["PHP_SELF"].'?rowid='.$adht->id; $head[$h][1] = $langs->trans("Card"); $head[$h][2] = 'card'; @@ -261,30 +262,30 @@ if ($rowid > 0) print ''; - + // Ref print ''; print ''; - + print ''; + // Label - print ''; - + print ''; + print ''; - + print ''; - + print '"; - + print '"; - + print '
'.$langs->trans("Ref").''; print $form->showrefnav($adht,'rowid'); - print '
'.$langs->trans("Label").''.$adht->libelle.'
'.$langs->trans("Label").''.$adht->libelle.'
'.$langs->trans("SubscriptionRequired").''; print yn($adht->cotisation); print '
'.$langs->trans("VoteAllowed").''; print yn($adht->vote); print '
'.$langs->trans("Description").''; print nl2br($adht->note)."
'.$langs->trans("WelcomeEMail").''; print nl2br($adht->mail_valid)."
'; print ''; @@ -300,7 +301,7 @@ if ($rowid > 0) { print "id."\">".$langs->trans("Modify").""; } - + // Add print "id."\">".$langs->trans("AddMember").""; @@ -309,21 +310,21 @@ if ($rowid > 0) { print "id."\">".$langs->trans("DeleteType").""; } - + print ""; } - + if ($_GET["action"] == 'edit') { $htmls = new Form($db); - + $adht = new AdherentType($db); $adht->id = $rowid; $adht->fetch($rowid); $h=0; - + $head[$h][0] = $_SERVER["PHP_SELF"].'?rowid='.$adht->id; $head[$h][1] = $langs->trans("Card"); $head[$h][2] = 'card'; @@ -337,22 +338,22 @@ if ($rowid > 0) print ''; print ''; print ''; - - print ''; - print ''; - + print ''; + + print ''; + print ''; - + print ''; - + print '"; - + print '"; - + print ''; - + print '
'.$langs->trans("Ref").''.$adht->id.'
'.$langs->trans("Label").'
'.$langs->trans("Ref").''.$adht->id.'
'.$langs->trans("Label").'
'.$langs->trans("SubscriptionRequired").''; print $htmls->selectyesno("cotisation",$adht->cotisation,1); print '
'.$langs->trans("VoteAllowed").''; print $htmls->selectyesno("vote",$adht->vote,1); print '
'.$langs->trans("Description").''; print "
'.$langs->trans("WelcomeEMail").''; if ($conf->fckeditor->enabled) { @@ -367,10 +368,10 @@ if ($rowid > 0) print ''; } print "
   '; print '
'; print ""; }