[-] BO : #PSTEST-31 : update in AdminProductsController : available_date

This commit is contained in:
lLefevre
2011-12-19 14:42:58 +00:00
parent 5a6fb2db57
commit 41450edc44
6 changed files with 23 additions and 25 deletions
@@ -278,7 +278,7 @@
<label>{l s='Available date:'}</label>
</td>
<td style="padding-bottom:5px;">
<input class="datepicker" id="available_date" name="available_date" value="{$available_date}" style="text-align: center;" type="text" />
<input class="datepicker" id="available_date_attribute" name="available_date_attribute" value="{$available_date}" style="text-align: center;" type="text" />
<p>{l s='The available date when this product is out of stock'}</p>
<script type="text/javascript">
$(document).ready(function(){
@@ -325,8 +325,8 @@
<span style="float: left;">
<input type="submit" name="submitProductAttribute" id="submitProductAttribute" value="{l s='Add this combination'}" class="button" onclick="attr_selectall(); this.form.action += '&addproduct&tabs=3';" add="{l s='Add this combination'}" update="{l s='Update this combination'}" />
</span>
<span id="ResetSpan" style="float: left; margin-left: 8px; display: none;">
<input type="reset" name="ResetBtn" id="ResetBtn" onclick="init_elems(); getE('submitProductAttribute').value ='{l s='Add this attributes group'}';getE('id_product_attribute').value = 0; $('#ResetSpan').slideToggle();" class="button" value="{l s='Cancel modification'}" />
<span id="ResetSpan" style="float:left;margin-left:8px;display:none;">
<input type="reset" name="ResetBtn" id="ResetBtn" onclick="init_elems();getE('id_product_attribute').value = 0;" class="button" value="{l s='Cancel modification'}" />
</span>
<span class="clear"></span>
</td>
@@ -160,6 +160,8 @@
if (btn_name == "Combinations")
{
$('#desc-product-new').hide();
$('#desc-product-save-and-stay').hide();
$('#desc-product-save').hide();
$('#desc-product-newCombination').show();
populate_attrs();
}
@@ -178,7 +180,11 @@
});
}
else
{
$('#desc-product-newCombination').hide();
$('#desc-product-save-and-stay').show();
$('#desc-product-save').show();
}
});
{if $show_product_tab_content}
+2 -2
View File
@@ -962,9 +962,9 @@ class AdminControllerCore extends Controller
if (empty($back))
$back = self::$currentIndex.'&token='.$this->token;
$this->toolbar_btn['cancel'] = array(
$this->toolbar_btn['back'] = array(
'href' => $back,
'desc' => $this->l('Cancel')
'desc' => $this->l('Back to list')
);
break;
case 'options':
@@ -561,7 +561,7 @@ class AdminProductsControllerCore extends AdminController
$this->_errors[] = Tools::displayError('This attribute already exists.');
else
{
if (Validate::isDateFormat(Tools::getValue('available_date')))
if (Validate::isDateFormat(Tools::getValue('available_date_attribute')))
{
$product->updateAttribute($id_product_attribute,
Tools::getValue('attribute_wholesale_price'),
@@ -576,7 +576,7 @@ class AdminProductsControllerCore extends AdminController
Tools::getValue('attribute_location'),
Tools::getValue('attribute_upc'),
Tools::getValue('minimal_quantity'),
Tools::getValue('available_date'));
Tools::getValue('available_date_attribute'));
if ($id_reason = (int)Tools::getValue('id_mvt_reason') && (int)Tools::getValue('attribute_mvt_quantity') > 0 && $id_reason > 0)
{
@@ -1994,13 +1994,6 @@ class AdminProductsControllerCore extends AdminController
);
}
$this->toolbar_btn['cancel'] = array(
'short' => 'Close',
'href' => '#todo'.$this->context->link->getAdminLink('AdminProducts').'&amp;id_product='.$product->id,
'desc' => $this->l('Cancel'),
'confirm' => 1
);
if ($this->tabAccess['edit'])
{
$this->toolbar_btn['save'] = array(
+8 -8
View File
@@ -151,14 +151,8 @@ virtual_product_nb_days, is_shareable)
}
}
getE('id_product_attribute').value = id_product_attribute;
if (document.getElementById)
var style = document.getElementById('ResetSpan').style;
else if (document.all)
var style = document.all['ResetSpan'].style;
else if (document.layers)
var style = document.layers['ResetSpan'].style;
if (style.display == 'none')
style.display = 'block';
$('#available_date_attribute').val(available_date);
}
function populate_attrs()
@@ -225,6 +219,12 @@ function init_elems()
if (elem[i])
elem.remove(i);
$('input[name="id_image_attr[]"]').each(function (){
$(this).attr('checked', false);
});
$('#attribute_default').attr('checked', false);
getE('attribute_price_impact').selectedIndex = 0;
getE('attribute_weight_impact').selectedIndex = 0;
getE('attribute_unit_impact').selectedIndex = 0;
+2 -3
View File
@@ -2757,7 +2757,7 @@ $_LANGADM['AdminController7dfa8bf72c98a7c1927d689cdbc49ce1'] = 'Editer %s';
$_LANGADM['AdminControllerb95c09fb28e80cc672fd533a62252d70'] = 'Ajouter %s';
$_LANGADM['AdminController4070217917db2a77aa6643b2ce47ceed'] = 'Voir %s';
$_LANGADM['AdminControllerc9cc8cce247e49bae79f15173ce97354'] = 'Enregistrer';
$_LANGADM['AdminControllerea4788705e6873b424c65e91c2846b19'] = 'Annuler';
$_LANGADM['AdminController630f6dc397fe74e52d5189e2c80f282b'] = 'Retour à la liste';
$_LANGADM['AdminControlleref61fb324d729c341ea8ab9901e23566'] = 'Créer';
$_LANGADM['AdminController7de03e29467c9d376a57e40f2ace850f'] = 'Une modification de ce champ sera appliquée pour la boutique %s';
$_LANGADM['AdminController01f8544c8fd4628bc686502e8b727d95'] = 'le champ';
@@ -3188,7 +3188,6 @@ $_LANGADM['AdminProductsed75712b0eb1913c28a3872731ffd48d'] = 'Dupliquer';
$_LANGADM['AdminProductsbe79f9c19dbf33fba980c3d9961bed6e'] = 'Prévisualiser';
$_LANGADM['AdminProducts3094af8ef1a9cd6080c00647a5fbfc61'] = 'Voir les ventes du produit';
$_LANGADM['AdminProducts853fd1651461ce105a2f19272b700f06'] = 'Nouvelle déclinaison';
$_LANGADM['AdminProductsea4788705e6873b424c65e91c2846b19'] = 'Annuler';
$_LANGADM['AdminProductsc9cc8cce247e49bae79f15173ce97354'] = 'Enregistrer';
$_LANGADM['AdminProducts9ea67be453eaccf020697b4654fc021a'] = 'Enregistrer et rester';
$_LANGADM['AdminProductsa9e2ceb7315eca5c3974b433f0c540fb'] = 'Les numéros de compte ont été mis à jour';
@@ -3294,6 +3293,7 @@ $_LANGADM['AdminProducts3dd42bfc8345e82c43b4a40a3426ec49'] = 'Référence :';
$_LANGADM['AdminProductsccf096490d2671f3ea97ea9289eee5b1'] = 'EAN13 :';
$_LANGADM['AdminProductsaf7448c885be0d8acd5eb84322176570'] = 'UPC :';
$_LANGADM['AdminProducts418734e88e64dbe12a62122833c89da7'] = 'Caractères spéciaux autorisés :';
$_LANGADM['AdminProducts23470f2faa48c53e6fb5fad4e3de3cdd'] = 'Produit Virtuel';
$_LANGADM['AdminProductsac421120056d9d55c27faba6ae2178b2'] = 'La taille maximum d\'upload sur votre serveur est de';
$_LANGADM['AdminProductsdc8f50091cddc5183be3a5b5f774912a'] = 'Uploader un fichier';
$_LANGADM['AdminProducts3cb94c0658e6bbfdeac7e65b9635a8f5'] = 'Voici le lien';
@@ -3377,7 +3377,6 @@ $_LANGADM['AdminProducts873204675cdaee94cd0e27c18c0c3d0f'] = 'Réduit le stock';
$_LANGADM['AdminProductsa55e7def30626a5de92fb5bac30e765f'] = 'Augmente le stock';
$_LANGADM['AdminProductse659b52eba1f0299b2d8ca3483919e72'] = 'Type :';
$_LANGADM['AdminProductsdeb10517653c255364175796ace3553f'] = 'Produit';
$_LANGADM['AdminProducts23470f2faa48c53e6fb5fad4e3de3cdd'] = 'Produit Virtuel';
$_LANGADM['AdminProducts4e140ba723a03baa6948340bf90e2ef6'] = 'Nom :';
$_LANGADM['AdminProducts6252c0f2c2ed83b7b06dfca86d4650bb'] = 'Caractères interdits :';
$_LANGADM['AdminProductsa1f9d795d1110aeeed6b5368c16dc725'] = 'EAN13 ou JAN :';