Merge branch '4.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts: htdocs/core/tpl/admin_extrafields_add.tpl.php htdocs/main.inc.php
This commit is contained in:
commit
8755fa07af
@ -655,8 +655,8 @@ if (empty($reshook))
|
|||||||
$objectline->qty=GETPOST('elqty');
|
$objectline->qty=GETPOST('elqty');
|
||||||
$objectline->remise_percent=GETPOST('elremise_percent');
|
$objectline->remise_percent=GETPOST('elremise_percent');
|
||||||
$objectline->tva_tx=GETPOST('eltva_tx')?GETPOST('eltva_tx'):0; // Field may be disabled, so we use vat rate 0
|
$objectline->tva_tx=GETPOST('eltva_tx')?GETPOST('eltva_tx'):0; // Field may be disabled, so we use vat rate 0
|
||||||
$objectline->localtax1_tx=$localtax1_tx;
|
$objectline->localtax1_tx=is_numeric($localtax1_tx)?$localtax1_tx:0;
|
||||||
$objectline->localtax2_tx=$localtax2_tx;
|
$objectline->localtax2_tx=is_numeric($localtax2_tx)?$localtax2_tx:0;
|
||||||
$objectline->date_ouverture_prevue=$date_start_update;
|
$objectline->date_ouverture_prevue=$date_start_update;
|
||||||
$objectline->date_ouverture=$date_start_real_update;
|
$objectline->date_ouverture=$date_start_real_update;
|
||||||
$objectline->date_fin_validite=$date_end_update;
|
$objectline->date_fin_validite=$date_end_update;
|
||||||
|
|||||||
@ -1359,6 +1359,8 @@ class Contrat extends CommonObject
|
|||||||
if (empty($info_bits)) $info_bits=0;
|
if (empty($info_bits)) $info_bits=0;
|
||||||
if (empty($pu_ht) || ! is_numeric($pu_ht)) $pu_ht=0;
|
if (empty($pu_ht) || ! is_numeric($pu_ht)) $pu_ht=0;
|
||||||
if (empty($pu_ttc)) $pu_ttc=0;
|
if (empty($pu_ttc)) $pu_ttc=0;
|
||||||
|
if (empty($txlocaltax1) || ! is_numeric($txlocaltax1)) $txlocaltax1=0;
|
||||||
|
if (empty($txlocaltax2) || ! is_numeric($txlocaltax2)) $txlocaltax2=0;
|
||||||
|
|
||||||
if ($price_base_type=='HT')
|
if ($price_base_type=='HT')
|
||||||
{
|
{
|
||||||
|
|||||||
@ -313,6 +313,7 @@ if ($action == 'update')
|
|||||||
$params['options'][$key] = $value;
|
$params['options'][$key] = $value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$result=$extrafields->update(
|
$result=$extrafields->update(
|
||||||
GETPOST('attrname'),
|
GETPOST('attrname'),
|
||||||
GETPOST('label'),
|
GETPOST('label'),
|
||||||
|
|||||||
@ -46,35 +46,38 @@
|
|||||||
|
|
||||||
if (GETPOST('type') == "separate")
|
if (GETPOST('type') == "separate")
|
||||||
{
|
{
|
||||||
print "jQuery('#size, #unique, #required, #default_value').val('').prop('disabled', true);";
|
print "jQuery('#size, #default_value').val('').prop('disabled', true);";
|
||||||
print 'jQuery("#value_choice").hide();';
|
print 'jQuery("#value_choice").hide();';
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
||||||
if (type == 'date') { size.val('').prop('disabled', true); unique.removeAttr('disabled'); required.removeAttr('disabled');default_value.removeAttr('disabled');jQuery("#value_choice").hide();jQuery("#helpchkbxlst").hide(); }
|
if (type == 'date') { size.val('').prop('disabled', true); unique.removeAttr('disabled'); jQuery("#value_choice").hide();jQuery("#helpchkbxlst").hide(); }
|
||||||
else if (type == 'datetime') { size.val('').prop('disabled', true); unique.removeAttr('disabled'); required.removeAttr('disabled');default_value.removeAttr('disabled');jQuery("#value_choice").hide(); jQuery("#helpchkbxlst").hide();}
|
else if (type == 'datetime') { size.val('').prop('disabled', true); unique.removeAttr('disabled'); jQuery("#value_choice").hide(); jQuery("#helpchkbxlst").hide();}
|
||||||
else if (type == 'double') { size.val('24,8').removeAttr('disabled'); unique.removeAttr('disabled'); required.removeAttr('disabled');default_value.removeAttr('disabled');jQuery("#value_choice").hide(); jQuery("#helpchkbxlst").hide();}
|
else if (type == 'double') { size.val('24,8').removeAttr('disabled'); unique.removeAttr('disabled'); jQuery("#value_choice").hide(); jQuery("#helpchkbxlst").hide();}
|
||||||
else if (type == 'int') { size.val('10').removeAttr('disabled'); unique.removeAttr('disabled'); required.removeAttr('disabled');default_value.removeAttr('disabled');jQuery("#value_choice").hide(); jQuery("#helpchkbxlst").hide();}
|
else if (type == 'int') { size.val('10').removeAttr('disabled'); unique.removeAttr('disabled'); jQuery("#value_choice").hide(); jQuery("#helpchkbxlst").hide();}
|
||||||
else if (type == 'text') { size.val('2000').removeAttr('disabled'); unique.prop('disabled', true).removeAttr('checked'); required.removeAttr('disabled');default_value.removeAttr('disabled');jQuery("#value_choice").hide();jQuery("#helpchkbxlst").hide(); }
|
else if (type == 'text') { size.val('2000').removeAttr('disabled'); unique.prop('disabled', true).removeAttr('checked'); jQuery("#value_choice").hide();jQuery("#helpchkbxlst").hide(); }
|
||||||
else if (type == 'varchar') { size.val('255').removeAttr('disabled'); unique.removeAttr('disabled'); required.removeAttr('disabled');default_value.removeAttr('disabled');jQuery("#value_choice").hide();jQuery("#helpchkbxlst").hide(); }
|
else if (type == 'varchar') { size.val('255').removeAttr('disabled'); unique.removeAttr('disabled'); jQuery("#value_choice").hide();jQuery("#helpchkbxlst").hide(); }
|
||||||
else if (type == 'boolean') { size.val('').prop('disabled', true); unique.prop('disabled', true); required.removeAttr('disabled');default_value.removeAttr('disabled');jQuery("#value_choice").hide();jQuery("#helpchkbxlst").hide();}
|
else if (type == 'boolean') { size.val('').prop('disabled', true); unique.removeAttr('checked').prop('disabled', true); jQuery("#value_choice").hide();jQuery("#helpchkbxlst").hide();}
|
||||||
else if (type == 'price') { size.val('').prop('disabled', true); unique.prop('disabled', true); required.removeAttr('disabled');default_value.removeAttr('disabled');jQuery("#value_choice").hide();jQuery("#helpchkbxlst").hide();}
|
else if (type == 'price') { size.val('').prop('disabled', true); unique.removeAttr('checked').prop('disabled', true); jQuery("#value_choice").hide();jQuery("#helpchkbxlst").hide();}
|
||||||
else if (type == 'select') { size.val('').prop('disabled', true); unique.prop('disabled', true); required.removeAttr('disabled');default_value.removeAttr('disabled');jQuery("#value_choice").show();jQuery("#helpselect").show();jQuery("#helpsellist").hide();jQuery("#helpchkbxlst").hide();jQuery("#helplink").hide();}
|
else if (type == 'select') { size.val('').prop('disabled', true); unique.removeAttr('checked').prop('disabled', true); jQuery("#value_choice").show();jQuery("#helpselect").show();jQuery("#helpsellist").hide();jQuery("#helpchkbxlst").hide();jQuery("#helplink").hide();}
|
||||||
else if (type == 'link') { size.val('').prop('disabled', true); unique.prop('disabled', true); required.removeAttr('disabled');default_value.removeAttr('disabled');jQuery("#value_choice").show();jQuery("#helpselect").hide();jQuery("#helpsellist").hide();jQuery("#helpchkbxlst").hide();jQuery("#helplink").show();}
|
else if (type == 'sellist') { size.val('').prop('disabled', true); unique.removeAttr('checked').prop('disabled', true); jQuery("#value_choice").show();jQuery("#helpselect").hide();jQuery("#helpsellist").show();jQuery("#helpchkbxlst").hide();jQuery("#helplink").hide();}
|
||||||
else if (type == 'sellist') { size.val('').prop('disabled', true); unique.prop('disabled', true); required.removeAttr('disabled');default_value.removeAttr('disabled');jQuery("#value_choice").show();jQuery("#helpselect").hide();jQuery("#helpsellist").show();jQuery("#helpchkbxlst").hide();jQuery("#helplink").hide();}
|
else if (type == 'radio') { size.val('').prop('disabled', true); unique.removeAttr('checked').prop('disabled', true); jQuery("#value_choice").show();jQuery("#helpselect").show();jQuery("#helpsellist").hide();jQuery("#helpchkbxlst").hide();jQuery("#helplink").hide();}
|
||||||
else if (type == 'radio') { size.val('').prop('disabled', true); unique.prop('disabled', true); required.removeAttr('disabled');default_value.removeAttr('disabled');jQuery("#value_choice").show();jQuery("#helpselect").show();jQuery("#helpsellist").hide();jQuery("#helpchkbxlst").hide();jQuery("#helplink").hide();}
|
else if (type == 'checkbox') { size.val('').prop('disabled', true); unique.removeAttr('checked').prop('disabled', true); jQuery("#value_choice").show();jQuery("#helpselect").show();jQuery("#helpsellist").hide();jQuery("#helpchkbxlst").hide();jQuery("#helplink").hide();}
|
||||||
else if (type == 'checkbox') { size.val('').prop('disabled', true); unique.prop('disabled', true); required.removeAttr('disabled');default_value.removeAttr('disabled');jQuery("#value_choice").show();jQuery("#helpselect").show();jQuery("#helpsellist").hide();jQuery("#helpchkbxlst").hide();jQuery("#helplink").hide();}
|
else if (type == 'chkbxlst') { size.val('').prop('disabled', true); unique.removeAttr('checked').prop('disabled', true); jQuery("#value_choice").show();jQuery("#helpselect").hide();jQuery("#helpsellist").hide();jQuery("#helpchkbxlst").show();jQuery("#helplink").hide();}
|
||||||
else if (type == 'chkbxlst') { size.val('').prop('disabled', true); unique.prop('disabled', true); required.removeAttr('disabled');default_value.removeAttr('disabled');jQuery("#value_choice").show();jQuery("#helpselect").hide();jQuery("#helpsellist").hide();jQuery("#helpchkbxlst").show();jQuery("#helplink").hide();}
|
else if (type == 'link') { size.val('').prop('disabled', true); unique.removeAttr('disabled'); jQuery("#value_choice").show();jQuery("#helpselect").hide();jQuery("#helpsellist").hide();jQuery("#helpchkbxlst").hide();jQuery("#helplink").show();}
|
||||||
else if (type == 'separate') { size.val('').prop('disabled', true); unique.prop('disabled', true); required.val('').prop('disabled', true); default_value.val('').prop('disabled', true); jQuery("#value_choice").hide();jQuery("#helpselect").hide();jQuery("#helpsellist").hide();jQuery("#helpchkbxlst").hide();jQuery("#helplink").hide();}
|
else if (type == 'separate') { size.val('').prop('disabled', true); unique.removeAttr('checked').prop('disabled', true); required.val('').prop('disabled', true); default_value.val('').prop('disabled', true); jQuery("#value_choice").hide();jQuery("#helpselect").hide();jQuery("#helpsellist").hide();jQuery("#helpchkbxlst").hide();jQuery("#helplink").hide();}
|
||||||
else { size.val('').prop('disabled', true); required.removeAttr('disabled'); default_value.removeAttr('disabled'); }
|
else { // type = string
|
||||||
|
size.val('').prop('disabled', true);
|
||||||
|
unique.removeAttr('disabled');
|
||||||
|
}
|
||||||
|
|
||||||
if (type == 'separate')
|
if (type == 'separate')
|
||||||
{
|
{
|
||||||
alwayseditable.val('').prop('disabled', true); list.val('').prop('disabled', true);
|
unique.removeAttr('checked').prop('disabled', true); required.removeAttr('checked').prop('disabled', true); alwayseditable.removeAttr('checked').prop('disabled', true); list.val('').prop('disabled', true);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
alwayseditable.val('').removeAttr('disabled'); list.val('').removeAttr('disabled');
|
required.removeAttr('disabled'); alwayseditable.removeAttr('disabled'); list.val('').removeAttr('disabled');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
init_typeoffields('<?php echo GETPOST('type'); ?>');
|
init_typeoffields('<?php echo GETPOST('type'); ?>');
|
||||||
@ -124,14 +127,14 @@
|
|||||||
<!-- Default Value -->
|
<!-- Default Value -->
|
||||||
<tr><td><?php echo $langs->trans("DefaultValue"); ?></td><td class="valeur"><input id="default_value" type="text" name="default_value" size="5" value="<?php echo (GETPOST('"default_value"')?GETPOST('"default_value"'):''); ?>"></td></tr>
|
<tr><td><?php echo $langs->trans("DefaultValue"); ?></td><td class="valeur"><input id="default_value" type="text" name="default_value" size="5" value="<?php echo (GETPOST('"default_value"')?GETPOST('"default_value"'):''); ?>"></td></tr>
|
||||||
<!-- Unique -->
|
<!-- Unique -->
|
||||||
<tr><td><?php echo $langs->trans("Unique"); ?></td><td class="valeur"><input id="unique" type="checkbox" name="unique" <?php echo (GETPOST('unique')?' checked':''); ?>></td></tr>
|
<tr><td><?php echo $langs->trans("Unique"); ?></td><td class="valeur"><input id="unique" type="checkbox" name="unique"<?php echo (GETPOST('unique')?' checked':''); ?>></td></tr>
|
||||||
<!-- Required -->
|
<!-- Required -->
|
||||||
<tr><td><?php echo $langs->trans("Required"); ?></td><td class="valeur"><input id="required" type="checkbox" name="required" <?php echo (GETPOST('required')?' checked':''); ?>></td></tr>
|
<tr><td><?php echo $langs->trans("Required"); ?></td><td class="valeur"><input id="required" type="checkbox" name="required"<?php echo (GETPOST('required')?' checked':''); ?>></td></tr>
|
||||||
<!-- Always editable -->
|
<!-- Always editable -->
|
||||||
<tr><td><?php echo $langs->trans("AlwaysEditable"); ?></td><td class="valeur"><input id="alwayseditable" type="checkbox" name="alwayseditable" <?php echo ((GETPOST('alwayseditable') || ! GETPOST('button'))?' checked':''); ?>></td></tr>
|
<tr><td><?php echo $langs->trans("AlwaysEditable"); ?></td><td class="valeur"><input id="alwayseditable" type="checkbox" name="alwayseditable"<?php echo ((GETPOST('alwayseditable') || ! GETPOST('button'))?' checked':''); ?>></td></tr>
|
||||||
<!-- Is visible or not -->
|
<!-- Is visible or not -->
|
||||||
<?php if (! empty($conf->global->MAIN_CAN_HIDE_EXTRAFIELDS)) { ?>
|
<?php if (! empty($conf->global->MAIN_CAN_HIDE_EXTRAFIELDS)) { ?>
|
||||||
<tr><td><?php echo $langs->trans("Hidden"); ?></td><td class="valeur"><input id="ishidden" type="checkbox" name="ishidden" <?php echo (GETPOST('ishidden') ?' checked' : ''); ?>></td></tr>
|
<tr><td><?php echo $langs->trans("Hidden"); ?></td><td class="valeur"><input id="ishidden" type="checkbox" name="ishidden"<?php echo (GETPOST('ishidden') ?' checked' : ''); ?>></td></tr>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<?php if ($conf->global->MAIN_FEATURES_LEVEL >= 2) { ?>
|
<?php if ($conf->global->MAIN_FEATURES_LEVEL >= 2) { ?>
|
||||||
<!-- By default visible into list -->
|
<!-- By default visible into list -->
|
||||||
|
|||||||
@ -37,7 +37,7 @@
|
|||||||
|
|
||||||
if (GETPOST('type') == "separate")
|
if (GETPOST('type') == "separate")
|
||||||
{
|
{
|
||||||
print "jQuery('#size, #unique, #required, #default_value').val('').prop('disabled', true);";
|
print "jQuery('#size, #default_value').val('').prop('disabled', true);";
|
||||||
print 'jQuery("#value_choice").hide();';
|
print 'jQuery("#value_choice").hide();';
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
@ -48,24 +48,27 @@
|
|||||||
else if (type == 'int') { size.removeAttr('disabled'); unique.removeAttr('disabled'); jQuery("#value_choice").hide(); jQuery("#helpchkbxlst").hide();}
|
else if (type == 'int') { size.removeAttr('disabled'); unique.removeAttr('disabled'); jQuery("#value_choice").hide(); jQuery("#helpchkbxlst").hide();}
|
||||||
else if (type == 'text') { size.removeAttr('disabled'); unique.prop('disabled', true).removeAttr('checked'); jQuery("#value_choice").hide();jQuery("#helpchkbxlst").hide(); }
|
else if (type == 'text') { size.removeAttr('disabled'); unique.prop('disabled', true).removeAttr('checked'); jQuery("#value_choice").hide();jQuery("#helpchkbxlst").hide(); }
|
||||||
else if (type == 'varchar') { size.removeAttr('disabled'); unique.removeAttr('disabled'); jQuery("#value_choice").hide();jQuery("#helpchkbxlst").hide(); }
|
else if (type == 'varchar') { size.removeAttr('disabled'); unique.removeAttr('disabled'); jQuery("#value_choice").hide();jQuery("#helpchkbxlst").hide(); }
|
||||||
else if (type == 'boolean') { size.val('').prop('disabled', true); unique.prop('disabled', true); jQuery("#value_choice").hide();jQuery("#helpchkbxlst").hide();}
|
else if (type == 'boolean') { size.val('').prop('disabled', true); unique.removeAttr('checked').prop('disabled', true); jQuery("#value_choice").hide();jQuery("#helpchkbxlst").hide();}
|
||||||
else if (type == 'price') { size.val('').prop('disabled', true); unique.prop('disabled', true); jQuery("#value_choice").hide();jQuery("#helpchkbxlst").hide();}
|
else if (type == 'price') { size.val('').prop('disabled', true); unique.removeAttr('checked').prop('disabled', true); jQuery("#value_choice").hide();jQuery("#helpchkbxlst").hide();}
|
||||||
else if (type == 'select') { size.val('').prop('disabled', true); unique.prop('disabled', true); jQuery("#value_choice").show();jQuery("#helpselect").show();jQuery("#helpsellist").hide();jQuery("#helpchkbxlst").hide();jQuery("#helplink").hide();}
|
else if (type == 'select') { size.val('').prop('disabled', true); unique.removeAttr('checked').prop('disabled', true); jQuery("#value_choice").show();jQuery("#helpselect").show();jQuery("#helpsellist").hide();jQuery("#helpchkbxlst").hide();jQuery("#helplink").hide();}
|
||||||
else if (type == 'link') { size.val('').prop('disabled', true); unique.prop('disabled', true); jQuery("#value_choice").show();jQuery("#helpselect").hide();jQuery("#helpsellist").hide();jQuery("#helpchkbxlst").hide();jQuery("#helplink").show();}
|
else if (type == 'sellist') { size.val('').prop('disabled', true); unique.removeAttr('checked').prop('disabled', true); jQuery("#value_choice").show();jQuery("#helpselect").hide();jQuery("#helpsellist").show();jQuery("#helpchkbxlst").hide();jQuery("#helplink").hide();}
|
||||||
else if (type == 'sellist') { size.val('').prop('disabled', true); unique.prop('disabled', true); jQuery("#value_choice").show();jQuery("#helpselect").hide();jQuery("#helpsellist").show();jQuery("#helpchkbxlst").hide();jQuery("#helplink").hide();}
|
else if (type == 'radio') { size.val('').prop('disabled', true); unique.removeAttr('checked').prop('disabled', true); jQuery("#value_choice").show();jQuery("#helpselect").show();jQuery("#helpsellist").hide();jQuery("#helpchkbxlst").hide();jQuery("#helplink").hide();}
|
||||||
else if (type == 'radio') { size.val('').prop('disabled', true); unique.prop('disabled', true); jQuery("#value_choice").show();jQuery("#helpselect").show();jQuery("#helpsellist").hide();jQuery("#helpchkbxlst").hide();jQuery("#helplink").hide();}
|
else if (type == 'checkbox') { size.val('').prop('disabled', true); unique.removeAttr('checked').prop('disabled', true); jQuery("#value_choice").show();jQuery("#helpselect").show();jQuery("#helpsellist").hide();jQuery("#helpchkbxlst").hide();jQuery("#helplink").hide();}
|
||||||
else if (type == 'checkbox') { size.val('').prop('disabled', true); unique.prop('disabled', true); jQuery("#value_choice").show();jQuery("#helpselect").show();jQuery("#helpsellist").hide();jQuery("#helpchkbxlst").hide();jQuery("#helplink").hide();}
|
else if (type == 'chkbxlst') { size.val('').prop('disabled', true); unique.removeAttr('checked').prop('disabled', true); jQuery("#value_choice").show();jQuery("#helpselect").hide();jQuery("#helpsellist").hide();jQuery("#helpchkbxlst").show();jQuery("#helplink").hide();}
|
||||||
else if (type == 'chkbxlst') { size.val('').prop('disabled', true); unique.prop('disabled', true); jQuery("#value_choice").show();jQuery("#helpselect").hide();jQuery("#helpsellist").hide();jQuery("#helpchkbxlst").show();jQuery("#helplink").hide();}
|
else if (type == 'link') { size.val('').prop('disabled', true); unique.removeAttr('disabled'); jQuery("#value_choice").show();jQuery("#helpselect").hide();jQuery("#helpsellist").hide();jQuery("#helpchkbxlst").hide();jQuery("#helplink").show();}
|
||||||
else if (type == 'separate') { size.val('').prop('disabled', true); unique.prop('disabled', true); required.val('').prop('disabled', true); default_value.val('').prop('disabled', true); jQuery("#value_choice").hide();jQuery("#helpselect").hide();jQuery("#helpsellist").hide();jQuery("#helpchkbxlst").hide();jQuery("#helplink").hide();}
|
else if (type == 'separate') { size.val('').prop('disabled', true); unique.removeAttr('checked').prop('disabled', true); required.val('').prop('disabled', true); default_value.val('').prop('disabled', true); jQuery("#value_choice").hide();jQuery("#helpselect").hide();jQuery("#helpsellist").hide();jQuery("#helpchkbxlst").hide();jQuery("#helplink").hide();}
|
||||||
else size.val('').prop('disabled', true);
|
else { // type = string
|
||||||
|
size.val('').prop('disabled', true);
|
||||||
|
unique.removeAttr('disabled');
|
||||||
|
}
|
||||||
|
|
||||||
if (type == 'separate')
|
if (type == 'separate')
|
||||||
{
|
{
|
||||||
alwayseditable.val('').prop('disabled', true); list.val('').prop('disabled', true);
|
required.removeAttr('checked').prop('disabled', true); alwayseditable.removeAttr('checked').prop('disabled', true); list.val('').prop('disabled', true);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
alwayseditable.val('').removeAttr('disabled'); list.val('').removeAttr('disabled');
|
required.removeAttr('disabled'); alwayseditable.removeAttr('disabled'); list.val('').removeAttr('disabled');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
init_typeoffields(jQuery("#type").val());
|
init_typeoffields(jQuery("#type").val());
|
||||||
@ -174,14 +177,14 @@ else
|
|||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<!-- Unique -->
|
<!-- Unique -->
|
||||||
<tr><td><?php echo $langs->trans("Unique"); ?></td><td class="valeur"><input id="unique" type="checkbox" name="unique" <?php echo ($unique?' checked':''); ?>></td></tr>
|
<tr><td><?php echo $langs->trans("Unique"); ?></td><td class="valeur"><input id="unique" type="checkbox" name="unique"<?php echo ($unique?' checked':''); ?>></td></tr>
|
||||||
<!-- Required -->
|
<!-- Required -->
|
||||||
<tr><td><?php echo $langs->trans("Required"); ?></td><td class="valeur"><input id="required" type="checkbox" name="required" <?php echo ($required?' checked':''); ?>></td></tr>
|
<tr><td><?php echo $langs->trans("Required"); ?></td><td class="valeur"><input id="required" type="checkbox" name="required"<?php echo ($required?' checked':''); ?>></td></tr>
|
||||||
<!-- Always editable -->
|
<!-- Always editable -->
|
||||||
<tr><td><?php echo $langs->trans("AlwaysEditable"); ?></td><td class="valeur"><input id="alwayseditable" type="checkbox" name="alwayseditable" <?php echo ($alwayseditable?' checked':''); ?>></td></tr>
|
<tr><td><?php echo $langs->trans("AlwaysEditable"); ?></td><td class="valeur"><input id="alwayseditable" type="checkbox" name="alwayseditable"<?php echo ($alwayseditable?' checked':''); ?>></td></tr>
|
||||||
<!-- Is visible or not -->
|
<!-- Is visible or not -->
|
||||||
<?php if (! empty($conf->global->MAIN_CAN_HIDE_EXTRAFIELDS)) { ?>
|
<?php if (! empty($conf->global->MAIN_CAN_HIDE_EXTRAFIELDS)) { ?>
|
||||||
<tr><td><?php echo $langs->trans("Hidden"); ?></td><td class="valeur"><input id="ishidden" type="checkbox" name="ishidden" <?php echo ($ishidden ?' checked':''); ?>></td></tr>
|
<tr><td><?php echo $langs->trans("Hidden"); ?></td><td class="valeur"><input id="ishidden" type="checkbox" name="ishidden"<?php echo ($ishidden ?' checked':''); ?>></td></tr>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<!-- By default visible into list -->
|
<!-- By default visible into list -->
|
||||||
<?php if ($conf->global->MAIN_FEATURES_LEVEL >= 2) { ?>
|
<?php if ($conf->global->MAIN_FEATURES_LEVEL >= 2) { ?>
|
||||||
|
|||||||
@ -100,9 +100,15 @@ if (GETPOST("sendit") && ! empty($conf->global->MAIN_UPLOAD_DOC))
|
|||||||
if (empty($_FILES['userfile']['tmp_name']))
|
if (empty($_FILES['userfile']['tmp_name']))
|
||||||
{
|
{
|
||||||
$error++;
|
$error++;
|
||||||
|
if($_FILES['userfile']['error'] == 1 || $_FILES['userfile']['error'] == 2){
|
||||||
|
setEventMessages($langs->trans('ErrorFileSizeTooLarge'),null, 'errors');
|
||||||
|
}
|
||||||
|
else {
|
||||||
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("File")), null, 'errors');
|
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("File")), null, 'errors');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
if (! $error)
|
if (! $error)
|
||||||
{
|
{
|
||||||
if (dol_mkdir($upload_dir) >= 0)
|
if (dol_mkdir($upload_dir) >= 0)
|
||||||
|
|||||||
@ -1224,8 +1224,6 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs
|
|||||||
print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/includes/jquery/plugins/datatables/extensions/Buttons/js/buttons.print.min.js'.($ext?'?'.$ext:'').'"></script>'."\n";
|
print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/includes/jquery/plugins/datatables/extensions/Buttons/js/buttons.print.min.js'.($ext?'?'.$ext:'').'"></script>'."\n";
|
||||||
print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/includes/jquery/plugins/datatables/extensions/ColReorder/js/dataTables.colReorder.min.js'.($ext?'?'.$ext:'').'"></script>'."\n";
|
print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/includes/jquery/plugins/datatables/extensions/ColReorder/js/dataTables.colReorder.min.js'.($ext?'?'.$ext:'').'"></script>'."\n";
|
||||||
print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/includes/jszip/jszip.min.js"></script>'."\n";
|
print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/includes/jszip/jszip.min.js"></script>'."\n";
|
||||||
print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/includes/pdfmake/pdfmake.min.js"></script>'."\n";
|
|
||||||
print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/includes/pdfmake/vfs_fonts.js"></script>'."\n";
|
|
||||||
}*/
|
}*/
|
||||||
// jQuery Timepicker
|
// jQuery Timepicker
|
||||||
if (! empty($conf->global->MAIN_USE_JQUERY_TIMEPICKER) || defined('REQUIRE_JQUERY_TIMEPICKER'))
|
if (! empty($conf->global->MAIN_USE_JQUERY_TIMEPICKER) || defined('REQUIRE_JQUERY_TIMEPICKER'))
|
||||||
|
|||||||
@ -221,8 +221,8 @@ $sql = "SELECT ".$distinct." p.rowid as projectid, p.ref as projectref, p.title
|
|||||||
$sql.= ", s.nom as name, s.rowid as socid";
|
$sql.= ", s.nom as name, s.rowid as socid";
|
||||||
$sql.= ", t.datec as date_creation, t.dateo as date_start, t.datee as date_end, t.tms as date_update";
|
$sql.= ", t.datec as date_creation, t.dateo as date_start, t.datee as date_end, t.tms as date_update";
|
||||||
$sql.= ", t.rowid as id, t.ref, t.label, t.planned_workload, t.duration_effective, t.progress, t.fk_statut";
|
$sql.= ", t.rowid as id, t.ref, t.label, t.planned_workload, t.duration_effective, t.progress, t.fk_statut";
|
||||||
// Add fields for extrafields
|
// Add fields from extrafields
|
||||||
foreach ($extrafields->attribute_list as $key => $val) $sql.=",ef.".$key.' as options_'.$key;
|
foreach ($extrafields->attribute_label as $key => $val) $sql.=($extrafields->attribute_type[$key] != 'separate' ? ",ef.".$key.' as options_'.$key : '');
|
||||||
// Add fields from hooks
|
// Add fields from hooks
|
||||||
$parameters=array();
|
$parameters=array();
|
||||||
$reshook=$hookmanager->executeHooks('printFieldListSelect',$parameters); // Note that $action and $object may have been modified by hook
|
$reshook=$hookmanager->executeHooks('printFieldListSelect',$parameters); // Note that $action and $object may have been modified by hook
|
||||||
|
|||||||
@ -1388,7 +1388,7 @@ table.login_table_securitycode tr td {
|
|||||||
|
|
||||||
div.login_block {
|
div.login_block {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
text-align: right;
|
text-align: <?php print $right; ?>;
|
||||||
<?php print $right; ?>: 5px;
|
<?php print $right; ?>: 5px;
|
||||||
top: 3px;
|
top: 3px;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user