Merge branch 'ticket-eanUpgrade' into develop

This commit is contained in:
Marion Muszynski 2016-09-22 16:14:07 +02:00
commit 432b96df7f

View File

@ -163,10 +163,6 @@ class AdminBraderie extends AdminTab
return false; return false;
}); });
// $("#input_comment").change(function(event) {
// $("#input_storage").focus();
// });
$("#input_storage").change(function(event) { $("#input_storage").change(function(event) {
event.preventDefault(); event.preventDefault();
if ($product_id == undefined || $product_id == 0) { if ($product_id == undefined || $product_id == 0) {
@ -349,12 +345,19 @@ class AdminBraderie extends AdminTab
.margin-form {padding: 0 0 1em 10px;} .margin-form {padding: 0 0 1em 10px;}
</style> </style>
<fieldset> <fieldset>
<legend>'.$this->l('Braderie').'</legend>'; <legend>'.$this->l('Braderie').'</legend>
<form id="formBraderie" action="?tab=AdminBraderie&token='.$token.'" method="POST">';
if ($this->error) { if ($this->error) {
$html .= '<p class="margin-form" id="error">'.$this->error.'</p>'; $html .= '<p class="margin-form" id="error">'.$this->error.'</p>';
} else { } else {
$html .= '<p class="margin-form" id="error">'.$this->error.'</p>'; $html .= '<p class="margin-form" id="error">'.$this->error.'</p>';
} }
$html .='<div class="margin-form" id="ean_input_group" style="display: none;">
<label>'.$this->l('Code EAN').' : </label>
<input type="text" name="ean" id="input_ean">
<div id="ean_from_product"></div>
</div>
<hr id="divider" style="display: none;">';
$html .= '<div class="margin-form"> $html .= '<div class="margin-form">
<label>'.$this->l('Ventes').' : </label> <label>'.$this->l('Ventes').' : </label>
<select class="chosen-select" id="sale" name="sale"> <select class="chosen-select" id="sale" name="sale">
@ -366,7 +369,6 @@ class AdminBraderie extends AdminTab
$html .= ' </select> $html .= ' </select>
</div> </div>
<hr id="divider" style="display: none;">
<div class="margin-form" id="category_input_group" style="display: none;"> <div class="margin-form" id="category_input_group" style="display: none;">
<label>'.$this->l('Catégories').' : </label> <label>'.$this->l('Catégories').' : </label>
<select class="chosen-select" id="category" name="category"> <select class="chosen-select" id="category" name="category">
@ -374,32 +376,26 @@ class AdminBraderie extends AdminTab
</select> </select>
<input type="submit" class="button" id="show_current_category_button" value="'.$this->l('Voir cette catégorie').'" style="margin-left: 20px; display: none"> <input type="submit" class="button" id="show_current_category_button" value="'.$this->l('Voir cette catégorie').'" style="margin-left: 20px; display: none">
</div> </div>
<form id="formBraderie" action="?tab=AdminBraderie&token='.$token.'" method="POST"> <div class="margin-form" id="quantity_input_group" style="display: none;">
<div class="margin-form" id="ean_input_group" style="display: none;"> <label>'.$this->l('Quantité').' : </label>
<label>'.$this->l('Code EAN').' : </label> <input type="number" name="quantity" id="input_quantity" value="1">
<input type="text" name="ean" id="input_ean"> </div>
<div id="ean_from_product"></div> <div class="margin-form" id="storage_input_group" style="display: none;">
</div> <label>'.$this->l('Emplacement').' : </label>
<div class="margin-form" id="comment_input_group" style="display: none;"> <input type="text" name="storage" id="input_storage">
<label>'.$this->l('Commentaires').' : </label> </div>
<textarea class="other_textarea" cols="49" rows="3" id="input_comment" name="input_comment"></textarea> <div class="margin-form" id="comment_input_group" style="display: none;">
</div> <label>'.$this->l('Commentaires').' : </label>
<div class="margin-form" id="storage_input_group" style="display: none;"> <textarea class="other_textarea" cols="49" rows="3" id="input_comment" name="input_comment"></textarea>
<label>'.$this->l('Emplacement').' : </label> </div>
<input type="text" name="storage" id="input_storage"> <div class="margin-form button-container" id="button_input_group" style="display: none;">
</div> <!--input type="submit" class="button" name="adminbraderie" value="'.$this->l('Ajouter').'" style="margin-left: 200px;" id="add_button"-->
<div class="margin-form" id="quantity_input_group" style="display: none;"> <input type="submit" class="button" id="check_button" value="'.$this->l('Vérifier').'" style="margin-left: 200px;">
<label>'.$this->l('Quantité').' : </label> </div>
<input type="number" name="quantity" id="input_quantity" value="1"> <input type="hidden" name="product" id="hidden_product_id">
</div> <input type="hidden" name="attribute" id="hidden_attribute_id">
<div class="margin-form button-container" id="button_input_group" style="display: none;"> </form>
<input type="submit" class="button" name="adminbraderie" value="'.$this->l('Ajouter').'" style="margin-left: 200px;" id="add_button"> </fieldset>';
<input type="submit" class="button" id="check_button" value="'.$this->l('Vérifier').'">
</div>
<input type="hidden" name="product" id="hidden_product_id">
<input type="hidden" name="attribute" id="hidden_attribute_id">
</form>
</fieldset>';
return $html; return $html;
} }