Merge branch 'develop' of https://github.com/Dolibarr/dolibarr.git into develop
@ -28,6 +28,7 @@ For users:
|
||||
- New: Script email_unpaid_invoices_to_representative accepts now a parameter test
|
||||
and a delay.
|
||||
- New: Can define a different clicktodial setup per user.
|
||||
- New: Add option INVOICE_CAN_NEVER_BE_REMOVED.
|
||||
- First change to prepare feature click to print for PDF.
|
||||
|
||||
For translators:
|
||||
|
||||
@ -104,7 +104,6 @@ clean:
|
||||
rm -fr htdocs/includes/jquery/plugins/flot
|
||||
rm -fr htdocs/includes/jquery/plugins/jstree
|
||||
rm -fr htdocs/includes/jquery/plugins/lightbox
|
||||
rm -fr htdocs/includes/jquery/plugins/mobile
|
||||
rm -fr htdocs/includes/jquery/plugins/multiselect
|
||||
rm -fr htdocs/includes/phpexcel/PHPExcel/Shared/PDF
|
||||
rm -fr htdocs/includes/phpexcel/PHPExcel/Shared/PCLZip
|
||||
|
||||
26
dev/resize_window.sh
Executable file
@ -0,0 +1,26 @@
|
||||
#!/bin/sh
|
||||
#----------------------------------------------------
|
||||
# Script to resize browser window to 1280x1024 to
|
||||
# be able to make size fixed screenshots using
|
||||
# ALT+Print screen.
|
||||
#----------------------------------------------------
|
||||
|
||||
# Syntax
|
||||
if [ "x$1" = "x" ]
|
||||
then
|
||||
echo "resize_windows.sh (list|0x99999999)"
|
||||
fi
|
||||
|
||||
# To list all windows
|
||||
if [ "x$1" = "xlist" ]
|
||||
then
|
||||
wmctrl -l
|
||||
fi
|
||||
|
||||
# To resize a specific window
|
||||
if [ "x$1" != "xlist" -a "x$1" != "x" ]
|
||||
then
|
||||
wmctrl -i -r $1 -e 0,0,0,1280,1024
|
||||
echo Size of windows $1 modified
|
||||
fi
|
||||
|
||||
@ -64,6 +64,9 @@ if (! empty($conf->mailmanspip->enabled))
|
||||
$object = new Adherent($db);
|
||||
$extrafields = new ExtraFields($db);
|
||||
|
||||
// fetch optionals attributes and labels
|
||||
$extralabels=$extrafields->fetch_name_optionals_label('member');
|
||||
|
||||
// Get object canvas (By default, this is not defined, so standard usage of dolibarr)
|
||||
$object->getCanvas($socid);
|
||||
$canvas = $object->canvas?$object->canvas:GETPOST("canvas");
|
||||
@ -282,14 +285,8 @@ if ($action == 'update' && ! $_POST["cancel"] && $user->rights->adherent->creer)
|
||||
$object->statut = $_POST["statut"];
|
||||
$object->public = $_POST["public"];
|
||||
|
||||
// Get extra fields
|
||||
foreach($_POST as $key => $value)
|
||||
{
|
||||
if (preg_match("/^options_/",$key))
|
||||
{
|
||||
$object->array_options[$key]=$_POST[$key];
|
||||
}
|
||||
}
|
||||
// Fill array 'array_options' with data from add form
|
||||
$ret = $extrafields->setOptionalsFromPost($extralabels,$object);
|
||||
|
||||
// Check if we need to also synchronize user information
|
||||
$nosyncuser=0;
|
||||
@ -460,14 +457,8 @@ if ($action == 'add' && $user->rights->adherent->creer)
|
||||
$object->fk_soc = $socid;
|
||||
$object->public = $public;
|
||||
|
||||
// Get extra fields
|
||||
foreach($_POST as $key => $value)
|
||||
{
|
||||
if (preg_match("/^options_/",$key))
|
||||
{
|
||||
$object->array_options[$key]=$_POST[$key];
|
||||
}
|
||||
}
|
||||
// Fill array 'array_options' with data from add form
|
||||
$ret = $extrafields->setOptionalsFromPost($extralabels,$object);
|
||||
|
||||
// Check parameters
|
||||
if (empty($morphy) || $morphy == "-1") {
|
||||
@ -693,9 +684,6 @@ if ($user->rights->adherent->creer && $action == 'confirm_add_spip' && $confirm
|
||||
$form = new Form($db);
|
||||
$formcompany = new FormCompany($db);
|
||||
|
||||
// fetch optionals attributes and labels
|
||||
$extralabels=$extrafields->fetch_name_optionals_label('member');
|
||||
|
||||
$help_url='EN:Module_Foundations|FR:Module_Adhérents|ES:Módulo_Miembros';
|
||||
llxHeader('',$langs->trans("Member"),$help_url);
|
||||
|
||||
@ -894,15 +882,7 @@ else
|
||||
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook
|
||||
if (empty($reshook) && ! empty($extrafields->attribute_label))
|
||||
{
|
||||
foreach($extrafields->attribute_label as $key=>$label)
|
||||
{
|
||||
$value=(isset($_POST["options_".$key])?GETPOST('options_'.$key,'alpha'):(isset($object->array_options["options_".$key])?$object->array_options["options_".$key]:''));
|
||||
print '<tr><td';
|
||||
if (! empty($extrafields->attribute_required[$key])) print ' class="fieldrequired"';
|
||||
print '>'.$label.'</td><td>';
|
||||
print $extrafields->showInputField($key,$value);
|
||||
print '</td></tr>'."\n";
|
||||
}
|
||||
print $object->showOptionals($extrafields,'edit');
|
||||
}
|
||||
|
||||
/*
|
||||
@ -1137,15 +1117,7 @@ else
|
||||
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook
|
||||
if (empty($reshook) && ! empty($extrafields->attribute_label))
|
||||
{
|
||||
foreach($extrafields->attribute_label as $key=>$label)
|
||||
{
|
||||
$value=(isset($_POST["options_".$key])?$_POST["options_".$key]:$object->array_options["options_".$key]);
|
||||
print '<tr><td';
|
||||
if (! empty($extrafields->attribute_required[$key])) print ' class="fieldrequired"';
|
||||
print '>'.$label.'</td><td>';
|
||||
print $extrafields->showInputField($key,$value);
|
||||
print '</td></tr>'."\n";
|
||||
}
|
||||
print $object->showOptionals($extrafields,'edit');
|
||||
}
|
||||
|
||||
// Third party Dolibarr
|
||||
@ -1467,13 +1439,7 @@ else
|
||||
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook
|
||||
if (empty($reshook) && ! empty($extrafields->attribute_label))
|
||||
{
|
||||
foreach($extrafields->attribute_label as $key=>$label)
|
||||
{
|
||||
$value=$object->array_options["options_$key"];
|
||||
print "<tr><td>".$label."</td><td>";
|
||||
print $extrafields->showOutputField($key,$value);
|
||||
print "</td></tr>\n";
|
||||
}
|
||||
print $object->showOptionals($extrafields);
|
||||
}
|
||||
|
||||
// Third party Dolibarr
|
||||
|
||||
@ -56,6 +56,9 @@ $result=restrictedArea($user,'adherent',$rowid,'adherent_type');
|
||||
|
||||
$extrafields = new ExtraFields($db);
|
||||
|
||||
// fetch optionals attributes and labels
|
||||
$extralabels=$extrafields->fetch_name_optionals_label('adherent_type');
|
||||
|
||||
if (GETPOST('button_removefilter'))
|
||||
{
|
||||
$search_lastname="";
|
||||
@ -84,14 +87,8 @@ if ($action == 'add' && $user->rights->adherent->configurer)
|
||||
$adht->mail_valid = trim($_POST["mail_valid"]);
|
||||
$adht->vote = trim($_POST["vote"]);
|
||||
|
||||
// Get extra fields
|
||||
foreach($_POST as $key => $value)
|
||||
{
|
||||
if (preg_match("/^options_/",$key))
|
||||
{
|
||||
$adht->array_options[$key]=GETPOST($key);
|
||||
}
|
||||
}
|
||||
// Fill array 'array_options' with data from add form
|
||||
$ret = $extrafields->setOptionalsFromPost($extralabels,$adht);
|
||||
|
||||
if ($adht->libelle)
|
||||
{
|
||||
@ -127,14 +124,8 @@ if ($action == 'update' && $user->rights->adherent->configurer)
|
||||
$adht->mail_valid = trim($_POST["mail_valid"]);
|
||||
$adht->vote = trim($_POST["vote"]);
|
||||
|
||||
// Get extra fields
|
||||
foreach($_POST as $key => $value)
|
||||
{
|
||||
if (preg_match("/^options_/",$key))
|
||||
{
|
||||
$adht->array_options[$key]=GETPOST($key);
|
||||
}
|
||||
}
|
||||
// Fill array 'array_options' with data from add form
|
||||
$ret = $extrafields->setOptionalsFromPost($extralabels,$adht);
|
||||
|
||||
$adht->update($user->id);
|
||||
|
||||
@ -167,8 +158,6 @@ llxHeader('',$langs->trans("MembersTypeSetup"),'EN:Module_Foundations|FR:Module_
|
||||
|
||||
$form=new Form($db);
|
||||
|
||||
// fetch optionals attributes and labels
|
||||
$extralabels=$extrafields->fetch_name_optionals_label('adherent_type');
|
||||
|
||||
// Liste of members type
|
||||
|
||||
@ -245,6 +234,7 @@ if (! $rowid && $action != 'create' && $action != 'edit')
|
||||
if ($action == 'create')
|
||||
{
|
||||
$form = new Form($db);
|
||||
$adht = new AdherentType($db);
|
||||
|
||||
print_fiche_titre($langs->trans("NewMemberType"));
|
||||
|
||||
@ -278,23 +268,11 @@ if ($action == 'create')
|
||||
// Other attributes
|
||||
$parameters=array();
|
||||
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$act,$action); // Note that $action and $object may have been modified by hook
|
||||
|
||||
print "</table>\n";
|
||||
|
||||
if (empty($reshook) && ! empty($extrafields->attribute_label))
|
||||
{
|
||||
print '<br><br><table class="border" width="100%">';
|
||||
foreach($extrafields->attribute_label as $key=>$label)
|
||||
{
|
||||
$value=(isset($_POST["options_".$key])?$_POST["options_".$key]:$act->array_options["options_".$key]);
|
||||
print '<tr><td';
|
||||
if (! empty($extrafields->attribute_required[$key])) print ' class="fieldrequired"';
|
||||
print ' width="30%">'.$label.'</td><td>';
|
||||
print $extrafields->showInputField($key,$value);
|
||||
print '</td></tr>'."\n";
|
||||
}
|
||||
print '</table><br><br>';
|
||||
print $adht->showOptionals($extrafields,'edit');
|
||||
}
|
||||
print "</table>\n";
|
||||
|
||||
print '<br>';
|
||||
print '<center><input type="submit" name="button" class="button" value="'.$langs->trans("Add").'"> ';
|
||||
@ -356,23 +334,13 @@ if ($rowid > 0)
|
||||
// Other attributes
|
||||
$parameters=array();
|
||||
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$act,$action); // Note that $action and $object may have been modified by hook
|
||||
|
||||
print '</table>';
|
||||
|
||||
//Extra field
|
||||
if (empty($reshook) && ! empty($extrafields->attribute_label))
|
||||
{
|
||||
print '<br><br><table class="border" width="100%">';
|
||||
foreach($extrafields->attribute_label as $key=>$label)
|
||||
{
|
||||
$value=(isset($_POST["options_".$key])?$_POST["options_".$key]:(isset($adht->array_options['options_'.$key])?$adht->array_options['options_'.$key]:''));
|
||||
print '<tr><td width="30%">'.$label.'</td><td>';
|
||||
print $extrafields->showOutputField($key,$value);
|
||||
print "</td></tr>\n";
|
||||
}
|
||||
print '</table><br><br>';
|
||||
// View extrafields
|
||||
print $adht->showOptionals($extrafields);
|
||||
}
|
||||
|
||||
print '</table>';
|
||||
print '</div>';
|
||||
|
||||
/*
|
||||
|
||||
@ -63,6 +63,9 @@ $actioncomm = new ActionComm($db);
|
||||
$contact = new Contact($db);
|
||||
$extrafields = new ExtraFields($db);
|
||||
|
||||
// fetch optionals attributes and labels
|
||||
$extralabels=$extrafields->fetch_name_optionals_label('actioncomm');
|
||||
|
||||
//var_dump($_POST);
|
||||
|
||||
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array
|
||||
@ -203,14 +206,8 @@ if ($action == 'add_action')
|
||||
$mesg='<div class="error">'.$langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("Date")).'</div>';
|
||||
}
|
||||
|
||||
// Get extra fields
|
||||
foreach($_POST as $key => $value)
|
||||
{
|
||||
if (preg_match("/^options_/",$key))
|
||||
{
|
||||
$actioncomm->array_options[$key]=GETPOST($key);
|
||||
}
|
||||
}
|
||||
// Fill array 'array_options' with data from add form
|
||||
$ret = $extrafields->setOptionalsFromPost($extralabels,$actioncomm);
|
||||
|
||||
if (! $error)
|
||||
{
|
||||
@ -343,14 +340,8 @@ if ($action == 'update')
|
||||
}
|
||||
$actioncomm->userdone = $userdone;
|
||||
|
||||
// Get extra fields
|
||||
foreach($_POST as $key => $value)
|
||||
{
|
||||
if (preg_match("/^options_/",$key))
|
||||
{
|
||||
$actioncomm->array_options[$key]=GETPOST($key);
|
||||
}
|
||||
}
|
||||
// Fill array 'array_options' with data from add form
|
||||
$ret = $extrafields->setOptionalsFromPost($extralabels,$actioncomm);
|
||||
|
||||
if (! $error)
|
||||
{
|
||||
@ -395,9 +386,6 @@ llxHeader('',$langs->trans("Agenda"),$help_url);
|
||||
$form = new Form($db);
|
||||
$htmlactions = new FormActions($db);
|
||||
|
||||
// fetch optionals attributes and labels
|
||||
$extralabels=$extrafields->fetch_name_optionals_label('actioncomm');
|
||||
|
||||
if ($action == 'create')
|
||||
{
|
||||
$contact = new Contact($db);
|
||||
@ -603,22 +591,13 @@ if ($action == 'create')
|
||||
$parameters=array();
|
||||
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$actioncomm,$action); // Note that $action and $object may have been modified by hook
|
||||
|
||||
print '</table>';
|
||||
|
||||
if (empty($reshook) && ! empty($extrafields->attribute_label))
|
||||
{
|
||||
print '<br><br><table class="border" width="100%">';
|
||||
foreach($extrafields->attribute_label as $key=>$label)
|
||||
{
|
||||
$value=(isset($_POST["options_".$key])?$_POST["options_".$key]:(isset($actioncomm->array_options["options_".$key])?$actioncomm->array_options["options_".$key]:''));
|
||||
print '<tr><td';
|
||||
if (! empty($extrafields->attribute_required[$key])) print ' class="fieldrequired"';
|
||||
print ' width="30%">'.$label.'</td><td>';
|
||||
print $extrafields->showInputField($key,$value);
|
||||
print '</td></tr>'."\n";
|
||||
}
|
||||
print '</table><br>';
|
||||
print $actioncomm->showOptionals($extrafields,'edit');
|
||||
}
|
||||
|
||||
print '</table>';
|
||||
|
||||
print '<center><br>';
|
||||
print '<input type="submit" class="button" value="'.$langs->trans("Add").'">';
|
||||
@ -838,24 +817,13 @@ if ($id > 0)
|
||||
// Other attributes
|
||||
$parameters=array('colspan' => ' colspan="3"', 'colspanvalue' => '3');
|
||||
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$act,$action); // Note that $action and $object may have been modified by hook
|
||||
|
||||
print '</table>';
|
||||
|
||||
if (empty($reshook) && ! empty($extrafields->attribute_label))
|
||||
{
|
||||
print '<br><br><table class="border" width="100%">';
|
||||
foreach($extrafields->attribute_label as $key=>$label)
|
||||
{
|
||||
$value=(isset($_POST["options_".$key])?$_POST["options_".$key]:$act->array_options["options_".$key]);
|
||||
print '<tr><td';
|
||||
if (! empty($extrafields->attribute_required[$key])) print ' class="fieldrequired"';
|
||||
print ' width="30%">'.$label.'</td><td>';
|
||||
print $extrafields->showInputField($key,$value);
|
||||
print '</td></tr>'."\n";
|
||||
}
|
||||
print '</table><br><br>';
|
||||
print $actioncomm->showOptionals($extrafields,'edit');
|
||||
|
||||
}
|
||||
|
||||
print '</table>';
|
||||
|
||||
print '<center><br><input type="submit" class="button" name="edit" value="'.$langs->trans("Save").'">';
|
||||
print ' <input type="submit" class="button" name="cancel" value="'.$langs->trans("Cancel").'">';
|
||||
|
||||
@ -48,6 +48,9 @@ $result=$object->fetch($id);
|
||||
|
||||
$extrafields = new ExtraFields($db);
|
||||
|
||||
// fetch optionals attributes and labels
|
||||
$extralabels=$extrafields->fetch_name_optionals_label('mailing');
|
||||
|
||||
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array
|
||||
$hookmanager->initHooks(array('mailingcard'));
|
||||
|
||||
@ -631,8 +634,6 @@ if (! empty($_POST["cancel"]))
|
||||
* View
|
||||
*/
|
||||
|
||||
// fetch optionals attributes and labels
|
||||
$extralabels=$extrafields->fetch_name_optionals_label('mailing');
|
||||
|
||||
$help_url='EN:Module_EMailing|FR:Module_Mailing|ES:Módulo_Mailing';
|
||||
llxHeader('',$langs->trans("Mailing"),$help_url);
|
||||
@ -661,15 +662,7 @@ if ($action == 'create')
|
||||
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook
|
||||
if (empty($reshook) && ! empty($extrafields->attribute_label))
|
||||
{
|
||||
foreach($extrafields->attribute_label as $key=>$label)
|
||||
{
|
||||
$value=(isset($_POST["options_".$key])?$_POST["options_".$key]:$object->array_options["options_".$key]);
|
||||
print '<tr><td';
|
||||
if (! empty($extrafields->attribute_required[$key])) print ' class="fieldrequired"';
|
||||
print '>'.$label.'</td><td colspan="3">';
|
||||
print $extrafields->showInputField($key,$value);
|
||||
print '</td></tr>'."\n";
|
||||
}
|
||||
print $object->showOptionals($extrafields,'edit');
|
||||
}
|
||||
|
||||
print '</table>';
|
||||
@ -823,15 +816,7 @@ else
|
||||
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook
|
||||
if (empty($reshook) && ! empty($extrafields->attribute_label))
|
||||
{
|
||||
foreach($extrafields->attribute_label as $key=>$label)
|
||||
{
|
||||
$value=(isset($_POST["options_".$key])?$_POST["options_".$key]:$object->array_options["options_".$key]);
|
||||
print '<tr><td';
|
||||
if (! empty($extrafields->attribute_required[$key])) print ' class="fieldrequired"';
|
||||
print '>'.$label.'</td><td colspan="3">';
|
||||
print $extrafields->showInputField($key,$value);
|
||||
print "</td></tr>\n";
|
||||
}
|
||||
print $object->showOptionals($extrafields);
|
||||
}
|
||||
|
||||
print '</table>';
|
||||
@ -1072,15 +1057,7 @@ else
|
||||
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook
|
||||
if (empty($reshook) && ! empty($extrafields->attribute_label))
|
||||
{
|
||||
foreach($extrafields->attribute_label as $key=>$label)
|
||||
{
|
||||
$value=(isset($_POST["options_".$key])?$_POST["options_".$key]:$object->array_options["options_".$key]);
|
||||
print '<tr><td';
|
||||
if (! empty($extrafields->attribute_required[$key])) print ' class="fieldrequired"';
|
||||
print '>'.$label.'</td><td colspan="3">';
|
||||
print $extrafields->showInputField($key,$value);
|
||||
print "</td></tr>\n";
|
||||
}
|
||||
print $object->showOptionals($extrafields,'edit');
|
||||
}
|
||||
|
||||
print '</table>';
|
||||
|
||||
@ -1347,24 +1347,7 @@ if ($action == 'create')
|
||||
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook
|
||||
if (empty($reshook) && ! empty($extrafields->attribute_label))
|
||||
{
|
||||
foreach($extrafields->attribute_label as $key=>$label)
|
||||
{
|
||||
$value=(isset($_POST["options_".$key])?$_POST["options_".$key]:$object->array_options["options_".$key]);
|
||||
|
||||
// Show separator only
|
||||
if ($extrafields->attribute_type[$key] == 'separate')
|
||||
{
|
||||
print $extrafields->showSeparator($key);
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<tr><td';
|
||||
if (! empty($extrafields->attribute_required[$key])) print ' class="fieldrequired"';
|
||||
print '>'.$label.'</td><td colspan="3">';
|
||||
print $extrafields->showInputField($key,$value);
|
||||
print '</td></tr>'."\n";
|
||||
}
|
||||
}
|
||||
print $object->showOptionals($extrafields,'edit');
|
||||
}
|
||||
|
||||
print "</table>";
|
||||
@ -1849,7 +1832,7 @@ else
|
||||
print '<input type="hidden" name="id" value="'.$object->id.'">';
|
||||
}
|
||||
|
||||
|
||||
// TODO : use showOptionals($extrafields) function
|
||||
foreach($extrafields->attribute_label as $key=>$label)
|
||||
{
|
||||
$value=(isset($_POST["options_".$key])?$_POST["options_".$key]:$object->array_options["options_".$key]);
|
||||
@ -2279,4 +2262,4 @@ else
|
||||
// End of page
|
||||
llxFooter();
|
||||
$db->close();
|
||||
?>
|
||||
?>
|
||||
|
||||
@ -1564,15 +1564,7 @@ if ($action == 'send' && ! GETPOST('addfile') && ! GETPOST('removedfile') && ! G
|
||||
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook
|
||||
if (empty($reshook) && ! empty($extrafields->attribute_label))
|
||||
{
|
||||
foreach($extrafields->attribute_label as $key=>$label)
|
||||
{
|
||||
$value=(isset($_POST["options_".$key])?$_POST["options_".$key]:$object->array_options["options_".$key]);
|
||||
print '<tr><td';
|
||||
if (! empty($extrafields->attribute_required[$key])) print ' class="fieldrequired"';
|
||||
print '>'.$label.'</td><td colspan="3">';
|
||||
print $extrafields->showInputField($key,$value);
|
||||
print '</td></tr>'."\n";
|
||||
}
|
||||
print $object->showOptionals($extrafields,'edit');
|
||||
}
|
||||
|
||||
// Template to use by default
|
||||
@ -2091,15 +2083,7 @@ if ($action == 'send' && ! GETPOST('addfile') && ! GETPOST('removedfile') && ! G
|
||||
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook
|
||||
if (empty($reshook) && ! empty($extrafields->attribute_label))
|
||||
{
|
||||
foreach($extrafields->attribute_label as $key=>$label)
|
||||
{
|
||||
$value=(isset($_POST["options_".$key])?$_POST["options_".$key]:$object->array_options["options_".$key]);
|
||||
print '<tr><td';
|
||||
if (! empty($extrafields->attribute_required[$key])) print ' class="fieldrequired"';
|
||||
print '>'.$label.'</td><td colspan="3">';
|
||||
print $extrafields->showInputField($key,$value);
|
||||
print '</td></tr>'."\n";
|
||||
}
|
||||
print $object->showOptionals($extrafields,'edit');
|
||||
}
|
||||
|
||||
// Total HT
|
||||
|
||||
@ -2097,23 +2097,7 @@ if ($action == 'create')
|
||||
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook
|
||||
if (empty($reshook) && ! empty($extrafields->attribute_label))
|
||||
{
|
||||
foreach($extrafields->attribute_label as $key=>$label)
|
||||
{
|
||||
$value=(isset($_POST["options_".$key])?$_POST["options_".$key]:$object->array_options["options_".$key]);
|
||||
// Show separator only
|
||||
if ($extrafields->attribute_type[$key] == 'separate')
|
||||
{
|
||||
print $extrafields->showSeparator($key);
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<tr><td';
|
||||
if (! empty($extrafields->attribute_required[$key])) print ' class="fieldrequired"';
|
||||
print '>'.$label.'</td><td colspan="3">';
|
||||
print $extrafields->showInputField($key,$value);
|
||||
print '</td></tr>'."\n";
|
||||
}
|
||||
}
|
||||
print $object->showOptionals($extrafields,'edit');
|
||||
}
|
||||
|
||||
// Modele PDF
|
||||
|
||||
@ -2590,7 +2590,7 @@ class Facture extends CommonInvoice
|
||||
/**
|
||||
* Return if an invoice can be deleted
|
||||
* Rule is:
|
||||
* If hidden option FACTURE_CAN_BE_REMOVED is on, we can
|
||||
* If hidden option INVOICE_CAN_ALWAYS_BE_REMOVED is on, we can
|
||||
* If invoice has a definitive ref, is last, without payment and not dipatched into accountancy -> yes end of rule
|
||||
* If invoice is draft and ha a temporary ref -> yes
|
||||
*
|
||||
@ -2600,7 +2600,8 @@ class Facture extends CommonInvoice
|
||||
{
|
||||
global $conf;
|
||||
|
||||
if (! empty($conf->global->FACTURE_CAN_BE_REMOVED)) return 1;
|
||||
if (! empty($conf->global->INVOICE_CAN_ALWAYS_BE_REMOVED)) return 1;
|
||||
if (! empty($conf->global->INVOICE_CAN_NEVER_BE_REMOVED)) return 0;
|
||||
|
||||
// on verifie si la facture est en numerotation provisoire
|
||||
$facref = substr($this->ref, 1, 4);
|
||||
|
||||
@ -258,7 +258,7 @@ if (! empty($conf->facture->enabled) && $user->rights->facture->lire)
|
||||
*/
|
||||
if (! empty($conf->fournisseur->enabled) && $user->rights->fournisseur->facture->lire)
|
||||
{
|
||||
$sql = "SELECT f.facnumber, f.rowid, f.total_ttc, f.type,";
|
||||
$sql = "SELECT f.ref_supplier, f.rowid, f.total_ttc, f.type,";
|
||||
$sql.= " s.nom, s.rowid as socid";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."facture_fourn as f, ".MAIN_DB_PREFIX."societe as s";
|
||||
if (!$user->rights->societe->client->voir && !$socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
||||
@ -287,7 +287,7 @@ if (! empty($conf->fournisseur->enabled) && $user->rights->fournisseur->facture-
|
||||
{
|
||||
$obj = $db->fetch_object($resql);
|
||||
print '<tr '.$bc[$var].'><td nowrap>';
|
||||
$facturesupplierstatic->ref=$obj->facnumber;
|
||||
$facturesupplierstatic->ref=$obj->ref;
|
||||
$facturesupplierstatic->id=$obj->rowid;
|
||||
$facturesupplierstatic->type=$obj->type;
|
||||
print $facturesupplierstatic->getNomUrl(1,'',16);
|
||||
@ -432,7 +432,7 @@ if (! empty($conf->fournisseur->enabled) && $user->rights->fournisseur->facture-
|
||||
$langs->load("boxes");
|
||||
$facstatic=new FactureFournisseur($db);
|
||||
|
||||
$sql = "SELECT ff.rowid, ff.facnumber, ff.fk_statut, ff.libelle, ff.total_ht, ff.total_ttc, ff.tms, ff.paye";
|
||||
$sql = "SELECT ff.rowid, ff.ref_supplier, ff.fk_statut, ff.libelle, ff.total_ht, ff.total_ttc, ff.tms, ff.paye";
|
||||
$sql.= ", s.nom, s.rowid as socid";
|
||||
$sql.= ", SUM(pf.amount) as am";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."facture_fourn as ff";
|
||||
@ -442,7 +442,7 @@ if (! empty($conf->fournisseur->enabled) && $user->rights->fournisseur->facture-
|
||||
$sql.= " AND ff.entity = ".$conf->entity;
|
||||
if (!$user->rights->societe->client->voir && !$socid) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".$user->id;
|
||||
if ($socid) $sql.= " AND ff.fk_soc = ".$socid;
|
||||
$sql.= " GROUP BY ff.rowid, ff.facnumber, ff.fk_statut, ff.libelle, ff.total_ht, ff.total_ttc, ff.tms, ff.paye, s.nom, s.rowid";
|
||||
$sql.= " GROUP BY ff.rowid, ff.ref_supplier, ff.fk_statut, ff.libelle, ff.total_ht, ff.total_ttc, ff.tms, ff.paye, s.nom, s.rowid";
|
||||
$sql.= " ORDER BY ff.tms DESC ";
|
||||
$sql.= $db->plimit($max, 0);
|
||||
|
||||
@ -467,7 +467,7 @@ if (! empty($conf->fournisseur->enabled) && $user->rights->fournisseur->facture-
|
||||
{
|
||||
$obj = $db->fetch_object($resql);
|
||||
print '<tr '.$bc[$var].'><td>';
|
||||
$facstatic->ref=$obj->facnumber;
|
||||
$facstatic->ref=$obj->ref;
|
||||
$facstatic->id=$obj->rowid;
|
||||
print $facstatic->getNomUrl(1,'');
|
||||
print '</td>';
|
||||
@ -930,7 +930,7 @@ if (! empty($conf->fournisseur->enabled) && $user->rights->fournisseur->facture-
|
||||
{
|
||||
$facstatic=new FactureFournisseur($db);
|
||||
|
||||
$sql = "SELECT ff.rowid, ff.facnumber, ff.fk_statut, ff.libelle, ff.total_ht, ff.total_ttc, ff.paye,";
|
||||
$sql = "SELECT ff.rowid, ff.ref_supplier, ff.fk_statut, ff.libelle, ff.total_ht, ff.total_ttc, ff.paye,";
|
||||
$sql.= " s.nom, s.rowid as socid,";
|
||||
$sql.= " sum(pf.amount) as am";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."facture_fourn as ff";
|
||||
@ -942,7 +942,7 @@ if (! empty($conf->fournisseur->enabled) && $user->rights->fournisseur->facture-
|
||||
$sql.= " AND ff.fk_statut = 1";
|
||||
if (!$user->rights->societe->client->voir && !$socid) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".$user->id;
|
||||
if ($socid) $sql.= " AND ff.fk_soc = ".$socid;
|
||||
$sql.= " GROUP BY ff.rowid, ff.facnumber, ff.fk_statut, ff.libelle, ff.total_ht, ff.total_ttc, s.nom, s.rowid";
|
||||
$sql.= " GROUP BY ff.rowid, ff.ref_supplier, ff.fk_statut, ff.libelle, ff.total_ht, ff.total_ttc, s.nom, s.rowid";
|
||||
|
||||
$resql=$db->query($sql);
|
||||
if ($resql)
|
||||
@ -967,7 +967,7 @@ if (! empty($conf->fournisseur->enabled) && $user->rights->fournisseur->facture-
|
||||
$obj = $db->fetch_object($resql);
|
||||
|
||||
print '<tr '.$bc[$var].'><td>';
|
||||
$facstatic->ref=$obj->facnumber;
|
||||
$facstatic->ref=$obj->ref;
|
||||
$facstatic->id=$obj->rowid;
|
||||
print $facstatic->getNomUrl(1,'');
|
||||
print '</td>';
|
||||
|
||||
@ -50,6 +50,9 @@ if ($user->societe_id) $socid=$user->societe_id;
|
||||
$object = new Contact($db);
|
||||
$extrafields = new ExtraFields($db);
|
||||
|
||||
// fetch optionals attributes and labels
|
||||
$extralabels=$extrafields->fetch_name_optionals_label('contact');
|
||||
|
||||
// Get object canvas (By default, this is not defined, so standard usage of dolibarr)
|
||||
$object->getCanvas($id);
|
||||
$objcanvas=null;
|
||||
@ -155,14 +158,8 @@ if (empty($reshook))
|
||||
$object->birthday = dol_mktime(0,0,0,$_POST["birthdaymonth"],$_POST["birthdayday"],$_POST["birthdayyear"]);
|
||||
$object->birthday_alert = $_POST["birthday_alert"];
|
||||
|
||||
// Get extra fields
|
||||
foreach($_POST as $key => $value)
|
||||
{
|
||||
if (preg_match("/^options_/",$key))
|
||||
{
|
||||
$object->array_options[$key]=GETPOST($key);
|
||||
}
|
||||
}
|
||||
// Fill array 'array_options' with data from add form
|
||||
$ret = $extrafields->setOptionalsFromPost($extralabels,$object);
|
||||
|
||||
if (! $_POST["lastname"])
|
||||
{
|
||||
@ -252,14 +249,8 @@ if (empty($reshook))
|
||||
$object->priv = $_POST["priv"];
|
||||
$object->note = $_POST["note"];
|
||||
|
||||
// Get extra fields
|
||||
foreach($_POST as $key => $value)
|
||||
{
|
||||
if (preg_match("/^options_/",$key))
|
||||
{
|
||||
$object->array_options[$key]=GETPOST($key);
|
||||
}
|
||||
}
|
||||
// Fill array 'array_options' with data from add form
|
||||
$ret = $extrafields->setOptionalsFromPost($extralabels,$object);
|
||||
|
||||
$result = $object->update($_POST["contactid"], $user);
|
||||
|
||||
@ -283,8 +274,6 @@ if (empty($reshook))
|
||||
* View
|
||||
*/
|
||||
|
||||
// fetch optionals attributes and labels
|
||||
$extralabels=$extrafields->fetch_name_optionals_label('contact');
|
||||
|
||||
$help_url='EN:Module_Third_Parties|FR:Module_Tiers|ES:Empresas';
|
||||
llxHeader('',$langs->trans("ContactsAddresses"),$help_url);
|
||||
@ -518,22 +507,7 @@ else
|
||||
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook
|
||||
if (empty($reshook) && ! empty($extrafields->attribute_label))
|
||||
{
|
||||
foreach($extrafields->attribute_label as $key=>$label)
|
||||
{
|
||||
$value=(isset($_POST["options_".$key])?$_POST["options_".$key]:(isset($object->array_options["options_".$key])?$object->array_options["options_".$key]:''));
|
||||
if ($extrafields->attribute_type[$key] == 'separate')
|
||||
{
|
||||
print $extrafields->showSeparator($key);
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<tr><td';
|
||||
if (! empty($extrafields->attribute_required[$key])) print ' class="fieldrequired"';
|
||||
print '>'.$label.'</td><td colspan="3">';
|
||||
print $extrafields->showInputField($key,$value);
|
||||
print '</td></tr>'."\n";
|
||||
}
|
||||
}
|
||||
print $object->showOptionals($extrafields,'edit');
|
||||
}
|
||||
|
||||
print "</table><br>";
|
||||
@ -740,22 +714,7 @@ else
|
||||
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook
|
||||
if (empty($reshook) && ! empty($extrafields->attribute_label))
|
||||
{
|
||||
foreach($extrafields->attribute_label as $key=>$label)
|
||||
{
|
||||
$value=(isset($_POST["options_".$key])?$_POST["options_".$key]:$object->array_options["options_".$key]);
|
||||
if ($extrafields->attribute_type[$key] == 'separate')
|
||||
{
|
||||
print $extrafields->showSeparator($key);
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<tr><td';
|
||||
if (! empty($extrafields->attribute_required[$key])) print ' class="fieldrequired"';
|
||||
print '>'.$label.'</td><td colspan="3">';
|
||||
print $extrafields->showInputField($key,$value);
|
||||
print "</td></tr>\n";
|
||||
}
|
||||
}
|
||||
print $object->showOptionals($extrafields,'edit');
|
||||
}
|
||||
|
||||
$object->load_ref_elements();
|
||||
@ -959,20 +918,7 @@ else
|
||||
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook
|
||||
if (empty($reshook) && ! empty($extrafields->attribute_label))
|
||||
{
|
||||
foreach($extrafields->attribute_label as $key=>$label)
|
||||
{
|
||||
$value=(isset($_POST["options_".$key])?$_POST["options_".$key]:(isset($object->array_options['options_'.$key])?$object->array_options['options_'.$key]:''));
|
||||
if ($extrafields->attribute_type[$key] == 'separate')
|
||||
{
|
||||
print $extrafields->showSeparator($key);
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<tr><td>'.$label.'</td><td colspan="3">';
|
||||
print $extrafields->showOutputField($key,$value);
|
||||
print "</td></tr>\n";
|
||||
}
|
||||
}
|
||||
print $object->showOptionals($extrafields);
|
||||
}
|
||||
|
||||
$object->load_ref_elements();
|
||||
|
||||
@ -101,7 +101,7 @@ class box_actions extends ModeleBoxes
|
||||
'logo' => ("action"),
|
||||
'url' => DOL_URL_ROOT."/comm/action/fiche.php?id=".$objp->id);
|
||||
|
||||
$this->info_box_contents[$i][1] = array('td' => 'align="left" nowrap="1"',
|
||||
$this->info_box_contents[$i][1] = array('td' => 'align="left"',
|
||||
'text' => dol_trunc($label,32),
|
||||
'text2'=> $late,
|
||||
'url' => DOL_URL_ROOT."/comm/action/fiche.php?id=".$objp->id);
|
||||
|
||||
@ -64,7 +64,7 @@ class box_factures_fourn extends ModeleBoxes
|
||||
if ($user->rights->fournisseur->facture->lire)
|
||||
{
|
||||
$sql = "SELECT s.nom, s.rowid as socid,";
|
||||
$sql.= " f.rowid as facid, f.facnumber, f.amount,";
|
||||
$sql.= " f.rowid as facid, f.ref_supplier, f.amount,";
|
||||
$sql.= " f.paye, f.fk_statut,";
|
||||
$sql.= ' f.datef as df,';
|
||||
$sql.= ' f.datec as datec,';
|
||||
@ -102,7 +102,7 @@ class box_factures_fourn extends ModeleBoxes
|
||||
'url' => DOL_URL_ROOT."/fourn/facture/fiche.php?facid=".$objp->facid);
|
||||
|
||||
$this->info_box_contents[$i][1] = array('td' => 'align="left"',
|
||||
'text' => $objp->facnumber,
|
||||
'text' => $objp->ref_supplier,
|
||||
'text2'=> $late,
|
||||
'url' => DOL_URL_ROOT."/fourn/facture/fiche.php?facid=".$objp->facid);
|
||||
|
||||
|
||||
@ -61,7 +61,7 @@ class box_factures_fourn_imp extends ModeleBoxes
|
||||
if ($user->rights->fournisseur->facture->lire)
|
||||
{
|
||||
$sql = "SELECT s.nom, s.rowid as socid,";
|
||||
$sql.= " f.rowid as facid, f.facnumber, f.date_lim_reglement as datelimite,";
|
||||
$sql.= " f.rowid as facid, f.ref_supplier, f.date_lim_reglement as datelimite,";
|
||||
$sql.= " f.amount, f.datef as df,";
|
||||
$sql.= " f.paye, f.fk_statut, f.type";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."societe as s";
|
||||
@ -98,7 +98,7 @@ class box_factures_fourn_imp extends ModeleBoxes
|
||||
'url' => DOL_URL_ROOT."/fourn/facture/fiche.php?facid=".$objp->facid);
|
||||
|
||||
$this->info_box_contents[$i][1] = array('td' => 'align="left"',
|
||||
'text' => $objp->facnumber,
|
||||
'text' => $objp->ref_supplier,
|
||||
'text2'=> $late,
|
||||
'url' => DOL_URL_ROOT."/fourn/facture/fiche.php?facid=".$objp->facid);
|
||||
|
||||
|
||||
@ -2189,6 +2189,76 @@ abstract class CommonObject
|
||||
}
|
||||
else return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Function to show lines of extrafields with output datas
|
||||
*
|
||||
* @param object $extrafields extrafield Object
|
||||
* @param string $mode Show output (view) or input (edit) for extrafield
|
||||
*
|
||||
* return string
|
||||
*/
|
||||
function showOptionals($extrafields,$mode='view')
|
||||
{
|
||||
global $_POST;
|
||||
|
||||
$out = '';
|
||||
|
||||
if(count($extrafields->attribute_label) > 0)
|
||||
{
|
||||
$out .= "\n";
|
||||
$out .= '<!-- showOptionalsInput --> ';
|
||||
$out .= "\n";
|
||||
|
||||
$e = 0;
|
||||
foreach($extrafields->attribute_label as $key=>$label)
|
||||
{
|
||||
$colspan='3';
|
||||
$value=(isset($_POST["options_".$key])?$_POST["options_".$key]:$this->array_options["options_".$key]);
|
||||
if ($extrafields->attribute_type[$key] == 'separate')
|
||||
{
|
||||
$out .= $extrafields->showSeparator($key);
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( !empty($conf->global->MAIN_EXTRAFIELDS_USE_TWO_COLUMS) && ($e % 2) == 0)
|
||||
{
|
||||
$out .= '<tr>';
|
||||
$colspan='0';
|
||||
}
|
||||
else
|
||||
{
|
||||
$out .= '<tr>';
|
||||
}
|
||||
// Convert date into timestamp format
|
||||
if (in_array($extrafields->attribute_type[$key],array('date','datetime')))
|
||||
{
|
||||
$value = isset($_POST["options_".$key])?dol_mktime($_POST["options_".$key."hour"], $_POST["options_".$key."min"], 0, $_POST["options_".$key."month"], $_POST["options_".$key."day"], $_POST["options_".$key."year"]):$this->array_options['options_'.$key];
|
||||
}
|
||||
$out .= '<td>'.$label.'</td>';
|
||||
$out .='<td colspan="'.$colspan.'">';
|
||||
|
||||
switch($mode) {
|
||||
case "view":
|
||||
$out .= $extrafields->showOutputField($key,$value);
|
||||
break;
|
||||
case "edit":
|
||||
$out .= $extrafields->showInputField($key,$value);
|
||||
break;
|
||||
}
|
||||
|
||||
$out .= '</td>'."\n";
|
||||
|
||||
if (! empty($conf->global->MAIN_EXTRAFIELDS_USE_TWO_COLUMS) && (($e % 2) == 1)) $out .= '</tr>';
|
||||
else $out .= '</tr>';
|
||||
$e++;
|
||||
}
|
||||
}
|
||||
$out .= "\n";
|
||||
$out .= '<!-- /showOptionalsInput --> ';
|
||||
}
|
||||
return $out;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@ -624,7 +624,7 @@ class ExtraFields
|
||||
$formstat = new Form($db);
|
||||
|
||||
$showtime = in_array($type,array('datetime')) ? 1 : 0;
|
||||
$out = $formstat->select_date($value, 'options_'.$key, $showtime, $showtime, $required, '', 1, 1, 0, 0, 1);
|
||||
$out = $formstat->select_date($value, 'options_'.$key, $showtime, $showtime, $required, '', 1, 1, 1, 0, 1);
|
||||
//$out='<input type="text" name="options_'.$key.'" size="'.$showsize.'" maxlength="'.$newsize.'" value="'.$value.'"'.($moreparam?$moreparam:'').'>';
|
||||
}
|
||||
elseif (in_array($type,array('int','double')))
|
||||
|
||||
@ -50,7 +50,7 @@ $left=($langs->trans("DIRECTION")=='rtl'?'right':'left');
|
||||
* View
|
||||
*/
|
||||
|
||||
// URL http://mydolibarr/core/getmenu_jmobime?mainmenu=mainmenu&leftmenu=leftmenu can be used for tests
|
||||
// URL http://mydolibarr/core/getmenu_jmobile?mainmenu=mainmenu&leftmenu=leftmenu can be used for tests
|
||||
$arrayofjs=array('/includes/jquery/plugins/mobile/jquery.mobile-latest.min.js');
|
||||
$arrayofcss=array('/includes/jquery/plugins/mobile/jquery.mobile-latest.min.css');
|
||||
top_htmlhead($head, $title, $disablejs, $disablehead, $arrayofjs, $arrayofcss);
|
||||
|
||||
@ -1581,7 +1581,7 @@ function dol_print_graph($htmlid,$width,$height,$data,$showlegend=0,$type='pie',
|
||||
* MAIN_DISABLE_TRUNC=1 can disable all truncings
|
||||
*
|
||||
* @param string $string String to truncate
|
||||
* @param int $size Max string size visible. 0 for no limit. finale string size can be 1 more (if size was max+1) or 3 more (if we added ...)
|
||||
* @param int $size Max string size visible. 0 for no limit. Final string size can be 1 more (if size was max+1) or 3 more (if we added ...)
|
||||
* @param string $trunc Where to trunc: right, left, middle (size must be a 2 power), wrap
|
||||
* @param string $stringencoding Tell what is source string encoding
|
||||
* @param int $nodot Truncation do not add ... after truncation. So it's an exact truncation.
|
||||
|
||||
@ -252,92 +252,92 @@ function print_left_auguria_menu($db,$menu_array_before,$menu_array_after,&$tabM
|
||||
// Show menu
|
||||
if (empty($noout))
|
||||
{
|
||||
$alt=0;
|
||||
$num=count($menu_array);
|
||||
for ($i = 0; $i < $num; $i++)
|
||||
{
|
||||
$showmenu=true;
|
||||
if (! empty($conf->global->MAIN_MENU_HIDE_UNAUTHORIZED) && empty($menu_array[$i]['enabled'])) $showmenu=false;
|
||||
|
||||
$alt++;
|
||||
if (empty($menu_array[$i]['level']) && $showmenu)
|
||||
$alt=0;
|
||||
$num=count($menu_array);
|
||||
for ($i = 0; $i < $num; $i++)
|
||||
{
|
||||
if (($alt%2==0))
|
||||
$showmenu=true;
|
||||
if (! empty($conf->global->MAIN_MENU_HIDE_UNAUTHORIZED) && empty($menu_array[$i]['enabled'])) $showmenu=false;
|
||||
|
||||
$alt++;
|
||||
if (empty($menu_array[$i]['level']) && $showmenu)
|
||||
{
|
||||
print '<div class="blockvmenuimpair">'."\n";
|
||||
if (($alt%2==0))
|
||||
{
|
||||
print '<div class="blockvmenuimpair">'."\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<div class="blockvmenupair">'."\n";
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
// Place tabulation
|
||||
$tabstring='';
|
||||
$tabul=($menu_array[$i]['level'] - 1);
|
||||
if ($tabul > 0)
|
||||
{
|
||||
print '<div class="blockvmenupair">'."\n";
|
||||
for ($j=0; $j < $tabul; $j++)
|
||||
{
|
||||
$tabstring.=' ';
|
||||
}
|
||||
}
|
||||
|
||||
// Add mainmenu in GET url. This make to go back on correct menu even when using Back on browser.
|
||||
$url=dol_buildpath($menu_array[$i]['url'],1);
|
||||
$url=preg_replace('/__LOGIN__/',$user->login,$url);
|
||||
$url=preg_replace('/__USERID__/',$user->id,$url);
|
||||
|
||||
if (! preg_match('/mainmenu=/i',$menu_array[$i]['url']))
|
||||
{
|
||||
if (! preg_match('/\?/',$url)) $url.='?';
|
||||
else $url.='&';
|
||||
$url.='mainmenu='.$mainmenu;
|
||||
}
|
||||
|
||||
print '<!-- Add menu entry with mainmenu='.$menu_array[$i]['mainmenu'].', leftmenu='.$menu_array[$i]['leftmenu'].', level='.$menu_array[$i]['level'].' -->'."\n";
|
||||
|
||||
// Menu niveau 0
|
||||
if ($menu_array[$i]['level'] == 0)
|
||||
{
|
||||
if ($menu_array[$i]['enabled'])
|
||||
{
|
||||
print '<div class="menu_titre">'.$tabstring.'<a class="vmenu" href="'.$url.'"'.($menu_array[$i]['target']?' target="'.$menu_array[$i]['target'].'"':'').'>'.$menu_array[$i]['titre'].'</a></div>';
|
||||
}
|
||||
else if ($showmenu)
|
||||
{
|
||||
print '<div class="menu_titre">'.$tabstring.'<font class="vmenudisabled">'.$menu_array[$i]['titre'].'</font></div>'."\n";
|
||||
}
|
||||
if ($showmenu)
|
||||
print '<div class="menu_top"></div>'."\n";
|
||||
}
|
||||
// Menu niveau > 0
|
||||
if ($menu_array[$i]['level'] > 0)
|
||||
{
|
||||
if ($menu_array[$i]['enabled'])
|
||||
{
|
||||
print '<div class="menu_contenu">'.$tabstring;
|
||||
if ($menu_array[$i]['url']) print '<a class="vsmenu" href="'.$url.'"'.($menu_array[$i]['target']?' target="'.$menu_array[$i]['target'].'"':'').'>';
|
||||
print $menu_array[$i]['titre'];
|
||||
if ($menu_array[$i]['url']) print '</a>';
|
||||
// If title is not pure text and contains a table, no carriage return added
|
||||
if (! strstr($menu_array[$i]['titre'],'<table')) print '<br>';
|
||||
print '</div>'."\n";
|
||||
}
|
||||
else if ($showmenu)
|
||||
{
|
||||
print '<div class="menu_contenu">'.$tabstring.'<font class="vsmenudisabled vsmenudisabledmargin">'.$menu_array[$i]['titre'].'</font><br></div>'."\n";
|
||||
}
|
||||
}
|
||||
|
||||
// If next is a new block or end
|
||||
if (empty($menu_array[$i+1]['level']))
|
||||
{
|
||||
if ($showmenu)
|
||||
print '<div class="menu_end"></div>'."\n";
|
||||
print "</div>\n";
|
||||
}
|
||||
}
|
||||
|
||||
// Place tabulation
|
||||
$tabstring='';
|
||||
$tabul=($menu_array[$i]['level'] - 1);
|
||||
if ($tabul > 0)
|
||||
{
|
||||
for ($j=0; $j < $tabul; $j++)
|
||||
{
|
||||
$tabstring.=' ';
|
||||
}
|
||||
}
|
||||
|
||||
// Add mainmenu in GET url. This make to go back on correct menu even when using Back on browser.
|
||||
$url=dol_buildpath($menu_array[$i]['url'],1);
|
||||
$url=preg_replace('/__LOGIN__/',$user->login,$url);
|
||||
$url=preg_replace('/__USERID__/',$user->id,$url);
|
||||
|
||||
if (! preg_match('/mainmenu=/i',$menu_array[$i]['url']))
|
||||
{
|
||||
if (! preg_match('/\?/',$url)) $url.='?';
|
||||
else $url.='&';
|
||||
$url.='mainmenu='.$mainmenu;
|
||||
}
|
||||
|
||||
print '<!-- Add menu entry with mainmenu='.$menu_array[$i]['mainmenu'].', leftmenu='.$menu_array[$i]['leftmenu'].', level='.$menu_array[$i]['level'].' -->'."\n";
|
||||
|
||||
// Menu niveau 0
|
||||
if ($menu_array[$i]['level'] == 0)
|
||||
{
|
||||
if ($menu_array[$i]['enabled'])
|
||||
{
|
||||
print '<div class="menu_titre">'.$tabstring.'<a class="vmenu" href="'.$url.'"'.($menu_array[$i]['target']?' target="'.$menu_array[$i]['target'].'"':'').'>'.$menu_array[$i]['titre'].'</a></div>';
|
||||
}
|
||||
else if ($showmenu)
|
||||
{
|
||||
print '<div class="menu_titre">'.$tabstring.'<font class="vmenudisabled">'.$menu_array[$i]['titre'].'</font></div>'."\n";
|
||||
}
|
||||
if ($showmenu)
|
||||
print '<div class="menu_top"></div>'."\n";
|
||||
}
|
||||
// Menu niveau > 0
|
||||
if ($menu_array[$i]['level'] > 0)
|
||||
{
|
||||
if ($menu_array[$i]['enabled'])
|
||||
{
|
||||
print '<div class="menu_contenu">'.$tabstring;
|
||||
if ($menu_array[$i]['url']) print '<a class="vsmenu" href="'.$url.'"'.($menu_array[$i]['target']?' target="'.$menu_array[$i]['target'].'"':'').'>';
|
||||
print $menu_array[$i]['titre'];
|
||||
if ($menu_array[$i]['url']) print '</a>';
|
||||
// If title is not pure text and contains a table, no carriage return added
|
||||
if (! strstr($menu_array[$i]['titre'],'<table')) print '<br>';
|
||||
print '</div>'."\n";
|
||||
}
|
||||
else if ($showmenu)
|
||||
{
|
||||
print '<div class="menu_contenu">'.$tabstring.'<font class="vsmenudisabled">'.$menu_array[$i]['titre'].'</font><br></div>'."\n";
|
||||
}
|
||||
}
|
||||
|
||||
// If next is a new block or end
|
||||
if (empty($menu_array[$i+1]['level']))
|
||||
{
|
||||
if ($showmenu)
|
||||
print '<div class="menu_end"></div>'."\n";
|
||||
print "</div>\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return count($menu_array);
|
||||
|
||||
@ -160,7 +160,7 @@ class MenuManager
|
||||
*/
|
||||
function showmenu($mode)
|
||||
{
|
||||
global $conf, $langs;
|
||||
global $conf, $langs, $user;
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/menus/standard/auguria.lib.php';
|
||||
|
||||
@ -175,8 +175,8 @@ class MenuManager
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/menu.class.php';
|
||||
$this->menu=new Menu();
|
||||
|
||||
if ($mode == 'top') $res=print_auguria_menu($this->db,$this->atarget,$this->type_user,$this->tabMenu,$this->menu);
|
||||
if ($mode == 'left') $res=print_left_auguria_menu($this->db,$this->menu_array,$this->menu_array_after,$this->tabMenu,$this->menu);
|
||||
if ($mode == 'top') $res=print_auguria_menu($this->db,$this->atarget,$this->type_user,$this->tabMenu,$this->menu,0);
|
||||
if ($mode == 'left') $res=print_left_auguria_menu($this->db,$this->menu_array,$this->menu_array_after,$this->tabMenu,$this->menu,0);
|
||||
if ($mode == 'jmobile')
|
||||
{
|
||||
$res=print_auguria_menu($this->db,$this->atarget,$this->type_user,$this->tabMenu,$this->menu,1);
|
||||
@ -188,6 +188,8 @@ class MenuManager
|
||||
if ($val['enabled'] == 1)
|
||||
{
|
||||
$relurl=dol_buildpath($val['url'],1);
|
||||
$relurl=preg_replace('/__LOGIN__/',$user->login,$relurl);
|
||||
$relurl=preg_replace('/__USERID__/',$user->id,$relurl);
|
||||
|
||||
print '<a href="#">'.$val['titre'].'</a>'."\n";
|
||||
// Search submenu fot this entry
|
||||
@ -198,12 +200,13 @@ class MenuManager
|
||||
$res=print_left_auguria_menu($this->db,$this->menu_array,$this->menu_array_after,$this->tabMenu,$submenu,1,$tmpmainmenu,$tmpleftmenu);
|
||||
//var_dump($submenu->liste);
|
||||
$nexturl=dol_buildpath($submenu->liste[0]['url'],1);
|
||||
|
||||
$canonrelurl=preg_replace('/\?.*$/','',$relurl);
|
||||
$canonnexturl=preg_replace('/\?.*$/','',$nexturl);
|
||||
//var_dump($canonrelurl);
|
||||
//var_dump($canonnexturl);
|
||||
print '<ul>';
|
||||
if ($canonrelurl != $canonnexturl && $val['mainmenu'] != 'home')
|
||||
if ($canonrelurl != $canonnexturl && ! in_array($val['mainmenu'],array('home','tools')))
|
||||
{
|
||||
// We add sub entry
|
||||
print '<li data-role="list-divider"><a href="'.$relurl.'">'.$langs->trans("MainArea").'-'.$val['titre'].'</a></li>'."\n";
|
||||
@ -211,9 +214,11 @@ class MenuManager
|
||||
foreach($submenu->liste as $key2 => $val2) // $val['url','titre','level','enabled'=0|1|2,'target','mainmenu','leftmenu'
|
||||
{
|
||||
$relurl2=dol_buildpath($val2['url'],1);
|
||||
$relurl2=preg_replace('/__LOGIN__/',$user->login,$relurl2);
|
||||
$relurl2=preg_replace('/__USERID__/',$user->id,$relurl2);
|
||||
$canonurl2=preg_replace('/\?.*$/','',$val2['url']);
|
||||
//var_dump($val2['url'].' - '.$canonurl2.' - '.$val2['level']);
|
||||
if (in_array($canonurl2,array('/admin/index.php','/admin/tools/index.php'))) $relurl2='';
|
||||
if (in_array($canonurl2,array('/admin/index.php','/admin/tools/index.php','/core/tools.php'))) $relurl2='';
|
||||
print '<li'.($val2['level']==0?' data-role="list-divider"':'').'>';
|
||||
if ($relurl2) print '<a href="'.$relurl2.'">';
|
||||
print $val2['titre'];
|
||||
|
||||
@ -1242,7 +1242,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu
|
||||
}
|
||||
else if ($showmenu)
|
||||
{
|
||||
print '<div class="menu_contenu">'.$tabstring.'<font class="vsmenudisabled">'.$menu_array[$i]['titre'].'</font><br></div>'."\n";
|
||||
print '<div class="menu_contenu">'.$tabstring.'<font class="vsmenudisabled vsmenudisabledmargin">'.$menu_array[$i]['titre'].'</font><br></div>'."\n";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -116,7 +116,7 @@ class MenuManager
|
||||
*/
|
||||
function showmenu($mode)
|
||||
{
|
||||
global $conf, $langs;
|
||||
global $conf, $langs, $user;
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/menus/standard/eldy.lib.php';
|
||||
|
||||
@ -131,8 +131,8 @@ class MenuManager
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/menu.class.php';
|
||||
$this->menu=new Menu();
|
||||
|
||||
if ($mode == 'top') $res=print_eldy_menu($this->db,$this->atarget,$this->type_user,$this->tabMenu,$this->menu);
|
||||
if ($mode == 'left') $res=print_left_eldy_menu($this->db,$this->menu_array,$this->menu_array_after,$this->tabMenu,$this->menu);
|
||||
if ($mode == 'top') $res=print_eldy_menu($this->db,$this->atarget,$this->type_user,$this->tabMenu,$this->menu,0);
|
||||
if ($mode == 'left') $res=print_left_eldy_menu($this->db,$this->menu_array,$this->menu_array_after,$this->tabMenu,$this->menu,0);
|
||||
if ($mode == 'jmobile')
|
||||
{
|
||||
$res=print_eldy_menu($this->db,$this->atarget,$this->type_user,$this->tabMenu,$this->menu,1);
|
||||
@ -144,6 +144,8 @@ class MenuManager
|
||||
if ($val['enabled'] == 1)
|
||||
{
|
||||
$relurl=dol_buildpath($val['url'],1);
|
||||
$relurl=preg_replace('/__LOGIN__/',$user->login,$relurl);
|
||||
$relurl=preg_replace('/__USERID__/',$user->id,$relurl);
|
||||
|
||||
print '<a href="#">'.$val['titre'].'</a>'."\n";
|
||||
// Search submenu fot this entry
|
||||
@ -152,6 +154,7 @@ class MenuManager
|
||||
$submenu=new Menu();
|
||||
$res=print_left_eldy_menu($this->db,$this->menu_array,$this->menu_array_after,$this->tabMenu,$submenu,1,$tmpmainmenu,$tmpleftmenu);
|
||||
$nexturl=dol_buildpath($submenu->liste[0]['url'],1);
|
||||
|
||||
$canonrelurl=preg_replace('/\?.*$/','',$relurl);
|
||||
$canonnexturl=preg_replace('/\?.*$/','',$nexturl);
|
||||
//var_dump($canonrelurl);
|
||||
@ -165,6 +168,8 @@ class MenuManager
|
||||
foreach($submenu->liste as $key2 => $val2) // $val['url','titre','level','enabled'=0|1|2,'target','mainmenu','leftmenu'
|
||||
{
|
||||
$relurl2=dol_buildpath($val2['url'],1);
|
||||
$relurl2=preg_replace('/__LOGIN__/',$user->login,$relurl2);
|
||||
$relurl2=preg_replace('/__USERID__/',$user->id,$relurl2);
|
||||
//var_dump($val2);
|
||||
print '<li'.($val2['level']==0?' data-role="list-divider"':'').'><a href="'.$relurl2.'">'.$val2['titre'].'</a></li>'."\n";
|
||||
}
|
||||
|
||||
@ -60,8 +60,8 @@ class MenuManager
|
||||
/**
|
||||
* Show menu
|
||||
*
|
||||
* @param string $mode 'top' or 'left'
|
||||
* @return void
|
||||
* @param string $mode 'top', 'left', 'jmobile'
|
||||
* @return void
|
||||
*/
|
||||
function showmenu($mode)
|
||||
{
|
||||
@ -72,23 +72,35 @@ class MenuManager
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/menu.class.php';
|
||||
$this->menu=new Menu();
|
||||
|
||||
if ($mode == 'top')
|
||||
$res='ErrorBadParameterForMode';
|
||||
|
||||
$noout=0;
|
||||
if ($mode == 'jmobile') $noout=1;
|
||||
|
||||
if ($mode == 'top' || $mode == 'jmobile')
|
||||
{
|
||||
print_start_menu_array_empty();
|
||||
if (empty($noout)) print_start_menu_array_empty();
|
||||
|
||||
// Home
|
||||
$showmode=1;
|
||||
$idsel='home';
|
||||
$classname='class="tmenusel"';
|
||||
|
||||
print_start_menu_entry_empty($idsel, $classname, $showmode);
|
||||
print_text_menu_entry_empty($langs->trans("Home"), 1, dol_buildpath('/index.php',1).'?mainmenu=home&leftmenu=', $id, $idsel, $classname, $this->atarget);
|
||||
print_end_menu_entry_empty($showmode);
|
||||
if (empty($noout)) print_start_menu_entry_empty($idsel, $classname, $showmode);
|
||||
if (empty($noout)) print_text_menu_entry_empty($langs->trans("Home"), 1, dol_buildpath('/index.php',1).'?mainmenu=home&leftmenu=', $id, $idsel, $classname, $this->atarget);
|
||||
if (empty($noout)) print_end_menu_entry_empty($showmode);
|
||||
$this->menu->add(dol_buildpath('/index.php',1), $langs->trans("Home"), 0, $showmode, $this->atarget, 'home', '');
|
||||
|
||||
print_end_menu_array_empty();
|
||||
if (empty($noout)) print_end_menu_array_empty();
|
||||
|
||||
if ($mode == 'jmobile')
|
||||
{
|
||||
$this->topmenu=dol_clone($this->menu);
|
||||
unset($this->menu->liste);
|
||||
}
|
||||
}
|
||||
|
||||
if ($mode == 'left')
|
||||
if ($mode == 'left' || $mode == 'jmobile')
|
||||
{
|
||||
// Put here left menu entries
|
||||
// ***** START *****
|
||||
@ -113,65 +125,131 @@ class MenuManager
|
||||
|
||||
// do not change code after this
|
||||
|
||||
$alt=0;
|
||||
$num=count($this->menu->liste);
|
||||
for ($i = 0; $i < $num; $i++)
|
||||
if (empty($noout))
|
||||
{
|
||||
$alt++;
|
||||
if (empty($this->menu->liste[$i]['level']))
|
||||
$alt=0;
|
||||
$num=count($this->menu->liste);
|
||||
for ($i = 0; $i < $num; $i++)
|
||||
{
|
||||
if (($alt%2==0))
|
||||
$alt++;
|
||||
if (empty($this->menu->liste[$i]['level']))
|
||||
{
|
||||
print '<div class="blockvmenuimpair">'."\n";
|
||||
if (($alt%2==0))
|
||||
{
|
||||
print '<div class="blockvmenuimpair">'."\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<div class="blockvmenupair">'."\n";
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
// Place tabulation
|
||||
$tabstring='';
|
||||
$tabul=($this->menu->liste[$i]['level'] - 1);
|
||||
if ($tabul > 0)
|
||||
{
|
||||
print '<div class="blockvmenupair">'."\n";
|
||||
for ($j=0; $j < $tabul; $j++)
|
||||
{
|
||||
$tabstring.=' ';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Place tabulation
|
||||
$tabstring='';
|
||||
$tabul=($this->menu->liste[$i]['level'] - 1);
|
||||
if ($tabul > 0)
|
||||
{
|
||||
for ($j=0; $j < $tabul; $j++)
|
||||
if ($this->menu->liste[$i]['level'] == 0) {
|
||||
if ($this->menu->liste[$i]['enabled'])
|
||||
{
|
||||
print '<div class="menu_titre">'.$tabstring.'<a class="vmenu" href="'.dol_buildpath($this->menu->liste[$i]['url'],1).'"'.($this->menu->liste[$i]['target']?' target="'.$this->menu->liste[$i]['target'].'"':'').'>'.$this->menu->liste[$i]['titre'].'</a></div>'."\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<div class="menu_titre">'.$tabstring.'<font class="vmenudisabled">'.$this->menu->liste[$i]['titre'].'</font></div>'."\n";
|
||||
}
|
||||
print '<div class="menu_top"></div>'."\n";
|
||||
}
|
||||
|
||||
if ($this->menu->liste[$i]['level'] > 0) {
|
||||
print '<div class="menu_contenu">';
|
||||
|
||||
if ($this->menu->liste[$i]['enabled'])
|
||||
print $tabstring.'<a class="vsmenu" href="'.dol_buildpath($this->menu->liste[$i]['url'],1).'">'.$this->menu->liste[$i]['titre'].'</a><br>';
|
||||
else
|
||||
print $tabstring.'<font class="vsmenudisabled vsmenudisabledmargin">'.$this->menu->liste[$i]['titre'].'</font><br>';
|
||||
|
||||
print '</div>'."\n";
|
||||
}
|
||||
|
||||
// If next is a new block or end
|
||||
if (empty($this->menu->liste[$i+1]['level']))
|
||||
{
|
||||
$tabstring.=' ';
|
||||
print '<div class="menu_end"></div>'."\n";
|
||||
print "</div>\n";
|
||||
}
|
||||
}
|
||||
|
||||
if ($this->menu->liste[$i]['level'] == 0) {
|
||||
if ($this->menu->liste[$i]['enabled'])
|
||||
{
|
||||
print '<div class="menu_titre">'.$tabstring.'<a class="vmenu" href="'.dol_buildpath($this->menu->liste[$i]['url'],1).'"'.($this->menu->liste[$i]['target']?' target="'.$this->menu->liste[$i]['target'].'"':'').'>'.$this->menu->liste[$i]['titre'].'</a></div>'."\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<div class="menu_titre">'.$tabstring.'<font class="vmenudisabled">'.$this->menu->liste[$i]['titre'].'</font></div>'."\n";
|
||||
}
|
||||
print '<div class="menu_top"></div>'."\n";
|
||||
}
|
||||
|
||||
if ($this->menu->liste[$i]['level'] > 0) {
|
||||
print '<div class="menu_contenu">';
|
||||
|
||||
if ($this->menu->liste[$i]['enabled'])
|
||||
print $tabstring.'<a class="vsmenu" href="'.dol_buildpath($this->menu->liste[$i]['url'],1).'">'.$this->menu->liste[$i]['titre'].'</a><br>';
|
||||
else
|
||||
print $tabstring.'<font class="vsmenudisabled">'.$this->menu->liste[$i]['titre'].'</font><br>';
|
||||
|
||||
print '</div>'."\n";
|
||||
}
|
||||
|
||||
// If next is a new block or end
|
||||
if (empty($this->menu->liste[$i+1]['level']))
|
||||
{
|
||||
print '<div class="menu_end"></div>'."\n";
|
||||
print "</div>\n";
|
||||
}
|
||||
}
|
||||
|
||||
if ($mode == 'jmobile')
|
||||
{
|
||||
$this->leftmenu=dol_clone($this->menu);
|
||||
unset($this->menu->liste);
|
||||
}
|
||||
}
|
||||
|
||||
if ($mode == 'jmobile')
|
||||
{
|
||||
foreach($this->topmenu->liste as $key => $val) // $val['url','titre','level','enabled'=0|1|2,'target','mainmenu','leftmenu'
|
||||
{
|
||||
print '<ul data-role="listview" data-inset="true">';
|
||||
print '<li data-role="list-divider">';
|
||||
if ($val['enabled'] == 1)
|
||||
{
|
||||
$relurl=dol_buildpath($val['url'],1);
|
||||
$relurl=preg_replace('/__LOGIN__/',$user->login,$relurl);
|
||||
$relurl=preg_replace('/__USERID__/',$user->id,$relurl);
|
||||
|
||||
print '<a href="#">'.$val['titre'].'</a>'."\n";
|
||||
// Search submenu fot this entry
|
||||
$tmpmainmenu=$val['mainmenu'];
|
||||
$tmpleftmenu='all';
|
||||
//$submenu=new Menu();
|
||||
//$res=print_left_eldy_menu($this->db,$this->menu_array,$this->menu_array_after,$this->tabMenu,$submenu,1,$tmpmainmenu,$tmpleftmenu);
|
||||
//$nexturl=dol_buildpath($submenu->liste[0]['url'],1);
|
||||
$submenu=$this->leftmenu;
|
||||
|
||||
$canonrelurl=preg_replace('/\?.*$/','',$relurl);
|
||||
$canonnexturl=preg_replace('/\?.*$/','',$nexturl);
|
||||
//var_dump($canonrelurl);
|
||||
//var_dump($canonnexturl);
|
||||
print '<ul>';
|
||||
if ($canonrelurl != $canonnexturl && ! in_array($val['mainmenu'],array('home','tools')))
|
||||
{
|
||||
// We add sub entry
|
||||
print '<li data-role="list-divider"><a href="'.$relurl.'">'.$langs->trans("MainArea").'-'.$val['titre'].'</a></li>'."\n";
|
||||
}
|
||||
foreach($submenu->liste as $key2 => $val2) // $val['url','titre','level','enabled'=0|1|2,'target','mainmenu','leftmenu'
|
||||
{
|
||||
$relurl2=dol_buildpath($val2['url'],1);
|
||||
$relurl2=preg_replace('/__LOGIN__/',$user->login,$relurl2);
|
||||
$relurl2=preg_replace('/__USERID__/',$user->id,$relurl2);
|
||||
//var_dump($val2);
|
||||
print '<li'.($val2['level']==0?' data-role="list-divider"':'').'><a href="'.$relurl2.'">'.$val2['titre'].'</a></li>'."\n";
|
||||
}
|
||||
//var_dump($submenu);
|
||||
print '</ul>';
|
||||
}
|
||||
if ($val['enabled'] == 2)
|
||||
{
|
||||
print '<font class="vsmenudisabled">'.$val['titre'].'</font>';
|
||||
}
|
||||
print '</li>';
|
||||
print '</ul>'."\n";
|
||||
|
||||
break; // Only first menu entry (so home)
|
||||
}
|
||||
}
|
||||
|
||||
unset($this->menu);
|
||||
|
||||
return $res;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -105,34 +105,31 @@ if ($action == 'confirm_execute' && $confirm == "yes" && $user->rights->cron->ex
|
||||
/*
|
||||
* View
|
||||
*/
|
||||
if (!empty($status)) {
|
||||
$pagetitle=$langs->trans("CronListActive");
|
||||
}else {
|
||||
$pagetitle=$langs->trans("CronListInactive");
|
||||
}
|
||||
|
||||
llxHeader('',$pagetitle);
|
||||
|
||||
|
||||
// Form object for popup
|
||||
$form = new Form($db);
|
||||
|
||||
if ($action == 'delete')
|
||||
{
|
||||
$ret=$form->form_confirm($_SERVER['PHP_SELF']."?id=".$id.'&status='.$status,$langs->trans("CronDelete"),$langs->trans("CronConfirmDelete"),"confirm_delete",'','',1);
|
||||
if ($ret == 'html') print '<br>';
|
||||
}
|
||||
|
||||
if ($action == 'execute'){
|
||||
$ret=$form->form_confirm($_SERVER['PHP_SELF']."?id=".$id.'&status='.$status,$langs->trans("CronExecute"),$langs->trans("CronConfirmExecute"),"confirm_execute",'','',1);
|
||||
if ($ret == 'html') print '<br>';
|
||||
}
|
||||
if (!empty($status)) $pagetitle=$langs->trans("CronListActive");
|
||||
else $pagetitle=$langs->trans("CronListInactive");
|
||||
|
||||
llxHeader('',$pagetitle);
|
||||
|
||||
print_fiche_titre($pagetitle,'','setup');
|
||||
|
||||
print $langs->trans('CronInfo');
|
||||
|
||||
|
||||
if ($action == 'delete')
|
||||
{
|
||||
$ret=$form->form_confirm($_SERVER['PHP_SELF']."?id=".$id.'&status='.$status,$langs->trans("CronDelete"),$langs->trans("CronConfirmDelete"),"confirm_delete",'','',1);
|
||||
if ($ret == 'html') print '<br>';
|
||||
}
|
||||
|
||||
if ($action == 'execute'){
|
||||
$ret=$form->form_confirm($_SERVER['PHP_SELF']."?id=".$id.'&status='.$status,$langs->trans("CronExecute"),$langs->trans("CronConfirmExecute"),"confirm_execute",'','',1);
|
||||
if ($ret == 'html') print '<br>';
|
||||
}
|
||||
|
||||
|
||||
// liste des jobs creer
|
||||
$object = new Cronjob($db);
|
||||
$result=$object->fetch_all($sortorder, $sortfield, $limit, $offset, $status, $filter);
|
||||
@ -141,13 +138,11 @@ if ($result < 0) {
|
||||
}
|
||||
|
||||
|
||||
print "<p><h2>";
|
||||
print $langs->trans('CronWaitingJobs');
|
||||
print "</h2></p>";
|
||||
print "<br><br>";
|
||||
|
||||
if (count($object->lines)>0) {
|
||||
|
||||
print '<table width="100%" cellspacing="0" cellpadding="4" class="border">';
|
||||
print '<table class="noborder">';
|
||||
print '<tr class="liste_titre">';
|
||||
$arg_url='&page='.$page.'&status='.$status.'&search_label='.$search_label;
|
||||
print_liste_field_titre($langs->trans("CronLabel"),$_SERVEUR['PHP_SELF'],"t.label","",$arg_url,'',$sortfield,$sortorder);
|
||||
|
||||
@ -41,7 +41,7 @@ class FactureFournisseur extends CommonInvoice
|
||||
public $fk_element='fk_facture_fourn';
|
||||
protected $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe
|
||||
|
||||
var $ref;
|
||||
var $ref;
|
||||
var $product_ref;
|
||||
var $ref_supplier;
|
||||
var $socid;
|
||||
@ -134,7 +134,7 @@ class FactureFournisseur extends CommonInvoice
|
||||
|
||||
$sql = "INSERT INTO ".MAIN_DB_PREFIX."facture_fourn (";
|
||||
$sql.= "ref";
|
||||
$sql.= ", facnumber";
|
||||
$sql.= ", ref_supplier";
|
||||
$sql.= ", entity";
|
||||
$sql.= ", libelle";
|
||||
$sql.= ", fk_soc";
|
||||
@ -263,7 +263,7 @@ class FactureFournisseur extends CommonInvoice
|
||||
$sql = "SELECT";
|
||||
$sql.= " t.rowid,";
|
||||
$sql.= " t.ref,";
|
||||
$sql.= " t.facnumber,";
|
||||
$sql.= " t.ref_supplier,";
|
||||
$sql.= " t.entity,";
|
||||
$sql.= " t.type,";
|
||||
$sql.= " t.fk_soc,";
|
||||
@ -298,7 +298,7 @@ class FactureFournisseur extends CommonInvoice
|
||||
$sql.= ' s.nom as socnom, s.rowid as socid';
|
||||
$sql.= ' FROM '.MAIN_DB_PREFIX.'facture_fourn as t,'.MAIN_DB_PREFIX.'societe as s';
|
||||
if ($id) $sql.= " WHERE t.rowid=".$id;
|
||||
if ($ref) $sql.= " WHERE t.ref='".$this->db->escape($ref)."'"; // ref is id (facnumber is supplier ref)
|
||||
if ($ref) $sql.= " WHERE t.ref='".$this->db->escape($ref)."'";
|
||||
$sql.= ' AND t.fk_soc = s.rowid';
|
||||
|
||||
dol_syslog(get_class($this)."::fetch sql=".$sql, LOG_DEBUG);
|
||||
@ -310,10 +310,9 @@ class FactureFournisseur extends CommonInvoice
|
||||
$obj = $this->db->fetch_object($resql);
|
||||
|
||||
$this->id = $obj->rowid;
|
||||
$this->ref = $obj->ref;
|
||||
$this->ref = $obj->ref?$obj->ref:$obj->rowid; // We take rowid if ref is empty for backward compatibility
|
||||
|
||||
$this->ref_supplier = $obj->facnumber;
|
||||
$this->facnumber = $obj->facnumber;
|
||||
$this->ref_supplier = $obj->ref_supplier;
|
||||
$this->entity = $obj->entity;
|
||||
$this->type = empty($obj->type)?0:$obj->type;
|
||||
$this->fk_soc = $obj->fk_soc;
|
||||
@ -501,7 +500,7 @@ class FactureFournisseur extends CommonInvoice
|
||||
// Update request
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX."facture_fourn SET";
|
||||
$sql.= " ref=".(isset($this->ref)?"'".$this->db->escape($this->ref)."'":"null").",";
|
||||
$sql.= " facnumber=".(isset($this->facnumber)?"'".$this->db->escape($this->facnumber)."'":"null").",";
|
||||
$sql.= " ref_supplier=".(isset($this->ref_supplier)?"'".$this->db->escape($this->ref_supplier)."'":"null").",";
|
||||
$sql.= " entity=".(isset($this->entity)?$this->entity:"null").",";
|
||||
$sql.= " type=".(isset($this->type)?$this->type:"null").",";
|
||||
$sql.= " fk_soc=".(isset($this->fk_soc)?$this->fk_soc:"null").",";
|
||||
@ -665,38 +664,6 @@ class FactureFournisseur extends CommonInvoice
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Set supplier ref
|
||||
*
|
||||
* @param User $user User that make change
|
||||
* @param string $ref_supplier Supplier ref
|
||||
* @return int <0 if KO, >0 if OK
|
||||
*/
|
||||
function set_ref_supplier($user, $ref_supplier)
|
||||
{
|
||||
if ($user->rights->fournisseur->facture->creer)
|
||||
{
|
||||
$sql = 'UPDATE '.MAIN_DB_PREFIX.'facture_fourn SET facnumber = '.(empty($ref_supplier) ? 'NULL' : '\''.$this->db->escape($ref_supplier).'\'');
|
||||
$sql.= ' WHERE rowid = '.$this->id;
|
||||
|
||||
dol_syslog("FactureFournisseur::set_ref_supplier sql=".$sql);
|
||||
if ($this->db->query($sql))
|
||||
{
|
||||
$this->ref_supplier = $ref_supplier;
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->error=$this->db->lasterror();
|
||||
dol_syslog('FactureFournisseur::set_ref_supplier '.$this->error.' - '.$sql, LOG_ERR);
|
||||
return -2;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Tag invoice as a payed invoice
|
||||
@ -1349,8 +1316,11 @@ class FactureFournisseur extends CommonInvoice
|
||||
$label=$langs->trans("ShowInvoice").': '.$this->ref;
|
||||
if ($this->ref_supplier) $label.=' / '.$this->ref_supplier;
|
||||
|
||||
$ref=$this->ref;
|
||||
if (empty($ref)) $ref=$this->id;
|
||||
|
||||
if ($withpicto) $result.=($lien.img_object($label,'bill').$lienfin.' ');
|
||||
$result.=$lien.($max?dol_trunc($this->ref,$max):$this->ref).$lienfin;
|
||||
$result.=$lien.($max?dol_trunc($ref,$max):$ref).$lienfin;
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
@ -170,12 +170,13 @@ elseif ($action == 'confirm_paid' && $confirm == 'yes' && $user->rights->fournis
|
||||
}
|
||||
|
||||
// Set supplier ref
|
||||
elseif ($action == 'setfacnumber' && $user->rights->fournisseur->facture->creer)
|
||||
if ($action == 'setref_supplier' && $user->rights->fournisseur->commande->creer)
|
||||
{
|
||||
$object->fetch($id);
|
||||
$result=$object->set_ref_supplier($user, GETPOST('facnumber'));
|
||||
$result=$object->setValueFrom('ref_supplier',GETPOST('ref_supplier','alpha'));
|
||||
if ($result < 0) dol_print_error($db, $object->error);
|
||||
}
|
||||
|
||||
|
||||
// Set label
|
||||
elseif ($action == 'setlabel' && $user->rights->fournisseur->facture->creer)
|
||||
{
|
||||
@ -253,7 +254,7 @@ elseif ($action == 'add' && $user->rights->fournisseur->facture->creer)
|
||||
$_GET['socid']=$_POST['socid'];
|
||||
$error++;
|
||||
}
|
||||
if (! GETPOST('facnumber'))
|
||||
if (! GETPOST('ref_supplier'))
|
||||
{
|
||||
$mesg='<div class="error">'.$langs->trans('ErrorFieldRequired',$langs->transnoentities('RefSupplier')).'</div>';
|
||||
$action='create';
|
||||
@ -267,7 +268,7 @@ elseif ($action == 'add' && $user->rights->fournisseur->facture->creer)
|
||||
|
||||
// Creation facture
|
||||
$object->ref = $_POST['ref'];
|
||||
$object->facnumber = $_POST['facnumber'];
|
||||
$object->ref_supplier = $_POST['ref_supplier'];
|
||||
$object->socid = $_POST['socid'];
|
||||
$object->libelle = $_POST['libelle'];
|
||||
$object->date = $datefacture;
|
||||
@ -1048,7 +1049,7 @@ if ($action == 'create')
|
||||
print '</td>';
|
||||
|
||||
// Ref supplier
|
||||
print '<tr><td class="fieldrequired">'.$langs->trans('RefSupplier').'</td><td><input name="facnumber" value="'.(isset($_POST['facnumber'])?$_POST['facnumber']:$fac_ori->ref).'" type="text"></td>';
|
||||
print '<tr><td class="fieldrequired">'.$langs->trans('RefSupplier').'</td><td><input name="ref_supplier" value="'.(isset($_POST['ref_supplier'])?$_POST['ref_supplier']:$fac_ori->ref).'" type="text"></td>';
|
||||
print '</tr>';
|
||||
|
||||
print '<tr><td valign="top" class="fieldrequired">'.$langs->trans('Type').'</td><td colspan="2">';
|
||||
@ -1252,14 +1253,16 @@ else
|
||||
$productstatic = new Product($db);
|
||||
|
||||
$object->fetch($id);
|
||||
$object->fetch_thirdparty();
|
||||
$result=$object->fetch_thirdparty();
|
||||
if ($result < 0) dol_print_error($db);
|
||||
|
||||
$societe = new Fournisseur($db);
|
||||
$societe->fetch($object->socid);
|
||||
$result=$societe->fetch($object->socid);
|
||||
if ($result < 0) dol_print_error($db);
|
||||
|
||||
/*
|
||||
* View card
|
||||
*/
|
||||
*/
|
||||
$head = facturefourn_prepare_head($object);
|
||||
$titre=$langs->trans('SupplierInvoice');
|
||||
dol_fiche_head($head, 'card', $titre, 0, 'bill');
|
||||
@ -1352,8 +1355,8 @@ else
|
||||
print "</tr>\n";
|
||||
|
||||
// Ref supplier
|
||||
print '<tr><td>'.$form->editfieldkey("RefSupplier",'facnumber',$object->ref_supplier,$object,($object->statut<2 && $user->rights->fournisseur->facture->creer)).'</td><td colspan="4">';
|
||||
print $form->editfieldval("RefSupplier",'facnumber',$object->ref_supplier,$object,($object->statut<2 && $user->rights->fournisseur->facture->creer));
|
||||
print '<tr><td>'.$form->editfieldkey("RefSupplier",'ref_supplier',$object->ref_supplier,$object,($object->statut<2 && $user->rights->fournisseur->facture->creer)).'</td><td colspan="4">';
|
||||
print $form->editfieldval("RefSupplier",'ref_supplier',$object->ref_supplier,$object,($object->statut<2 && $user->rights->fournisseur->facture->creer));
|
||||
print '</td></tr>';
|
||||
|
||||
// Third party
|
||||
|
||||
@ -89,7 +89,7 @@ if (! $sortorder) $sortorder="ASC";
|
||||
if ($user->rights->fournisseur->facture->lire)
|
||||
{
|
||||
$sql = "SELECT s.rowid as socid, s.nom,";
|
||||
$sql.= " f.rowid as ref, f.facnumber, f.total_ht, f.total_ttc,";
|
||||
$sql.= " f.rowid, f.ref, f.ref_supplier, f.total_ht, f.total_ttc,";
|
||||
$sql.= " f.datef as df, f.date_lim_reglement as datelimite, ";
|
||||
$sql.= " f.paye as paye, f.rowid as facid, f.fk_statut";
|
||||
$sql.= " ,sum(pf.amount) as am";
|
||||
@ -121,7 +121,7 @@ if ($user->rights->fournisseur->facture->lire)
|
||||
}
|
||||
if ($search_ref_supplier)
|
||||
{
|
||||
$sql .= " AND f.facnumber LIKE '%".$search_ref_supplier."%'";
|
||||
$sql .= " AND f.ref_supplier LIKE '%".$search_ref_supplier."%'";
|
||||
}
|
||||
|
||||
if ($search_societe)
|
||||
@ -141,14 +141,14 @@ if ($user->rights->fournisseur->facture->lire)
|
||||
|
||||
if (dol_strlen(GETPOST('sf_re')) > 0)
|
||||
{
|
||||
$sql .= " AND f.facnumber LIKE '%".GETPOST('sf_re')."%'";
|
||||
$sql .= " AND f.ref_supplier LIKE '%".GETPOST('sf_re')."%'";
|
||||
}
|
||||
$sql.= " GROUP BY f.facnumber, f.rowid, f.total_ht, f.total_ttc, f.datef, f.date_lim_reglement, f.paye, f.fk_statut, s.rowid, s.nom";
|
||||
$sql.= " GROUP BY f.ref_supplier, f.rowid, f.total_ht, f.total_ttc, f.datef, f.date_lim_reglement, f.paye, f.fk_statut, s.rowid, s.nom";
|
||||
|
||||
$sql.= " ORDER BY ";
|
||||
$listfield=explode(',',$sortfield);
|
||||
foreach ($listfield as $key => $value) $sql.=$listfield[$key]." ".$sortorder.",";
|
||||
$sql.= " f.facnumber DESC";
|
||||
$sql.= " f.ref_supplier DESC";
|
||||
|
||||
$resql = $db->query($sql);
|
||||
if ($resql)
|
||||
@ -191,7 +191,7 @@ if ($user->rights->fournisseur->facture->lire)
|
||||
print '<table class="liste" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print_liste_field_titre($langs->trans("Ref"),$_SERVER["PHP_SELF"],"f.rowid","",$param,"",$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("RefSupplier"),$_SERVER["PHP_SELF"],"f.facnumber","",$param,"",$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("RefSupplier"),$_SERVER["PHP_SELF"],"f.ref_supplier","",$param,"",$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("Date"),$_SERVER["PHP_SELF"],"f.datef","",$param,'align="center"',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("DateDue"),$_SERVER["PHP_SELF"],"f.date_lim_reglement","",$param,'align="center"',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("Company"),$_SERVER["PHP_SELF"],"s.nom","",$param,"",$sortfield,$sortorder);
|
||||
@ -242,7 +242,7 @@ if ($user->rights->fournisseur->facture->lire)
|
||||
print $facturestatic->getNomUrl(1);
|
||||
print "</td>\n";
|
||||
|
||||
print "<td nowrap>".dol_trunc($objp->facnumber,12)."</td>\n";
|
||||
print "<td nowrap>".dol_trunc($objp->ref_supplier,12)."</td>\n";
|
||||
|
||||
print "<td nowrap align=\"center\">".dol_print_date($db->jdate($objp->df),'day')."</td>\n";
|
||||
print "<td nowrap align=\"center\">".dol_print_date($db->jdate($objp->datelimite),'day');
|
||||
|
||||
@ -103,7 +103,7 @@ $htmlother=new FormOther($db);
|
||||
llxHeader('',$langs->trans("SuppliersInvoices"),'EN:Suppliers_Invoices|FR:FactureFournisseur|ES:Facturas_de_proveedores');
|
||||
|
||||
$sql = "SELECT s.rowid as socid, s.nom, ";
|
||||
$sql.= " fac.rowid as facid, fac.ref, fac.facnumber, fac.datef, fac.date_lim_reglement as date_echeance,";
|
||||
$sql.= " fac.rowid as facid, fac.ref, fac.ref_supplier, fac.datef, fac.date_lim_reglement as date_echeance,";
|
||||
$sql.= " fac.total_ht, fac.total_ttc, fac.paye as paye, fac.fk_statut as fk_statut, fac.libelle";
|
||||
if (!$user->rights->societe->client->voir && !$socid) $sql .= ", sc.fk_soc, sc.fk_user ";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."facture_fourn as fac";
|
||||
@ -131,7 +131,7 @@ if (GETPOST("search_ref"))
|
||||
}
|
||||
if (GETPOST("search_ref_supplier"))
|
||||
{
|
||||
$sql .= " AND fac.facnumber LIKE '%".$db->escape(GETPOST("search_ref_supplier"))."%'";
|
||||
$sql .= " AND fac.ref_supplier LIKE '%".$db->escape(GETPOST("search_ref_supplier"))."%'";
|
||||
}
|
||||
if ($month > 0)
|
||||
{
|
||||
@ -193,7 +193,7 @@ if ($resql)
|
||||
print '<table class="liste" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print_liste_field_titre($langs->trans("Ref"),$_SERVER["PHP_SELF"],"fac.rowid","",$param,"",$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("RefSupplier"),$_SERVER["PHP_SELF"],"facnumber","",$param,"",$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("RefSupplier"),$_SERVER["PHP_SELF"],"ref_supplier","",$param,"",$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("Date"),$_SERVER["PHP_SELF"],"fac.datef,fac.rowid","",$param,'align="center"',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("DateDue"),$_SERVER["PHP_SELF"],"fac.date_lim_reglement","",$param,'align="center"',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("Label"),$_SERVER["PHP_SELF"],"fac.libelle","",$param,"",$sortfield,$sortorder);
|
||||
@ -249,10 +249,10 @@ if ($resql)
|
||||
print '<td nowrap="nowrap">';
|
||||
$facturestatic->id=$obj->facid;
|
||||
$facturestatic->ref=$obj->ref;
|
||||
$facturestatic->ref_supplier=$obj->facnumber;
|
||||
$facturestatic->ref_supplier=$obj->ref_supplier;
|
||||
print $facturestatic->getNomUrl(1);
|
||||
print "</td>\n";
|
||||
print '<td nowrap="nowrap">'.dol_trunc($obj->facnumber,10)."</td>";
|
||||
print '<td nowrap="nowrap">'.dol_trunc($obj->ref_supplier,10)."</td>";
|
||||
print '<td align="center" nowrap="nowrap">'.dol_print_date($db->jdate($obj->datef),'day').'</td>';
|
||||
print '<td align="center" nowrap="nowrap">'.dol_print_date($db->jdate($obj->date_echeance),'day');
|
||||
if (($obj->paye == 0) && ($obj->fk_statut > 0) && $db->jdate($obj->date_echeance) < ($now - $conf->facture->fournisseur->warning_delay)) print img_picto($langs->trans("Late"),"warning");
|
||||
|
||||
@ -192,7 +192,7 @@ if ($action == 'create' || $action == 'add_paiement')
|
||||
$dateinvoice=($datefacture==''?(empty($conf->global->MAIN_AUTOFILL_DATE)?-1:0):$datefacture);
|
||||
|
||||
$sql = 'SELECT s.nom, s.rowid as socid,';
|
||||
$sql.= ' f.rowid as ref, f.facnumber, f.amount, f.total_ttc as total';
|
||||
$sql.= ' f.rowid, f.ref, f.ref_supplier, f.amount, f.total_ttc as total';
|
||||
if (!$user->rights->societe->client->voir && !$socid) $sql .= ", sc.fk_soc, sc.fk_user ";
|
||||
$sql.= ' FROM '.MAIN_DB_PREFIX.'societe as s, '.MAIN_DB_PREFIX.'facture_fourn as f';
|
||||
if (!$user->rights->societe->client->voir && !$socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
||||
@ -214,7 +214,7 @@ if ($action == 'create' || $action == 'add_paiement')
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<input type="hidden" name="action" value="add_paiement">';
|
||||
print '<input type="hidden" name="facid" value="'.$facid.'">';
|
||||
print '<input type="hidden" name="facnumber" value="'.$obj->facnumber.'">';
|
||||
print '<input type="hidden" name="ref_supplier" value="'.$obj->ref_supplier.'">';
|
||||
print '<input type="hidden" name="socid" value="'.$obj->socid.'">';
|
||||
print '<input type="hidden" name="societe" value="'.$obj->nom.'">';
|
||||
|
||||
@ -257,7 +257,7 @@ if ($action == 'create' || $action == 'add_paiement')
|
||||
/*
|
||||
* Autres factures impayees
|
||||
*/
|
||||
$sql = 'SELECT f.rowid as facid, f.rowid as ref, f.facnumber, f.total_ht, f.total_ttc, f.datef as df';
|
||||
$sql = 'SELECT f.rowid as facid, f.ref, f.ref_supplier, f.total_ht, f.total_ttc, f.datef as df';
|
||||
$sql.= ', SUM(pf.amount) as am';
|
||||
$sql.= ' FROM '.MAIN_DB_PREFIX.'facture_fourn as f';
|
||||
$sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'paiementfourn_facturefourn as pf ON pf.fk_facturefourn = f.rowid';
|
||||
@ -265,7 +265,7 @@ if ($action == 'create' || $action == 'add_paiement')
|
||||
$sql.= ' AND f.fk_soc = '.$object->socid;
|
||||
$sql.= ' AND f.paye = 0';
|
||||
$sql.= ' AND f.fk_statut = 1'; // Statut=0 => non validee, Statut=2 => annulee
|
||||
$sql.= ' GROUP BY f.rowid, f.facnumber, f.total_ht, f.total_ttc, f.datef';
|
||||
$sql.= ' GROUP BY f.rowid, f.ref_supplier, f.total_ht, f.total_ttc, f.datef';
|
||||
$resql = $db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
@ -298,7 +298,7 @@ if ($action == 'create' || $action == 'add_paiement')
|
||||
print '<tr '.$bc[$var].'>';
|
||||
print '<td><a href="fiche.php?facid='.$objp->facid.'">'.img_object($langs->trans('ShowBill'),'bill').' '.$objp->ref;
|
||||
print '</a></td>';
|
||||
print '<td>'.$objp->facnumber.'</td>';
|
||||
print '<td>'.$objp->ref_supplier.'</td>';
|
||||
if ($objp->df > 0 )
|
||||
{
|
||||
print '<td align="center">';
|
||||
@ -441,7 +441,7 @@ if (empty($action))
|
||||
print_liste_field_titre($langs->trans('Type'),'paiement.php','c.libelle','',$paramlist,'',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans('Account'),'paiement.php','ba.label','',$paramlist,'',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans('Amount'),'paiement.php','f.amount','',$paramlist,'align="right"',$sortfield,$sortorder);
|
||||
//print_liste_field_titre($langs->trans('Invoice'),'paiement.php','facnumber','',$paramlist,'',$sortfield,$sortorder);
|
||||
//print_liste_field_titre($langs->trans('Invoice'),'paiement.php','ref_supplier','',$paramlist,'',$sortfield,$sortorder);
|
||||
print "</tr>\n";
|
||||
|
||||
// Lines for filters fields
|
||||
@ -492,7 +492,7 @@ if (empty($action))
|
||||
print '<td align="right">'.price($objp->pamount).'</td>';
|
||||
|
||||
// Ref invoice
|
||||
/*$invoicesupplierstatic->ref=$objp->facnumber;
|
||||
/*$invoicesupplierstatic->ref=$objp->ref_supplier;
|
||||
$invoicesupplierstatic->id=$objp->facid;
|
||||
print '<td nowrap="nowrap">';
|
||||
print $invoicesupplierstatic->getNomUrl(1);
|
||||
|
||||
@ -319,12 +319,12 @@ if ($object->fetch($id))
|
||||
if ($user->rights->fournisseur->facture->lire)
|
||||
{
|
||||
// TODO move to DAO class
|
||||
$sql = 'SELECT f.rowid,f.libelle,f.facnumber,f.fk_statut,f.datef as df,f.total_ttc as amount,f.paye,';
|
||||
$sql = 'SELECT f.rowid,f.libelle,f.ref_supplier,f.fk_statut,f.datef as df,f.total_ttc as amount,f.paye,';
|
||||
$sql.= ' SUM(pf.amount) as am';
|
||||
$sql.= ' FROM '.MAIN_DB_PREFIX.'facture_fourn as f';
|
||||
$sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'paiementfourn_facturefourn as pf ON f.rowid=pf.fk_facturefourn';
|
||||
$sql.= ' WHERE f.fk_soc = '.$object->id;
|
||||
$sql.= ' GROUP BY f.rowid,f.libelle,f.facnumber,f.fk_statut,f.datef,f.total_ttc,f.paye';
|
||||
$sql.= ' GROUP BY f.rowid,f.libelle,f.ref_supplier,f.fk_statut,f.datef,f.total_ttc,f.paye';
|
||||
$sql.= ' ORDER BY f.datef DESC';
|
||||
$resql=$db->query($sql);
|
||||
if ($resql)
|
||||
@ -349,7 +349,7 @@ if ($object->fetch($id))
|
||||
print '<tr '.$bc[$var].'>';
|
||||
print '<td>';
|
||||
print '<a href="facture/fiche.php?facid='.$obj->rowid.'">';
|
||||
print img_object($langs->trans('ShowBill'),'bill').' '.$obj->facnumber.'</a> '.dol_trunc($obj->libelle,14).'</td>';
|
||||
print img_object($langs->trans('ShowBill'),'bill').' '.$obj->ref_supplier.'</a> '.dol_trunc($obj->libelle,14).'</td>';
|
||||
print '<td align="center" nowrap="nowrap">'.dol_print_date($db->jdate($obj->df),'day').'</td>';
|
||||
print '<td align="right" nowrap="nowrap">'.price($obj->amount).'</td>';
|
||||
print '<td align="right" nowrap="nowrap">';
|
||||
|
||||
@ -163,7 +163,7 @@ if (! empty($conf->fournisseur->enabled))
|
||||
// Draft invoices
|
||||
if (! empty($conf->fournisseur->enabled) && $user->rights->fournisseur->facture->lire)
|
||||
{
|
||||
$sql = "SELECT ff.facnumber, ff.rowid, ff.total_ttc, ff.type";
|
||||
$sql = "SELECT ff.ref_supplier, ff.rowid, ff.total_ttc, ff.type";
|
||||
$sql.= ", s.nom, s.rowid as socid";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."facture_fourn as ff";
|
||||
$sql.= ", ".MAIN_DB_PREFIX."societe as s";
|
||||
@ -192,7 +192,7 @@ if (! empty($conf->fournisseur->enabled) && $user->rights->fournisseur->facture-
|
||||
$obj = $db->fetch_object($resql);
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td nowrap="nowrap">';
|
||||
$facturestatic->ref=$obj->facnumber;
|
||||
$facturestatic->ref=$obj->ref;
|
||||
$facturestatic->id=$obj->rowid;
|
||||
$facturestatic->type=$obj->type;
|
||||
print $facturestatic->getNomUrl(1,'');
|
||||
|
||||
@ -234,7 +234,7 @@ if ($result > 0)
|
||||
* Liste des factures
|
||||
*/
|
||||
$allow_delete = 1 ;
|
||||
$sql = 'SELECT f.rowid as ref, f.facnumber as ref_supplier, f.total_ttc, pf.amount, f.rowid as facid, f.paye, f.fk_statut, s.nom, s.rowid as socid';
|
||||
$sql = 'SELECT f.rowid, f.ref, f.ref_supplier, f.total_ttc, pf.amount, f.rowid as facid, f.paye, f.fk_statut, s.nom, s.rowid as socid';
|
||||
$sql .= ' FROM '.MAIN_DB_PREFIX.'paiementfourn_facturefourn as pf,'.MAIN_DB_PREFIX.'facture_fourn as f,'.MAIN_DB_PREFIX.'societe as s';
|
||||
$sql .= ' WHERE pf.fk_facturefourn = f.rowid AND f.fk_soc = s.rowid';
|
||||
$sql .= ' AND pf.fk_paiementfourn = '.$object->id;
|
||||
|
||||
@ -90,7 +90,7 @@ if ($socid > 0)
|
||||
|
||||
print '<table class="noborder" width="100%">';
|
||||
|
||||
$sql = "SELECT s.nom, s.rowid as socid, f.facnumber, f.amount, f.datef as df,";
|
||||
$sql = "SELECT s.nom, s.rowid as socid, f.ref_supplier, f.amount, f.datef as df,";
|
||||
$sql.= " f.paye as paye, f.fk_statut as statut, f.rowid as facid,";
|
||||
$sql.= " u.login, u.rowid as userid";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."societe as s,".MAIN_DB_PREFIX."facture_fourn as f,".MAIN_DB_PREFIX."user as u";
|
||||
|
||||
@ -260,7 +260,7 @@ print '<th class="liste_titre"align="right">'.$langs->trans("Number").'</th>';
|
||||
print '<th class="liste_titre"align="right">'.$langs->trans("Late").'</th>';
|
||||
print '<th class="liste_titre"> </th>';
|
||||
print '<th class="liste_titre"width="20"> </th>';
|
||||
if ($showweather) print '<th class="liste_titre" width="80"> </th>';
|
||||
if ($showweather) print '<th class="liste_titre hideonsmartphone" width="80"> </th>';
|
||||
print '</tr>';
|
||||
|
||||
|
||||
@ -483,7 +483,7 @@ foreach($dashboardlines as $key => $board)
|
||||
print '</td>';
|
||||
if ($showweather)
|
||||
{
|
||||
print '<td class="nohover" rowspan="'.$rowspan.'" width="80" style="border-left: 1px solid #DDDDDD" align="center">';
|
||||
print '<td class="nohover hideonsmartphone" rowspan="'.$rowspan.'" width="80" style="border-left: 1px solid #DDDDDD" align="center">';
|
||||
$text='';
|
||||
if ($totallate > 0) $text=$langs->transnoentitiesnoconv("WarningYouHaveAtLeastOneTaskLate").' ('.$langs->transnoentitiesnoconv("NActionsLate",$totallate).')';
|
||||
$options='height="64px"';
|
||||
|
||||
@ -85,6 +85,7 @@ alter table llx_societe_rib CHANGE COLUMN adresse_proprio owner_address text;
|
||||
alter table llx_societe_address CHANGE COLUMN ville town text;
|
||||
alter table llx_societe_address CHANGE COLUMN cp zip varchar(10);
|
||||
alter table llx_expedition CHANGE COLUMN fk_expedition_methode fk_shipping_method integer;
|
||||
alter table llx_facture_fourn CHANGE COLUMN facnumber ref_supplier varchar(30);
|
||||
|
||||
ALTER TABLE llx_c_shipment_mode ADD COLUMN tracking VARCHAR(256) NOT NULL DEFAULT '' AFTER description;
|
||||
|
||||
@ -208,5 +209,3 @@ ALTER TABLE llx_user ADD COLUMN town varchar(50);
|
||||
ALTER TABLE llx_user ADD COLUMN fk_state integer DEFAULT 0;
|
||||
ALTER TABLE llx_user ADD COLUMN fk_country integer DEFAULT 0;
|
||||
|
||||
|
||||
ALTER TABLE llx_user_clicktodial ADD COLUMN url varchar(255);
|
||||
|
||||
@ -647,9 +647,6 @@ if (! defined('NOLOGIN'))
|
||||
$conf->css = "/theme/".$conf->theme."/style.css.php";
|
||||
}
|
||||
|
||||
// If theme support option like flip-hide left menu and we use a smartphone, we force it
|
||||
if (! empty($conf->global->MAIN_SMARTPHONE_OPTIM) && $conf->browser->phone && $conf->theme == 'eldy') $conf->global->MAIN_MENU_USE_JQUERY_LAYOUT='forced';
|
||||
|
||||
// Set javascript option
|
||||
if (! GETPOST('nojs')) // If javascript was not disabled on URL
|
||||
{
|
||||
@ -949,6 +946,11 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs
|
||||
{
|
||||
print '<link rel="stylesheet" type="text/css" href="'.DOL_URL_ROOT.'/includes/jquery/plugins/timepicker/jquery-ui-timepicker-addon.css" />'."\n";
|
||||
}
|
||||
// jQuery jMobile
|
||||
if (! empty($conf->global->MAIN_USE_JQUERY_JMOBILE) || defined('REQUIRE_JQUERY_JMOBILE') || GETPOST('jmobile'))
|
||||
{
|
||||
print '<link rel="stylesheet" type="text/css" href="'.DOL_URL_ROOT.'/includes/jquery/plugins/mobile/jquery.mobile-latest.min.css" />'."\n";
|
||||
}
|
||||
}
|
||||
|
||||
print '<!-- Includes CSS for Dolibarr theme -->'."\n";
|
||||
@ -969,7 +971,9 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs
|
||||
}
|
||||
$themeparam='?lang='.$langs->defaultlang.'&theme='.$conf->theme.(GETPOST('optioncss')?'&optioncss='.GETPOST('optioncss','alpha',1):'').'&userid='.$user->id.'&entity='.$conf->entity;
|
||||
if (! empty($_SESSION['dol_resetcache'])) $themeparam.='&dol_resetcache='.$_SESSION['dol_resetcache'];
|
||||
//print 'themepath='.$themepath.' themeparam='.$themeparam;exit;
|
||||
if (GETPOST('dol_hide_topmenu')) $themeparam.='&dol_hide_topmenu=1';
|
||||
if (GETPOST('dol_hide_leftmenu')) $themeparam.='&dol_hide_leftmenu=1';
|
||||
//print 'themepath='.$themepath.' themeparam='.$themeparam;exit;
|
||||
print '<link rel="stylesheet" type="text/css" title="default" href="'.$themepath.$themeparam.'">'."\n";
|
||||
|
||||
// CSS forced by modules (relative url starting with /)
|
||||
@ -1005,11 +1009,11 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs
|
||||
if (empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) print '<link rel="copyright" title="GNU General Public License" href="http://www.gnu.org/copyleft/gpl.html#SEC1">'."\n";
|
||||
if (empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) print '<link rel="author" title="Dolibarr Development Team" href="http://www.dolibarr.org">'."\n";
|
||||
|
||||
// Output standard javascript links
|
||||
if (! $disablejs && ! empty($conf->use_javascript_ajax))
|
||||
{
|
||||
$ext='.js';
|
||||
$ext='.js';
|
||||
|
||||
// Output standard javascript links
|
||||
if (! defined('DISABLE_JQUERY') && ! $disablejs && ! empty($conf->use_javascript_ajax))
|
||||
{
|
||||
// JQuery. Must be before other includes
|
||||
print '<!-- Includes JS for JQuery -->'."\n";
|
||||
if (constant('JS_JQUERY')) print '<script type="text/javascript" src="'.JS_JQUERY.'jquery.min'.$ext.'"></script>'."\n";
|
||||
@ -1101,6 +1105,21 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs
|
||||
{
|
||||
print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/includes/jquery/plugins/multiselect/js/ui.multiselect.js"></script>'."\n";
|
||||
}
|
||||
// jQuery Timepicker
|
||||
if (! empty($conf->global->MAIN_USE_JQUERY_TIMEPICKER) || defined('REQUIRE_JQUERY_TIMEPICKER'))
|
||||
{
|
||||
print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/includes/jquery/plugins/timepicker/jquery-ui-timepicker-addon.js"></script>'."\n";
|
||||
print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/core/js/timepicker.js.php?lang='.$langs->defaultlang.'"></script>'."\n";
|
||||
}
|
||||
// jQuery jMobile
|
||||
if (! empty($conf->global->MAIN_USE_JQUERY_JMOBILE) || defined('REQUIRE_JQUERY_JMOBILE') || GETPOST('jmobile'))
|
||||
{
|
||||
print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/includes/jquery/plugins/mobile/jquery.mobile-latest.min.js"></script>'."\n";
|
||||
}
|
||||
}
|
||||
|
||||
if (! $disablejs && ! empty($conf->use_javascript_ajax))
|
||||
{
|
||||
// CKEditor
|
||||
if (! empty($conf->fckeditor->enabled) && (empty($conf->global->FCKEDITOR_EDITORNAME) || $conf->global->FCKEDITOR_EDITORNAME == 'ckeditor'))
|
||||
{
|
||||
@ -1115,11 +1134,6 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs
|
||||
print '</script>'."\n";
|
||||
print '<script type="text/javascript" src="'.$pathckeditor.'ckeditor_basic.js"></script>'."\n";
|
||||
}
|
||||
// jQuery Timepicker
|
||||
if (! empty($conf->global->MAIN_USE_JQUERY_TIMEPICKER) || defined('REQUIRE_JQUERY_TIMEPICKER'))
|
||||
{
|
||||
print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/includes/jquery/plugins/timepicker/jquery-ui-timepicker-addon.js"></script>'."\n";
|
||||
}
|
||||
|
||||
// Global js function
|
||||
print '<!-- Includes JS of Dolibarr -->'."\n";
|
||||
@ -1128,12 +1142,6 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs
|
||||
// Add datepicker default options
|
||||
print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/core/js/datepicker.js.php?lang='.$langs->defaultlang.'"></script>'."\n";
|
||||
|
||||
// add timepicker default options
|
||||
if (! empty($conf->global->MAIN_USE_JQUERY_TIMEPICKER) || defined('REQUIRE_JQUERY_TIMEPICKER'))
|
||||
{
|
||||
print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/core/js/timepicker.js.php?lang='.$langs->defaultlang.'"></script>'."\n";
|
||||
}
|
||||
|
||||
// JS forced by modules (relative url starting with /)
|
||||
if (! empty($conf->modules_parts['js'])) // $conf->modules_parts['js'] is array('module'=>array('file1','file2'))
|
||||
{
|
||||
@ -1294,7 +1302,7 @@ function top_menu($head, $title='', $target='', $disablejs=0, $disablehead=0, $a
|
||||
|
||||
if (! empty($conf->use_javascript_ajax) && ! empty($conf->global->MAIN_MENU_USE_JQUERY_LAYOUT)) print '<div class="ui-layout-north"> <!-- Begin top layout -->'."\n";
|
||||
|
||||
if (empty($_SESSION['dol_hide_topmenu']))
|
||||
if (empty($_SESSION['dol_hide_topmenu']) && ! GETPOST('dol_hide_topmenu'))
|
||||
{
|
||||
print '<div id="tmenu_tooltip" class="tmenu">'."\n";
|
||||
|
||||
@ -1425,7 +1433,7 @@ function left_menu($menu_array_before, $helppagename='', $moresearchform='', $me
|
||||
// Instantiate hooks of thirdparty module
|
||||
$hookmanager->initHooks(array('searchform','leftblock'));
|
||||
|
||||
if (empty($_SESSION['dol_hide_leftmenu']))
|
||||
if (empty($_SESSION['dol_hide_leftmenu']) && ! GETPOST('dol_hide_leftmenu'))
|
||||
{
|
||||
if (! empty($conf->use_javascript_ajax) && ! empty($conf->global->MAIN_MENU_USE_JQUERY_LAYOUT)) print "\n".'<div class="ui-layout-west"> <!-- Begin left layout -->'."\n";
|
||||
else print '<td class="vmenu" valign="top">';
|
||||
|
||||
@ -56,6 +56,9 @@ if (! empty($user->societe_id)) $socid=$user->societe_id;
|
||||
$object = new Product($db);
|
||||
$extrafields = new ExtraFields($db);
|
||||
|
||||
// fetch optionals attributes and labels
|
||||
$extralabels=$extrafields->fetch_name_optionals_label('product');
|
||||
|
||||
if ($id > 0 || ! empty($ref))
|
||||
{
|
||||
$object = new Product($db);
|
||||
@ -212,14 +215,8 @@ if (empty($reshook))
|
||||
}
|
||||
}
|
||||
|
||||
// Get extra fields
|
||||
foreach($_POST as $key => $value)
|
||||
{
|
||||
if (preg_match("/^options_/",$key))
|
||||
{
|
||||
$object->array_options[$key]=$_POST[$key];
|
||||
}
|
||||
}
|
||||
// Fill array 'array_options' with data from add form
|
||||
$ret = $extrafields->setOptionalsFromPost($extralabels,$object);
|
||||
|
||||
$id = $object->create($user);
|
||||
|
||||
@ -272,14 +269,8 @@ if (empty($reshook))
|
||||
$object->finished = GETPOST('finished');
|
||||
$object->hidden = GETPOST('hidden')=='yes'?1:0;
|
||||
|
||||
// Get extra fields
|
||||
foreach($_POST as $key => $value)
|
||||
{
|
||||
if (preg_match("/^options_/",$key))
|
||||
{
|
||||
$object->array_options[$key]=$_POST[$key];
|
||||
}
|
||||
}
|
||||
// Fill array 'array_options' with data from add form
|
||||
$ret = $extrafields->setOptionalsFromPost($extralabels,$object);
|
||||
|
||||
if ($object->check())
|
||||
{
|
||||
@ -632,9 +623,6 @@ if (GETPOST("cancel") == $langs->trans("Cancel"))
|
||||
* View
|
||||
*/
|
||||
|
||||
// fetch optionals attributes and labels
|
||||
$extralabels=$extrafields->fetch_name_optionals_label('product');
|
||||
|
||||
$helpurl='';
|
||||
if (GETPOST("type") == '0') $helpurl='EN:Module_Products|FR:Module_Produits|ES:Módulo_Productos';
|
||||
if (GETPOST("type") == '1') $helpurl='EN:Module_Services_En|FR:Module_Services|ES:Módulo_Servicios';
|
||||
@ -791,16 +779,8 @@ else
|
||||
$parameters=array('colspan' => ' colspan="2"');
|
||||
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook
|
||||
if (empty($reshook) && ! empty($extrafields->attribute_label))
|
||||
{
|
||||
foreach($extrafields->attribute_label as $key=>$label)
|
||||
{
|
||||
$value=(GETPOST('options_'.$key)?GETPOST('options_'.$key):$object->array_options["options_".$key]);
|
||||
print '<tr><td';
|
||||
if (! empty($extrafields->attribute_required[$key])) print ' class="fieldrequired"';
|
||||
print '>'.$label.'</td><td colspan="3">';
|
||||
print $extrafields->showInputField($key,$value);
|
||||
print '</td></tr>'."\n";
|
||||
}
|
||||
{
|
||||
print $object->showOptionals($extrafields,'edit');
|
||||
}
|
||||
|
||||
// Note (private, no output on invoices, propales...)
|
||||
@ -999,15 +979,7 @@ else
|
||||
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook
|
||||
if (empty($reshook) && ! empty($extrafields->attribute_label))
|
||||
{
|
||||
foreach($extrafields->attribute_label as $key=>$label)
|
||||
{
|
||||
$value=(isset($_POST["options_".$key])?$_POST["options_".$key]:$object->array_options["options_".$key]);
|
||||
print '<tr><td';
|
||||
if (! empty($extrafields->attribute_required[$key])) print ' class="fieldrequired"';
|
||||
print '>'.$label.'</td><td colspan="3">';
|
||||
print $extrafields->showInputField($key,$value);
|
||||
print '</td></tr>'."\n";
|
||||
}
|
||||
print $object->showOptionals($extrafields,'edit');
|
||||
}
|
||||
|
||||
// Note
|
||||
@ -1230,14 +1202,8 @@ else
|
||||
$parameters=array('colspan' => ' colspan="'.(2+(($showphoto||$showbarcode)?1:0)).'"');
|
||||
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook
|
||||
if (empty($reshook) && ! empty($extrafields->attribute_label))
|
||||
{
|
||||
foreach($extrafields->attribute_label as $key=>$label)
|
||||
{
|
||||
$value=(isset($_POST["options_".$key])?$_POST["options_".$key]:$object->array_options["options_".$key]);
|
||||
print '<tr><td>'.$label.'</td><td colspan="3">';
|
||||
print $extrafields->showOutputField($key,$value);
|
||||
print '</td></tr>'."\n";
|
||||
}
|
||||
{
|
||||
print $object->showOptionals($extrafields);
|
||||
}
|
||||
|
||||
// Note
|
||||
|
||||
@ -974,40 +974,7 @@ else
|
||||
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook
|
||||
if (empty($reshook) && ! empty($extrafields->attribute_label))
|
||||
{
|
||||
$e=0;
|
||||
foreach($extrafields->attribute_label as $key=>$label)
|
||||
{
|
||||
$colspan='3';
|
||||
$value=(isset($_POST["options_".$key])?$_POST["options_".$key]:(isset($object->array_options["options_".$key])?$object->array_options["options_".$key]:''));
|
||||
if ($extrafields->attribute_type[$key] == 'separate')
|
||||
{
|
||||
print $extrafields->showSeparator($key);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (($e % 2) == 0)
|
||||
{
|
||||
print '<tr>';
|
||||
$colspan='0';
|
||||
}
|
||||
print '<td';
|
||||
if (! empty($extrafields->attribute_required[$key])) print ' class="fieldrequired"';
|
||||
print '>'.$label.'</td>';
|
||||
print '<td colspan="'.$colspan.'">';
|
||||
|
||||
// Convert date into timestamp format
|
||||
if (in_array($extrafields->attribute_type[$key],array('date','datetime')))
|
||||
{
|
||||
$value = dol_mktime($_POST["options_".$key."hour"], $_POST["options_".$key."min"], 0, $_POST["options_".$key."month"], $_POST["options_".$key."day"], $_POST["options_".$key."year"]);
|
||||
}
|
||||
|
||||
print $extrafields->showInputField($key,$value);
|
||||
print '</td>';
|
||||
|
||||
if (($e % 2) == 1) print '</tr>'."\n";
|
||||
$e++;
|
||||
}
|
||||
}
|
||||
print $object->showOptionals($extrafields,'edit');
|
||||
}
|
||||
|
||||
// Ajout du logo
|
||||
@ -1416,37 +1383,7 @@ else
|
||||
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook
|
||||
if (empty($reshook) && ! empty($extrafields->attribute_label))
|
||||
{
|
||||
$old_pos=0;
|
||||
$e=0;
|
||||
foreach($extrafields->attribute_label as $key=>$label)
|
||||
{
|
||||
$colspan = '3';
|
||||
$value=(isset($_POST["options_".$key])?$_POST["options_".$key]:$object->array_options["options_".$key]);
|
||||
if ($extrafields->attribute_type[$key] == 'separate')
|
||||
{
|
||||
print $extrafields->showSeparator($key);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (($e % 2) == 0)
|
||||
{
|
||||
print '<tr>'."\n";
|
||||
$colspan = '0';
|
||||
}
|
||||
print '<td';
|
||||
if (! empty($extrafields->attribute_required[$key])) print ' class="fieldrequired"';
|
||||
print '>'.$label.'</td>'."\n";
|
||||
print '<td colspan="'.$colspan.'">';
|
||||
print $extrafields->showInputField($key,$value);
|
||||
print "</td>"."\n";
|
||||
|
||||
if (($e % 2) == 1 )
|
||||
{
|
||||
print "</tr>\n";
|
||||
}
|
||||
$e++;
|
||||
}
|
||||
}
|
||||
print $object->showOptionals($extrafields,'edit');
|
||||
}
|
||||
// Logo
|
||||
print '<tr>';
|
||||
@ -1761,31 +1698,7 @@ else
|
||||
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook
|
||||
if (empty($reshook) && ! empty($extrafields->attribute_label))
|
||||
{
|
||||
$e=0;
|
||||
foreach($extrafields->attribute_label as $key=>$label)
|
||||
{
|
||||
$colspan='3';
|
||||
$value=(isset($_POST["options_".$key])?$_POST["options_".$key]:(isset($object->array_options['options_'.$key])?$object->array_options['options_'.$key]:''));
|
||||
if ($extrafields->attribute_type[$key] == 'separate')
|
||||
{
|
||||
print $extrafields->showSeparator($key);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (($e % 2) == 0)
|
||||
{
|
||||
print '<tr>';
|
||||
$colspan='0';
|
||||
}
|
||||
print '<td>'.$label.'</td>';
|
||||
print '<td colspan="'.$colspan.'">';
|
||||
print $extrafields->showOutputField($key,$value);
|
||||
print "</td>";
|
||||
|
||||
if (($e % 2) == 1) print '</tr>';
|
||||
$e++;
|
||||
}
|
||||
}
|
||||
print $object->showOptionals($extrafields);
|
||||
}
|
||||
|
||||
// Ban
|
||||
|
||||
@ -594,9 +594,10 @@ a.vmenu:link, a.vmenu:visited, a.vmenu:hover, a.vmenu:active { font-size:<?php p
|
||||
font.vmenudisabled { font-size:<?php print $fontsize ?>px; font-family: <?php print $fontlist ?>; text-align: <?php print $left; ?>; font-weight: normal; color: #D0D0D0; margin: 1px 1px 1px 5px; }
|
||||
a.vmenu:hover { color: #CCDDEE; }
|
||||
|
||||
a.vsmenu:link, a.vsmenu:visited, a.vsmenu:hover, a.vsmenu:active { font-size:<?php print $fontsize ?>px; font-family: <?php print $fontlist ?>; text-align: <?php print $left; ?>; font-weight: normal; color: #202020; margin: 1px 1px 1px 5px; }
|
||||
font.vsmenudisabled { font-size:<?php print $fontsize ?>px; font-family: <?php print $fontlist ?>; text-align: <?php print $left; ?>; font-weight: normal; color: #93a5aa; margin: 1px 1px 1px 5px; }
|
||||
a.vsmenu:link, a.vsmenu:visited, a.vsmenu:hover, a.vsmenu:active { font-size:<?php print $fontsize ?>px; font-family: <?php print $fontlist ?>; text-align: <?php print $left; ?>; font-weight: normal; color: #202020; }
|
||||
font.vsmenudisabled { font-size:<?php print $fontsize ?>px; font-family: <?php print $fontlist ?>; text-align: <?php print $left; ?>; font-weight: normal; color: #93a5aa; }
|
||||
a.vsmenu:hover { color: #556677; }
|
||||
font.vsmenudisabledmargin { margin: 1px 1px 1px 5px; }
|
||||
|
||||
a.help:link, a.help:visited, a.help:hover, a.help:active { font-size:<?php print $fontsizesmaller ?>px; font-family: <?php print $fontlist ?>; text-align: <?php print $left; ?>; font-weight: normal; }
|
||||
|
||||
|
||||
@ -645,7 +645,8 @@ a.vsmenu:link { font-size:11px; text-align:left; font-weight: normal; colo
|
||||
a.vsmenu:visited { font-size:11px; text-align:left; font-weight: normal; color: #202020; margin: 1px 1px 1px 4px; }
|
||||
a.vsmenu:active { font-size:11px; text-align:left; font-weight: normal; color: RGB(94,148,181); margin: 1px 1px 1px 4px; }
|
||||
a.vsmenu:hover { font-size:11px; text-align:left; font-weight: normal; color: #7F0A29; margin: 1px 1px 1px 4px; }
|
||||
font.vsmenudisabled { font-size:11px; text-align:left; font-weight: normal; color: #202020; margin: 1px 1px 1px 4px; }
|
||||
font.vsmenudisabled { font-size:11px; text-align:left; font-weight: normal; color: #202020; }
|
||||
font.vsmenudisabledmargin { margin: 1px 1px 1px 4px; }
|
||||
|
||||
a.help:link { font-size: 10px; font-weight: bold; background: #FFFFFF; border: 1px solid #8CACBB; color: #68ACCF; padding: 0em 0.7em; margin: 0em 0.5em; text-decoration: none; white-space: nowrap; }
|
||||
a.help:visited { font-size: 10px; font-weight: bold; background: #FFFFFF; border: 1px solid #8CACBB; color: #68ACCF; padding: 0em 0.7em; margin: 0em 0.5em; text-decoration: none; white-space: nowrap; }
|
||||
|
||||
@ -657,7 +657,8 @@ a.vsmenu:link { font-size:11px; text-align:left; font-weight: normal; colo
|
||||
a.vsmenu:visited { font-size:11px; text-align:left; font-weight: normal; color: #202020; margin: 1px 1px 1px 4px; }
|
||||
a.vsmenu:active { font-size:11px; text-align:left; font-weight: normal; color: RGB(94,148,181); margin: 1px 1px 1px 4px; }
|
||||
a.vsmenu:hover { font-size:11px; text-align:left; font-weight: normal; color: #7F0A29; margin: 1px 1px 1px 4px; }
|
||||
font.vsmenudisabled { font-size:11px; text-align:left; font-weight: normal; color: #202020; margin: 1px 1px 1px 4px; }
|
||||
font.vsmenudisabled { font-size:11px; text-align:left; font-weight: normal; color: #202020; }
|
||||
font.vsmenudisabledmargin { margin: 1px 1px 1px 4px; }
|
||||
|
||||
a.help:link { font-size: 10px; font-weight: bold; background: #FFFFFF; border: 1px solid #8CACBB; color: #68ACCF; padding: 0em 0.7em; margin: 0em 0.5em; text-decoration: none; white-space: nowrap; }
|
||||
a.help:visited { font-size: 10px; font-weight: bold; background: #FFFFFF; border: 1px solid #8CACBB; color: #68ACCF; padding: 0em 0.7em; margin: 0em 0.5em; text-decoration: none; white-space: nowrap; }
|
||||
|
||||
@ -356,7 +356,7 @@ td.showDragHandle {
|
||||
/* ============================================================================== */
|
||||
|
||||
div.fiche {
|
||||
margin-<?php print $left; ?>: <?php print (GETPOST("optioncss") == 'print'?6:((empty($conf->browser->phone) || empty($conf->global->MAIN_MENU_USE_JQUERY_LAYOUT))?'20':'24')); ?>px;
|
||||
margin-<?php print $left; ?>: <?php print (GETPOST("optioncss") == 'print'?6:((empty($conf->global->MAIN_MENU_USE_JQUERY_LAYOUT))?((empty($_SESSION['dol_hide_leftmenu']) && ! GETPOST('dol_hide_leftmenu'))?'20':'4'):'24')); ?>px;
|
||||
margin-<?php print $right; ?>: <?php print (GETPOST("optioncss") == 'print'?8:(empty($conf->browser->phone)?'12':'6')); ?>px;
|
||||
}
|
||||
|
||||
@ -839,9 +839,10 @@ a.vmenu:link, a.vmenu:visited, a.vmenu:hover, a.vmenu:active { font-size:<?php p
|
||||
font.vmenudisabled { font-size:<?php print $fontsize ?>px; font-family: <?php print $fontlist ?>; text-align: <?php print $left; ?>; font-weight: bold; color: #93a5aa; }
|
||||
a.vmenu:link, a.vmenu:visited { color: #<?php echo $colortextmain; ?>; }
|
||||
|
||||
a.vsmenu:link, a.vsmenu:visited, a.vsmenu:hover, a.vsmenu:active { font-size:<?php print $fontsize ?>px; font-family: <?php print $fontlist ?>; text-align: <?php print $left; ?>; font-weight: normal; color: #202020; padding: 1px 1px 1px 8px; }
|
||||
font.vsmenudisabled { font-size:<?php print $fontsize ?>px; font-family: <?php print $fontlist ?>; text-align: <?php print $left; ?>; font-weight: normal; color: #93a5aa; margin: 1px 1px 1px 8px; }
|
||||
a.vsmenu:link, a.vsmenu:visited, a.vsmenu:hover, a.vsmenu:active { font-size:<?php print $fontsize ?>px; font-family: <?php print $fontlist ?>; text-align: <?php print $left; ?>; font-weight: normal; color: #202020; margin: 1px 1px 1px 8px; }
|
||||
font.vsmenudisabled { font-size:<?php print $fontsize ?>px; font-family: <?php print $fontlist ?>; text-align: <?php print $left; ?>; font-weight: normal; color: #93a5aa; }
|
||||
a.vsmenu:link, a.vsmenu:visited { color: #<?php echo $colortextmain; ?>; }
|
||||
font.vsmenudisabledmargin { margin: 1px 1px 1px 8px; }
|
||||
|
||||
a.help:link, a.help:visited, a.help:hover, a.help:active { font-size:<?php print $fontsizesmaller ?>px; font-family: <?php print $fontlist ?>; text-align: <?php print $left; ?>; font-weight: normal; color: #666666; }
|
||||
|
||||
@ -1593,6 +1594,7 @@ table.liste td {
|
||||
div.liste_titre, tr.liste_titre, tr.liste_titre_sel
|
||||
{
|
||||
height: 20px !important;
|
||||
background: #7699A9;
|
||||
background-repeat: repeat-x;
|
||||
|
||||
<?php if ($usecss3) { ?>
|
||||
@ -1602,7 +1604,6 @@ div.liste_titre, tr.liste_titre, tr.liste_titre_sel
|
||||
background-image: -ms-linear-gradient(bottom, rgb(<?php echo $colorbacktitle1; ?>) 15%, rgb(<?php echo $colorbacktitle2; ?>) 100%);
|
||||
background-image: linear-gradient(bottom, rgb(<?php echo $colorbacktitle1; ?>) 15%, rgb(<?php echo $colorbacktitle2; ?>) 100%);
|
||||
<?php } else { ?>
|
||||
background: #7699A9;
|
||||
background-image: url(<?php echo dol_buildpath($path.'/theme/'.$theme.'/img/liste_titre2.png',1); ?>);
|
||||
<?php } ?>
|
||||
color: #<?php echo $colortextmain; ?>;
|
||||
@ -2522,8 +2523,9 @@ div.dolEventError h1, div.dolEventError h2 {
|
||||
/* ============================================================================== */
|
||||
|
||||
.ui-body-c .ui-link {
|
||||
color: #111 !important;
|
||||
color: #FFF !important;
|
||||
}
|
||||
/*
|
||||
.ui-li-divider {
|
||||
background: #eee !important;
|
||||
}
|
||||
@ -2546,7 +2548,7 @@ div.dolEventError h1, div.dolEventError h2 {
|
||||
color: #444 !important;
|
||||
text-shadow: 0 1px 1px #fff !important;
|
||||
}
|
||||
|
||||
*/
|
||||
|
||||
<?php
|
||||
if (is_object($db)) $db->close();
|
||||
|
||||
@ -1 +0,0 @@
|
||||
Url not available
|
||||
@ -1 +0,0 @@
|
||||
2009-2010 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
@ -1 +0,0 @@
|
||||
Url not available
|
||||
@ -1,531 +0,0 @@
|
||||
<?php
|
||||
/* Copyright (C) 2009-2010 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
*
|
||||
* 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
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file htdocs/theme/phones/smartphone/theme/default/default.css.php
|
||||
* \brief Fichier de style CSS du theme Smartphone default
|
||||
*/
|
||||
|
||||
//if (! defined('NOREQUIREUSER')) define('NOREQUIREUSER','1'); // Not disabled cause need to load personalized language
|
||||
//if (! defined('NOREQUIREDB')) define('NOREQUIREDB','1'); // Not disabled to increase speed. Language code is found on url.
|
||||
if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC','1');
|
||||
//if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN','1'); // Not disabled cause need to do translations
|
||||
if (! defined('NOCSRFCHECK')) define('NOCSRFCHECK',1);
|
||||
if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL',1);
|
||||
if (! defined('NOLOGIN')) define('NOLOGIN',1);
|
||||
if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU',1);
|
||||
if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML',1);
|
||||
if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX','1');
|
||||
|
||||
session_cache_limiter(FALSE);
|
||||
|
||||
require_once '../../../../../main.inc.php';
|
||||
|
||||
// Define css type
|
||||
header('Content-type: text/css');
|
||||
// Important: Avoid page request by browser and dynamic build at
|
||||
// each Dolibarr page access.
|
||||
if (empty($dolibarr_nocache)) header('Cache-Control: max-age=3600, public, must-revalidate');
|
||||
else header('Cache-Control: no-cache');
|
||||
|
||||
// On the fly GZIP compression for all pages (if browser support it). Must set the bit 3 of constant to 1.
|
||||
if (isset($conf->global->MAIN_OPTIMIZE_SPEED) && ($conf->global->MAIN_OPTIMIZE_SPEED & 0x04)) { ob_start("ob_gzhandler"); }
|
||||
|
||||
if (GETPOST('lang')) $langs->setDefaultLang(GETPOST('lang')); // If language was forced on URL
|
||||
if (GETPOST('theme')) $conf->theme=GETPOST('theme'); // If theme was forced on URL
|
||||
$langs->load("main",0,1);
|
||||
$right=($langs->trans("DIRECTION")=='rtl'?'left':'right');
|
||||
$left=($langs->trans("DIRECTION")=='rtl'?'right':'left');
|
||||
|
||||
?>
|
||||
.ui-mobile-viewport {
|
||||
/*width:600px;
|
||||
height:600px;
|
||||
min-height: 200px;
|
||||
min-width: 600px;
|
||||
overflow:scroll; */
|
||||
}
|
||||
|
||||
.landscape, .landscape .ui-page {
|
||||
}
|
||||
|
||||
#dol-homeheader { height: 40px; font-size: 16px; }
|
||||
|
||||
.ui-mobile-viewport {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.ui-header { height: 40px; font-size: 16px; }
|
||||
|
||||
.ui-content {
|
||||
padding-top: 1px;
|
||||
padding-right: 0;
|
||||
padding-bottom: 0px;
|
||||
padding-left: 1px;
|
||||
}
|
||||
|
||||
.ui-content .ui-listview {
|
||||
margin-top: 0px; /* Use here negative value of ui-content top padding */
|
||||
margin-right: 0px;
|
||||
margin-bottom: 0px;
|
||||
margin-left: 0px;
|
||||
/* overflow: scroll; */
|
||||
}
|
||||
|
||||
.ui-mobile #dol-homeheader { padding: 10px 5px 0; text-align: center }
|
||||
.ui-mobile #dol-homeheader h1 { margin: 0 0 10px; }
|
||||
.ui-mobile #dol-homeheader p { margin: 0; }
|
||||
|
||||
.ui-li-icon {
|
||||
left:5px;
|
||||
top:0.3em;
|
||||
}
|
||||
|
||||
.ui-li .ui-btn-inner {
|
||||
padding: 0.4em 5px 0.4em 5px;
|
||||
}
|
||||
|
||||
input.ui-input-text, textarea.ui-input-text {
|
||||
padding: 0.2em;
|
||||
}
|
||||
|
||||
.ui-body-b {
|
||||
background: #FFFFFF;
|
||||
}
|
||||
|
||||
.ui-body-c {
|
||||
background: #FFFFFF;
|
||||
text-shadow: none;
|
||||
}
|
||||
|
||||
.loginform {
|
||||
margin-left: 10px;
|
||||
margin-right: 10px;
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/* ============================================================================== */
|
||||
/* Styles de positionnement des zones */
|
||||
/* ============================================================================== */
|
||||
|
||||
div.fiche {
|
||||
margin-<?php print $left; ?>: <?php print (empty($conf->browser->phone)?'10':'2'); ?>px;
|
||||
margin-<?php print $right; ?>: <?php print (empty($conf->browser->phone)?'6':''); ?>px;
|
||||
}
|
||||
|
||||
div.fichecenter {
|
||||
width: 100%;
|
||||
clear: both; /* This is to have div fichecenter that are true rectangles */
|
||||
}
|
||||
div.fichethirdleft {
|
||||
<?php if (empty($conf->browser->phone)) { print "float: ".$left.";\n"; } ?>
|
||||
<?php if (empty($conf->browser->phone)) { print "width: 35%;\n"; } ?>
|
||||
}
|
||||
div.fichetwothirdright {
|
||||
<?php if (empty($conf->browser->phone)) { print "float: ".$left.";\n"; } ?>
|
||||
<?php if (empty($conf->browser->phone)) { print "width: 65%;\n"; } ?>
|
||||
}
|
||||
div.fichehalfleft {
|
||||
<?php if (empty($conf->browser->phone)) { print "float: ".$left.";\n"; } ?>
|
||||
<?php if (empty($conf->browser->phone)) { print "width: 50%;\n"; } ?>
|
||||
}
|
||||
div.fichehalfright {
|
||||
<?php if (empty($conf->browser->phone)) { print "float: ".$left.";\n"; } ?>
|
||||
<?php if (empty($conf->browser->phone)) { print "width: 50%;\n"; } ?>
|
||||
}
|
||||
div.ficheaddleft {
|
||||
<?php if (empty($conf->browser->phone)) { print "padding-left: 6px;\n"; } ?>
|
||||
}
|
||||
|
||||
|
||||
/* ============================================================================== */
|
||||
/* Boutons actions */
|
||||
/* ============================================================================== */
|
||||
|
||||
.butAction, .butAction:link, .butAction:visited, .butAction:hover, .butAction:active, .butActionDelete, .butActionDelete:link, .butActionDelete:visited, .butActionDelete:hover, .butActionDelete:active {
|
||||
overflow: hidden;
|
||||
padding: 0.6em 25px;
|
||||
position: relative;
|
||||
white-space: nowrap;
|
||||
|
||||
font-family: <?php print $fontlist ?>;
|
||||
background: white;
|
||||
border: 1px solid #8CACBB;
|
||||
color: #436976;
|
||||
padding: 0em 0.7em;
|
||||
margin: 0em 0.5em;
|
||||
text-decoration: none;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.butAction:hover {
|
||||
background: #dee7ec;
|
||||
}
|
||||
|
||||
.butActionDelete, .butActionDelete:link, .butActionDelete:visited, .butActionDelete:hover, .butActionDelete:active {
|
||||
border: 1px solid #997777;
|
||||
}
|
||||
|
||||
.butActionDelete:hover {
|
||||
background: #FFe7ec;
|
||||
}
|
||||
|
||||
.butActionRefused {
|
||||
font-family: <?php print $fontlist ?> !important;
|
||||
font-weight: bold !important;
|
||||
background: white !important;
|
||||
border: 1px solid #AAAAAA !important;
|
||||
color: #AAAAAA !important;
|
||||
padding: 0em 0.7em !important;
|
||||
margin: 0em 0.5em !important;
|
||||
text-decoration: none !important;
|
||||
white-space: nowrap !important;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
|
||||
span.butAction, span.butActionDelete {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
|
||||
/* ============================================================================== */
|
||||
/* Tables */
|
||||
/* ============================================================================== */
|
||||
|
||||
/*
|
||||
#undertopmenu {
|
||||
background-image: url("<?php echo DOL_URL_ROOT.'/theme/eldy/img/gradient.gif' ?>");
|
||||
background-repeat: repeat-x;
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
.nocellnopadd {
|
||||
list-style-type:none;
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
.notopnoleft {
|
||||
border-collapse: collapse;
|
||||
border: 0px;
|
||||
padding-top: 0px;
|
||||
padding-<?php print $left; ?>: 0px;
|
||||
padding-<?php print $right; ?>: 4px;
|
||||
padding-bottom: 4px;
|
||||
margin: 0px 0px;
|
||||
}
|
||||
.notopnoleftnoright {
|
||||
border-collapse: collapse;
|
||||
border: 0px;
|
||||
padding-top: 0px;
|
||||
padding-left: 0px;
|
||||
padding-right: 0px;
|
||||
padding-bottom: 4px;
|
||||
margin: 0px 0px 0px 0px;
|
||||
}
|
||||
|
||||
|
||||
table.border {
|
||||
border: 1px solid #9CACBB;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
table.border td {
|
||||
padding: 1px 2px;
|
||||
border: 1px solid #9CACBB;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
td.border {
|
||||
border-top: 1px solid #000000;
|
||||
border-right: 1px solid #000000;
|
||||
border-bottom: 1px solid #000000;
|
||||
border-left: 1px solid #000000;
|
||||
}
|
||||
|
||||
|
||||
/* Main boxes */
|
||||
|
||||
table.noborder {
|
||||
border-collapse: collapse;
|
||||
border-top-color: #FEFEFE;
|
||||
|
||||
border-right-width: 1px;
|
||||
border-right-color: #BBBBBB;
|
||||
border-right-style: solid;
|
||||
|
||||
border-left-width: 1px;
|
||||
border-left-color: #BBBBBB;
|
||||
border-left-style: solid;
|
||||
|
||||
border-bottom-width: 1px;
|
||||
border-bottom-color: #BBBBBB;
|
||||
border-bottom-style: solid;
|
||||
|
||||
margin: 0px 0px 2px 0px;
|
||||
}
|
||||
|
||||
table.noborder tr {
|
||||
border-top-color: #FEFEFE;
|
||||
|
||||
border-right-width: 1px;
|
||||
border-right-color: #BBBBBB;
|
||||
border-right-style: solid;
|
||||
|
||||
border-left-width: 1px;
|
||||
border-left-color: #BBBBBB;
|
||||
border-left-style: solid;
|
||||
height: 16px;
|
||||
}
|
||||
|
||||
table.noborder td {
|
||||
padding: 1px 2px 0px 1px; /* t r b l */
|
||||
}
|
||||
|
||||
table.nobordernopadding {
|
||||
border-collapse: collapse;
|
||||
border: 0px;
|
||||
}
|
||||
table.nobordernopadding tr {
|
||||
border: 0px;
|
||||
padding: 0px 0px;
|
||||
}
|
||||
table.nobordernopadding td {
|
||||
border: 0px;
|
||||
padding: 0px 0px;
|
||||
}
|
||||
|
||||
|
||||
|
||||
tr.liste_titre
|
||||
{
|
||||
height: 24px;
|
||||
background: -moz-linear-gradient(center top , #81A8CE, #5E87B0) repeat scroll 0 0 #5E87B0;
|
||||
border: 1px solid #456F9A;
|
||||
color: #FFFFFF;
|
||||
font-family: <?php print $fontlist ?>;
|
||||
/* border-bottom: 1px solid #FDFFFF; */
|
||||
white-space: nowrap;
|
||||
}
|
||||
th.liste_titre, td.liste_titre
|
||||
{
|
||||
background: -moz-linear-gradient(center top , #81A8CE, #5E87B0) repeat scroll 0 0 #5E87B0;
|
||||
border: 1px solid #456F9A;
|
||||
color: #FFFFFF;
|
||||
font-family: <?php print $fontlist ?>;
|
||||
font-weight: normal;
|
||||
/* border-bottom: 1px solid #FDFFFF; */
|
||||
white-space: nowrap;
|
||||
text-align: <?php echo $left; ?>;
|
||||
}
|
||||
th.liste_titre_sel, td.liste_titre_sel
|
||||
{
|
||||
background: -moz-linear-gradient(center top , #81A8CE, #5E87B0) repeat scroll 0 0 #5E87B0;
|
||||
color: #FFFFFF;
|
||||
font-family: <?php print $fontlist ?>;
|
||||
font-weight: normal;
|
||||
/* text-decoration: underline; */
|
||||
/* border-bottom: 1px solid #FDFFFF; */
|
||||
white-space: nowrap;
|
||||
text-align: <?php echo $left; ?>;
|
||||
}
|
||||
input.liste_titre {
|
||||
background: transparent;
|
||||
background-repeat: repeat-x;
|
||||
border: 0px;
|
||||
}
|
||||
|
||||
tr.liste_total td {
|
||||
border-top: 1px solid #DDDDDD;
|
||||
background: #F0F0F0;
|
||||
background-repeat: repeat-x;
|
||||
color: #332266;
|
||||
font-weight: normal;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
|
||||
.impair {
|
||||
/* background: #d0d4d7; */
|
||||
background: #eaeaea;
|
||||
font-family: <?php print $fontlist ?>;
|
||||
border: 0px;
|
||||
}
|
||||
/*
|
||||
.impair:hover {
|
||||
background: #c0c4c7;
|
||||
border: 0px;
|
||||
}
|
||||
*/
|
||||
|
||||
.pair {
|
||||
/* background: #e6ebed; */
|
||||
background: #f4f4f4;
|
||||
font-family: <?php print $fontlist ?>;
|
||||
border: 0px;
|
||||
}
|
||||
/*
|
||||
.pair:hover {
|
||||
background: #c0c4c7;
|
||||
border: 0px;
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
|
||||
div.titre {
|
||||
padding-top: 10px;
|
||||
font-family: <?php print $fontlist ?>;
|
||||
font-weight: normal;
|
||||
color: #336666;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* ============================================================================== */
|
||||
/* Onglets */
|
||||
/* ============================================================================== */
|
||||
|
||||
div.tabs {
|
||||
top: 20px;
|
||||
margin: 1px 0px 0px 0px;
|
||||
padding: 0px 6px 0px 0px;
|
||||
text-align: <?php print $left; ?>;
|
||||
}
|
||||
|
||||
div.tabBar {
|
||||
color: #234046;
|
||||
padding-top: 10px;
|
||||
padding-left: 8px;
|
||||
padding-right: 8px;
|
||||
padding-bottom: 8px;
|
||||
margin: 0px 0px 10px 0px;
|
||||
-moz-border-radius-topleft:6px;
|
||||
-moz-border-radius-topright:6px;
|
||||
-moz-border-radius-bottomleft:6px;
|
||||
-moz-border-radius-bottomright:6px;
|
||||
border-right: 1px solid #555555;
|
||||
border-bottom: 1px solid #555555;
|
||||
border-left: 1px solid #D0D0D0;
|
||||
border-top: 1px solid #D8D8D8;
|
||||
background: #dee7ec url(<?php echo DOL_URL_ROOT.'/theme/auguria/img/tab_background.png' ?>) repeat-x;
|
||||
}
|
||||
|
||||
div.tabsAction {
|
||||
margin: 20px 0em 1px 0em;
|
||||
padding: 0em 0em;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
|
||||
a.tabTitle {
|
||||
display: none;
|
||||
}
|
||||
|
||||
a.tab:link {
|
||||
background: #dee7ec;
|
||||
color: #436976;
|
||||
font-family: <?php print $fontlist ?>;
|
||||
padding: 0px 6px;
|
||||
margin: 0em 0.2em;
|
||||
text-decoration: none;
|
||||
white-space: nowrap;
|
||||
-moz-border-radius-topleft:6px;
|
||||
-moz-border-radius-topright:6px;
|
||||
|
||||
border-<?php print $right; ?>: 1px solid #555555;
|
||||
border-<?php print $left; ?>: 1px solid #D8D8D8;
|
||||
border-top: 1px solid #D8D8D8;
|
||||
}
|
||||
a.tab:visited {
|
||||
background: #dee7ec;
|
||||
color: #436976;
|
||||
font-family: <?php print $fontlist ?>;
|
||||
padding: 0px 6px;
|
||||
margin: 0em 0.2em;
|
||||
text-decoration: none;
|
||||
white-space: nowrap;
|
||||
-moz-border-radius-topleft:6px;
|
||||
-moz-border-radius-topright:6px;
|
||||
|
||||
border-<?php print $right; ?>: 1px solid #555555;
|
||||
border-<?php print $left; ?>: 1px solid #D8D8D8;
|
||||
border-top: 1px solid #D8D8D8;
|
||||
}
|
||||
a.tab#active {
|
||||
background: white;
|
||||
border-bottom: #dee7ec 1px solid;
|
||||
font-family: <?php print $fontlist ?>;
|
||||
color: #436976;
|
||||
padding: 0px 6px;
|
||||
margin: 0em 0.2em;
|
||||
text-decoration: none;
|
||||
-moz-border-radius-topleft:6px;
|
||||
-moz-border-radius-topright:6px;
|
||||
|
||||
border-<?php print $right; ?>: 1px solid #555555;
|
||||
border-<?php print $left; ?>: 1px solid #D8D8D8;
|
||||
border-top: 1px solid #D8D8D8;
|
||||
border-bottom: 1px solid white;
|
||||
}
|
||||
a.tab:hover {
|
||||
background: white;
|
||||
color: #436976;
|
||||
font-family: <?php print $fontlist ?>;
|
||||
padding: 0px 6px;
|
||||
margin: 0em 0.2em;
|
||||
text-decoration: none;
|
||||
-moz-border-radius-topleft:6px;
|
||||
-moz-border-radius-topright:6px;
|
||||
|
||||
border-<?php print $right; ?>: 1px solid #555555;
|
||||
border-<?php print $left; ?>: 1px solid #D8D8D8;
|
||||
border-top: 1px solid #D8D8D8;
|
||||
}
|
||||
|
||||
a.tabimage {
|
||||
color: #436976;
|
||||
font-family: <?php print $fontlist ?>;
|
||||
text-decoration: none;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
td.tab {
|
||||
background: #dee7ec;
|
||||
}
|
||||
|
||||
span.tabspan {
|
||||
background: #dee7ec;
|
||||
color: #436976;
|
||||
font-family: <?php print $fontlist ?>;
|
||||
padding: 0px 6px;
|
||||
margin: 0em 0.2em;
|
||||
text-decoration: none;
|
||||
white-space: nowrap;
|
||||
-moz-border-radius-topleft:6px;
|
||||
-moz-border-radius-topright:6px;
|
||||
|
||||
border-<?php print $right; ?>: 1px solid #555555;
|
||||
border-<?php print $left; ?>: 1px solid #D8D8D8;
|
||||
border-top: 1px solid #D8D8D8;
|
||||
}
|
||||
|
||||
|
Before Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 536 B |
|
Before Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 1014 B |
|
Before Width: | Height: | Size: 343 B |
|
Before Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 4.7 KiB |
|
Before Width: | Height: | Size: 3.6 KiB |
|
Before Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 742 B |
|
Before Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 2.2 KiB |
|
Before Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 2.3 KiB |
|
Before Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 1.4 KiB |
@ -1 +0,0 @@
|
||||
Url not available
|
||||
@ -1,28 +0,0 @@
|
||||
<?php
|
||||
/* Copyright (C) 2010 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
*
|
||||
* 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
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
?>
|
||||
<head>
|
||||
<title><?php echo $title; ?></title>
|
||||
<meta name="robots" content="noindex,nofollow" />
|
||||
<meta name="apple-mobile-web-app-capable" content="yes" />
|
||||
<link rel="apple-touch-icon" href="<?php echo DOL_URL_ROOT.'/theme/phones/smartphone/theme/'.$conf->theme.'/img/homescreen.png'; ?>" />
|
||||
<link rel="stylesheet" href="<?php echo DOL_URL_ROOT.'/includes/jquery/plugins/mobile/jquery.mobile-latest.min.css'; ?>" />
|
||||
<link rel="stylesheet" href="<?php echo DOL_URL_ROOT.'/theme/phones/smartphone/theme/default/default.css.php'; ?>" />
|
||||
<script type="text/javascript" src="<?php echo DOL_URL_ROOT.'/includes/jquery/js/jquery-latest.min.js'; ?>"></script>
|
||||
<script type="text/javascript" src="<?php echo DOL_URL_ROOT.'/includes/jquery/plugins/mobile/jquery.mobile-latest.min.js'; ?>"></script>
|
||||
</head>
|
||||
@ -1 +0,0 @@
|
||||
Url not available
|
||||
@ -1,104 +0,0 @@
|
||||
<?php
|
||||
/* Copyright (C) 2009-2010 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
*
|
||||
* 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
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
top_httphead();
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<?php
|
||||
include 'header.tpl.php';
|
||||
?>
|
||||
<body>
|
||||
<script type="text/javascript">
|
||||
jQuery(document).bind("mobileinit", function(){
|
||||
jQuery.mobile.defaultTransition('pop');
|
||||
});
|
||||
</script>
|
||||
|
||||
<!-- START LOGIN SMARTPHONE TEMPLATE -->
|
||||
<div data-role="page" id="dol-home" data-theme="b">
|
||||
|
||||
<div data-role="header" data-nobackbtn="true" data-theme="b">
|
||||
<div id="dol-homeheader">
|
||||
<?php
|
||||
$appli='Dolibarr';
|
||||
if (! empty($conf->global->MAIN_APPLICATION_TITLE)) $appli=$conf->global->MAIN_APPLICATION_TITLE;
|
||||
print $appli;
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div data-role="content">
|
||||
|
||||
<form id="login" class="loginform" name="login" method="post" action="<?php echo $php_self; ?>">
|
||||
<input type="hidden" name="token" value="<?php echo $_SESSION['newtoken']; ?>" />
|
||||
<input type="hidden" name="loginfunction" value="loginfunction" />
|
||||
|
||||
<div data-role="fieldcontain">
|
||||
<label for="username"><?php echo $langs->trans('Login'); ?></label>
|
||||
<input type="text" name="username" id="username" value="<?php echo $login; ?>" />
|
||||
|
||||
<br><label for="password"><?php echo $langs->trans('Password'); ?></label>
|
||||
<input type="password" name="password" id="password" value="<?php echo $password; ?>" />
|
||||
|
||||
<?php if ($select_entity) { ?>
|
||||
<br><label for="entity" class="select"><?php echo $langs->trans('Entity'); ?></label>
|
||||
<?php echo $select_entity; ?>
|
||||
<?php } ?>
|
||||
|
||||
<?php if ($captcha) { ?>
|
||||
<label for="securitycode"><?php echo $langs->trans('SecurityCode'); ?></label>
|
||||
<input type="text" id="securitycode" name="securitycode" />
|
||||
<div align="center"><img src="<?php echo $dol_url_root.'/core/antispamimage.php'; ?>" border="0" width="80" height="32" /></div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
|
||||
<input type="submit" data-theme="b" value="<?php echo $langs->trans('Connection'); ?>" />
|
||||
|
||||
</form>
|
||||
|
||||
</div><!-- /content -->
|
||||
|
||||
<?php if ($forgetpasslink || $helpcenterlink) { ?>
|
||||
<div data-role="footer" data-id="foo1" data-theme="b">
|
||||
<div data-role="navbar">
|
||||
<ul>
|
||||
<li>
|
||||
<?php if ($forgetpasslink) { ?>
|
||||
<a href="<?php echo $dol_url_root.'/user/passwordforgotten.php'; ?>" data-icon="gear"><?php echo $langs->trans('PasswordForgotten'); ?></a>
|
||||
<?php } ?>
|
||||
</li>
|
||||
<li>
|
||||
<?php if ($helpcenterlink && 1 == 2) { ?>
|
||||
<a href="<?php echo $dol_url_root.'/support/index.php'; ?>" data-icon="info"><?php echo $langs->trans('NeedHelpCenter'); ?></a>
|
||||
<?php } ?>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div><!-- /page -->
|
||||
|
||||
<?php if ($dol_loginmesg) { ?>
|
||||
<script type="text/javascript">
|
||||
alert('<?php echo $dol_loginmesg; ?>');
|
||||
</script>
|
||||
<?php } ?>
|
||||
<!-- END LOGIN SMARTPHONE TEMPLATE -->
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@ -1,80 +0,0 @@
|
||||
<?php
|
||||
/* Copyright (C) 2010 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
*
|
||||
* 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
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
// Load the smartphone menu manager
|
||||
$result=@include_once DOL_DOCUMENT_ROOT ."/core/menus/smartphone/".$conf->smart_menu;
|
||||
if (! $result) // If failed to include, we try with standard
|
||||
{
|
||||
$conf->smart_menu='smartphone_menu.php';
|
||||
include_once DOL_DOCUMENT_ROOT ."/core/menus/smartphone/".$conf->smart_menu;
|
||||
}
|
||||
$menusmart = new MenuSmart($db, $user->societe_id?1:0);
|
||||
|
||||
|
||||
top_httphead();
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<?php
|
||||
require 'header.tpl.php';
|
||||
?>
|
||||
<body>
|
||||
<script type="text/javascript">
|
||||
jQuery(document).bind("mobileinit", function(){
|
||||
jQuery.mobile.defaultTransition('pop');
|
||||
});
|
||||
</script>
|
||||
|
||||
<div data-role="page" data-theme="b" id="dol-home">
|
||||
|
||||
<div data-role="header" data-nobackbtn="true" data-theme="b">
|
||||
<div id="dol-homeheader">
|
||||
<?php
|
||||
$appli='Dolibarr';
|
||||
if (! empty($conf->global->MAIN_APPLICATION_TITLE)) $appli=$conf->global->MAIN_APPLICATION_TITLE;
|
||||
print $appli;
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div data-role="content">
|
||||
<!--
|
||||
<ul data-role="listview" data-inset="true" data-theme="c" data-dividertheme="b">
|
||||
<li data-role="list-divider">Overview</li>
|
||||
<li><a href="http://jquerymobile.com/test/docs/about/intro.html">Intro to jQuery Mobile</a></li>
|
||||
<li><a href="http://localhost/dolibarrnew/public/error-401.php">Features</a></li>
|
||||
</ul>
|
||||
-->
|
||||
|
||||
<?php $menusmart->showmenu(1); ?>
|
||||
|
||||
</div><!-- /content -->
|
||||
|
||||
<div data-role="footer" data-theme="b">
|
||||
<div data-role="navbar">
|
||||
<ul>
|
||||
<li><a href="<?php echo DOL_URL_ROOT.'/user/logout.php'; ?>" data-icon="grid"><?php echo $langs->trans("Logout"); ?></a></li>
|
||||
<li><a href=""> </a></li>
|
||||
</ul>
|
||||
</div><!-- /navbar -->
|
||||
</div><!-- /footer -->
|
||||
|
||||
</div><!-- /page -->
|
||||
|
||||
<!-- END MENU SMARTPHONE TEMPLATE -->
|
||||
</body>
|
||||
</html>
|
||||
@ -1,82 +0,0 @@
|
||||
<?php
|
||||
/* Copyright (C) 2009-2010 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
*
|
||||
* 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
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
top_httphead();
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<?php
|
||||
include 'header.tpl.php';
|
||||
?>
|
||||
<body>
|
||||
<!-- BEGIN SMARTPHONE TEMPLATE -->
|
||||
|
||||
<div data-role="page" id="dol-home" data-theme="b">
|
||||
|
||||
<div data-role="header" data-theme="b" data-position="inline">
|
||||
<div id="dol-homeheader">
|
||||
<?php echo $langs->trans('Identification'); ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div data-role="content">
|
||||
|
||||
<form id="login" class="loginform" name="login" method="post" action="<?php echo $php_self; ?>">
|
||||
<input type="hidden" name="token" value="<?php echo $_SESSION['newtoken']; ?>" />
|
||||
<input type="hidden" name="loginfunction" value="buildnewpassword" />
|
||||
|
||||
<div data-role="fieldcontain">
|
||||
<label for="username"><?php echo $langs->trans('Login'); ?></label>
|
||||
<input type="text" name="username" id="username" value="<?php echo $login; ?>" />
|
||||
|
||||
<?php if ($select_entity) { ?>
|
||||
<label for="entity" class="select"><?php echo $langs->trans('Entity'); ?></label>
|
||||
<?php echo $select_entity; ?>
|
||||
<?php } ?>
|
||||
|
||||
<?php if ($captcha) { ?>
|
||||
<label for="securitycode"><?php echo $langs->trans('SecurityCode'); ?></label>
|
||||
<input type="text" id="securitycode" name="securitycode" />
|
||||
<div align="center"><img src="<?php echo $dol_url_root.'/core/antispamimage.php'; ?>" border="0" width="80" height="32" /></div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
|
||||
<input type="submit" data-theme="b" value="<?php echo $langs->trans('SendByMail'); ?>" />
|
||||
|
||||
</form>
|
||||
|
||||
</div><!-- /content -->
|
||||
|
||||
<div data-role="footer" data-theme="b">
|
||||
<?php if ($mode == 'dolibarr' || ! $disabled) {
|
||||
echo $langs->trans('SendNewPasswordDesc');
|
||||
}else{
|
||||
echo $langs->trans('AuthenticationDoesNotAllowSendNewPassword', $mode);
|
||||
} ?>
|
||||
</div>
|
||||
|
||||
</div><!-- /page -->
|
||||
|
||||
<?php if ($message) { ?>
|
||||
<script type="text/javascript">
|
||||
alert('<?php echo $message; ?>');
|
||||
</script>
|
||||
<?php } ?>
|
||||
|
||||
<!-- END SMARTPHONE TEMPLATE -->
|
||||
</body>
|
||||
</html>
|
||||
@ -187,14 +187,8 @@ if ($action == 'add' && $canadduser)
|
||||
$object->note = GETPOST("note");
|
||||
$object->ldap_sid = GETPOST("ldap_sid");
|
||||
|
||||
// Get extra fields
|
||||
foreach($_POST as $key => $value)
|
||||
{
|
||||
if (preg_match("/^options_/",$key))
|
||||
{
|
||||
$object->array_options[$key]=GETPOST($key);
|
||||
}
|
||||
}
|
||||
// Fill array 'array_options' with data from add form
|
||||
$ret = $extrafields->setOptionalsFromPost($extralabels,$object);
|
||||
|
||||
// If multicompany is off, admin users must all be on entity 0.
|
||||
if (! empty($conf->multicompany->enabled))
|
||||
@ -329,14 +323,8 @@ if ($action == 'update' && ! $_POST["cancel"])
|
||||
$object->openid = GETPOST("openid");
|
||||
$object->fk_user = GETPOST("fk_user")>0?GETPOST("fk_user"):0;
|
||||
|
||||
// Get extra fields
|
||||
foreach($_POST as $key => $value)
|
||||
{
|
||||
if (preg_match("/^options_/",$key))
|
||||
{
|
||||
$object->array_options[$key]=GETPOST($key);
|
||||
}
|
||||
}
|
||||
// Fill array 'array_options' with data from add form
|
||||
$ret = $extrafields->setOptionalsFromPost($extralabels,$object);
|
||||
|
||||
if (! empty($conf->multicompany->enabled))
|
||||
{
|
||||
@ -927,15 +915,7 @@ if (($action == 'create') || ($action == 'adduserldap'))
|
||||
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook
|
||||
if (empty($reshook) && ! empty($extrafields->attribute_label))
|
||||
{
|
||||
foreach($extrafields->attribute_label as $key=>$label)
|
||||
{
|
||||
$value=(isset($_POST["options_".$key])?$_POST["options_".$key]:$object->array_options["options_".$key]);
|
||||
print '<tr><td';
|
||||
if (! empty($extrafields->attribute_required[$key])) print ' class="fieldrequired"';
|
||||
print '>'.$label.'</td><td colspan="3">';
|
||||
print $extrafields->showInputField($key,$value);
|
||||
print '</td></tr>'."\n";
|
||||
}
|
||||
print $object->showOptionals($extrafields,'edit');
|
||||
}
|
||||
|
||||
print "</table>\n";
|
||||
@ -1304,15 +1284,7 @@ else
|
||||
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook
|
||||
if (empty($reshook) && ! empty($extrafields->attribute_label))
|
||||
{
|
||||
foreach($extrafields->attribute_label as $key=>$label)
|
||||
{
|
||||
$value=(isset($_POST["options_".$key])?$_POST["options_".$key]:$object->array_options["options_".$key]);
|
||||
print '<tr><td';
|
||||
if (! empty($extrafields->attribute_required[$key])) print ' class="fieldrequired"';
|
||||
print '>'.$label.'</td><td colspan="3">';
|
||||
print $extrafields->showOutputField($key,$value);
|
||||
print '</td></tr>'."\n";
|
||||
}
|
||||
print $object->showOptionals($extrafields);
|
||||
}
|
||||
|
||||
print "</table>\n";
|
||||
@ -1921,15 +1893,7 @@ else
|
||||
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook
|
||||
if (empty($reshook) && ! empty($extrafields->attribute_label))
|
||||
{
|
||||
foreach($extrafields->attribute_label as $key=>$label)
|
||||
{
|
||||
$value=(isset($_POST["options_".$key])?$_POST["options_".$key]:$object->array_options["options_".$key]);
|
||||
print '<tr><td';
|
||||
if (! empty($extrafields->attribute_required[$key])) print ' class="fieldrequired"';
|
||||
print '>'.$label.'</td><td colspan="3">';
|
||||
print $extrafields->showInputField($key,$value);
|
||||
print '</td></tr>'."\n";
|
||||
}
|
||||
print $object->showOptionals($extrafields,'edit');
|
||||
}
|
||||
|
||||
print '</table>';
|
||||
|
||||
@ -61,8 +61,8 @@ $url=DOL_URL_ROOT."/index.php"; // By default go to login page
|
||||
if ($urlfrom) $url=DOL_URL_ROOT.$urlfrom;
|
||||
if (! empty($conf->global->MAIN_LOGOUT_GOTO_URL)) $url=$conf->global->MAIN_LOGOUT_GOTO_URL;
|
||||
|
||||
if (! empty($_SESSION['dol_hide_topmenu'])) $url.=(preg_match('/\?/',$url)?'&':'?').'dol_hide_topmenu=1';
|
||||
if (! empty($_SESSION['dol_hide_leftmenu'])) $url.=(preg_match('/\?/',$url)?'&':'?').'dol_hide_leftmenu=1';
|
||||
if (GETPOST('dol_hide_topmenu')) $url.=(preg_match('/\?/',$url)?'&':'?').'dol_hide_topmenu=1';
|
||||
if (GETPOST('dol_hide_leftmenu')) $url.=(preg_match('/\?/',$url)?'&':'?').'dol_hide_leftmenu=1';
|
||||
|
||||
// Destroy session
|
||||
$prefix=dol_getprefix();
|
||||
|
||||