Skip to content

Commit

Permalink
Hide upload on smartphones
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy committed Apr 8, 2013
1 parent 00eafa1 commit 328801f
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 4 deletions.
6 changes: 3 additions & 3 deletions htdocs/admin/company.php
@@ -1,6 +1,6 @@
<?php
/* Copyright (C) 2001-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2012 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2004-2013 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2010 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2011 Philippe Grand <philippe.grand@atoo-net.com>
Expand Down Expand Up @@ -268,7 +268,7 @@
$var=true;

print '<table class="noborder" width="100%">';
print '<tr class="liste_titre"><td width="35%">'.$langs->trans("CompanyInfo").'</td><td>'.$langs->trans("Value").'</td></tr>'."\n";
print '<tr class="liste_titre"><th width="35%">'.$langs->trans("CompanyInfo").'</th><th>'.$langs->trans("Value").'</th></tr>'."\n";

$var=!$var;
print '<tr '.$bc[$var].'><td class="fieldrequired">'.$langs->trans("CompanyName").'</td><td>';
Expand Down Expand Up @@ -336,7 +336,7 @@

// Logo
$var=!$var;
print '<tr '.$bc[$var].'><td>'.$langs->trans("Logo").' (png,jpg)</td><td>';
print '<tr'.dol_bc($var,'hideonsmartphone').'><td>'.$langs->trans("Logo").' (png,jpg)</td><td>';
print '<table width="100%" class="nocellnopadd"><tr class="nocellnopadd"><td valign="middle" class="nocellnopadd">';
print '<input type="file" class="flat" name="logo" size="50">';
print '</td><td valign="middle" align="right">';
Expand Down
15 changes: 15 additions & 0 deletions htdocs/core/lib/functions.lib.php
Expand Up @@ -671,6 +671,21 @@ function dol_get_fiche_end($notab=0)
else return '';
}

/**
* Return string to add class property on html element with pair/impair.
*
* @param string $var 0 or 1
* @param string $moreclass More class to add
* @return string String to add class onto HTML element
*/
function dol_bc($var,$moreclass='')
{
global $bc;
$ret=' '.$bc[$var];
if ($moreclass) $ret=preg_replace('/class=\"/','class="'.$moreclass.' ',$ret);
return $ret;
}

/**
* Return a formated address (part address/zip/town/state) according to country rules
*
Expand Down
2 changes: 1 addition & 1 deletion htdocs/langs/en_US/admin.lang
Expand Up @@ -883,7 +883,7 @@ LogEventDesc=You can enable here the logging for Dolibarr security events. Admin
AreaForAdminOnly=Those features can be used by <b>administrator users</b> only.
SystemInfoDesc=System information is miscellaneous technical information you get in read only mode and visible for administrators only.
SystemAreaForAdminOnly=This area is available for administrator users only. None of the Dolibarr permissions can reduce this limit.
CompanyFundationDesc=Edit on this page all known information of the company or foundation you need to manage (For this click, on "Modify" button at bottom of page)
CompanyFundationDesc=Edit on this page all known information of the company or foundation you need to manage (For this, click on "Modify" button at bottom of page)
DisplayDesc=You can choose each parameter related to the Dolibarr look and feel here
AvailableModules=Available modules
ToActivateModule=To activate modules, go on setup Area (Home->Setup->Modules).
Expand Down

0 comments on commit 328801f

Please sign in to comment.