added tarifs_import with xlrd
This commit is contained in:
166
mondumas/templates/parametres/tarif_edit.pt
Normal file
166
mondumas/templates/parametres/tarif_edit.pt
Normal file
@@ -0,0 +1,166 @@
|
||||
<metal:block use-macro="main_template">
|
||||
<div metal:fill-slot="content">
|
||||
|
||||
<div tal:condition="message" tal:content="message" class="alert alert-danger" />
|
||||
<br />
|
||||
<form id="user_edit-form" class="form-horizontal" action="${url}" method="post" tal:condition="item"
|
||||
data-fv-framework="bootstrap"
|
||||
data-fv-icon-valid="glyphicon glyphicon-ok"
|
||||
data-fv-icon-invalid="glyphicon glyphicon-remove"
|
||||
data-fv-icon-validating="glyphicon glyphicon-refresh">
|
||||
|
||||
<div id="tarif" class="tab-pane fade in active">
|
||||
<br />
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-2" for="REF">Référence</label>
|
||||
<div class="col-xs-6">
|
||||
<input class="form-control" type="text" id="REF" name="REF" value="${item.REF}"
|
||||
placeholder="10 caractères maximum"
|
||||
data-fv-notempty="true"
|
||||
data-fv-notempty-message="La référence est obligatoire"
|
||||
data-fv-stringlength="true"
|
||||
data-fv-stringlength-max="10"
|
||||
data-fv-stringlength-message="10 caractères maximum" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-2">Famille</label>
|
||||
<div class="col-xs-6">
|
||||
<select class="form-control" id="FAM" name="FAM">
|
||||
<tal:block tal:repeat="famille familles">
|
||||
<option value="${famille}" tal:attributes="selected famille[0]==item.FAM and 'selected' or None">${famille}</option>
|
||||
</tal:block>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-2" for="LIBART">Libellé</label>
|
||||
<div class="col-xs-6">
|
||||
<input class="form-control" type="text" id="LIBART" name="LIBART" value="${item.LIBART}"
|
||||
placeholder="45 caractères maximum"
|
||||
data-fv-notempty="true"
|
||||
data-fv-notempty-message="Le libellé est obligatoire"
|
||||
data-fv-stringlength="true"
|
||||
data-fv-stringlength-max="45"
|
||||
data-fv-stringlength-message="45 caractères maximum" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-2" for="LIBCOMPL1">Libellé compl. 1</label>
|
||||
<div class="col-xs-6">
|
||||
<input class="form-control" type="text" id="LIBCOMPL1" name="LIBCOMPL1" value="${item.LIBCOMPL1}"
|
||||
placeholder="45 caractères maximum"
|
||||
data-fv-stringlength="true"
|
||||
data-fv-stringlength-max="45"
|
||||
data-fv-stringlength-message="45 caractères maximum" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-2" for="LIBCOMPL2">Libellé compl. 2</label>
|
||||
<div class="col-xs-6">
|
||||
<input class="form-control" type="text" id="LIBCOMPL2" name="LIBCOMPL2" value="${item.LIBCOMPL2}"
|
||||
placeholder="45 caractères maximum"
|
||||
data-fv-stringlength="true"
|
||||
data-fv-stringlength-max="45"
|
||||
data-fv-stringlength-message="45 caractères maximum" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-2" for="LIBCOMPL3">Libellé compl. 3</label>
|
||||
<div class="col-xs-6">
|
||||
<input class="form-control" type="text" id="LIBCOMPL3" name="LIBCOMPL3" value="${item.LIBCOMPL3}"
|
||||
placeholder="45 caractères maximum"
|
||||
data-fv-stringlength="true"
|
||||
data-fv-stringlength-max="45"
|
||||
data-fv-stringlength-message="45 caractères maximum" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-2" for="LIBCOMPL4">Libellé compl. 4</label>
|
||||
<div class="col-xs-6">
|
||||
<input class="form-control" type="text" id="LIBCOMPL4" name="LIBCOMPL4" value="${item.LIBCOMPL4}"
|
||||
placeholder="45 caractères maximum"
|
||||
data-fv-stringlength="true"
|
||||
data-fv-stringlength-max="45"
|
||||
data-fv-stringlength-message="45 caractères maximum" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-xs-2 control-label">Prix HT 1</label>
|
||||
<div class="col-xs-6">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon"><i class="glyphicon glyphicon-euro"></i></span>
|
||||
<input class="form-control" type="text" id="PRIXHT1" name="PRIXHT1" value="${item.PRIXHT1}"
|
||||
data-fv-numeric="true"
|
||||
data-fv-numeric-message="Le montant est invalide" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-xs-2 control-label">Prix HT 2</label>
|
||||
<div class="col-xs-6">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon"><i class="glyphicon glyphicon-euro"></i></span>
|
||||
<input class="form-control" type="text" id="PRIXHT2" name="PRIXHT2" value="${item.PRIXHT2}"
|
||||
data-fv-numeric="true"
|
||||
data-fv-numeric-message="Le montant est invalide" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-2" for="ref_cli1">Réf. client 1</label>
|
||||
<div class="col-xs-6">
|
||||
<input class="form-control" type="text" id="ref_cli1" name="ref_cli1" value="${item.ref_cli1}"
|
||||
placeholder="20 caractères maximum"
|
||||
data-fv-stringlength="true"
|
||||
data-fv-stringlength-max="20"
|
||||
data-fv-stringlength-message="20 caractères maximum" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-2" for="ref_cli2">Réf. client 2</label>
|
||||
<div class="col-xs-6">
|
||||
<input class="form-control" type="text" id="ref_cli2" name="ref_cli2" value="${item.ref_cli2}"
|
||||
placeholder="20 caractères maximum"
|
||||
data-fv-stringlength="true"
|
||||
data-fv-stringlength-max="20"
|
||||
data-fv-stringlength-message="20 caractères maximum" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-2" for="access">Dernière modif.</label>
|
||||
<div class="col-xs-7">
|
||||
<p class="form-control-static" tal:condition="item.REF != '0'">${item.modif_le.strftime('%d/%m/%Y - %H:%M')}</p>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-xs-offset-2 col-xs-10">
|
||||
<div class="form-group">
|
||||
<a class="btn btn-default" href="${request.application_url}/articles">
|
||||
<span class="glyphicon glyphicon-chevron-left"></span> Annuler</a>
|
||||
<button class="btn btn-primary" type="submit" name="form.submitted">
|
||||
<span class="glyphicon glyphicon-ok"></span> Enregistrer</button>
|
||||
<button class="btn btn-warning" type="submit" name="form.deleted"
|
||||
tal:condition="item.REF != '0'">
|
||||
<span class="glyphicon glyphicon-remove"></span> Supprimer</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<br />
|
||||
<br />
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('#user_edit-form').formValidation();
|
||||
$('form input').on('keypress', function(e) {
|
||||
return e.which !== 13;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
</div>
|
||||
</metal:block>
|
||||
Reference in New Issue
Block a user