correction creation d'un rdv
This commit is contained in:
@@ -113,9 +113,10 @@ def update_rdv(request, nodossier, nolig, comment, commentvi, date_rdv):
|
|||||||
ddate = datetime.strptime(date_rdv, '%d-%m-%Y %H:%M')
|
ddate = datetime.strptime(date_rdv, '%d-%m-%Y %H:%M')
|
||||||
datevi = ddate.strftime("%Y-%m-%d")
|
datevi = ddate.strftime("%Y-%m-%d")
|
||||||
heurevi = date_rdv[-5:]
|
heurevi = date_rdv[-5:]
|
||||||
|
auj = date.today().strftime("%Y-%m-%d")
|
||||||
|
|
||||||
if nolig == '0':
|
if nolig == '0':
|
||||||
query = "INSERT INTO %s SET societe='%s', datevi='%s', heurevi='%s', comment='%s', commentvi='%s'" % (table, societe, datevi, heurevi, comment, commentvi)
|
query = "INSERT INTO %s SET societe='%s',no_id=%s,date='%s',datevi='%s',heurevi='%s',comment='%s',commentvi='%s'" % (table, societe, no_id,auj,datevi, heurevi, comment, commentvi)
|
||||||
else:
|
else:
|
||||||
query = "UPDATE %s SET datevi='%s', heurevi='%s', comment='%s', commentvi='%s' where societe = '%s' and no_id=%s and nolig=%s;" % (table, datevi, heurevi, comment, commentvi, societe, no_id, nolig)
|
query = "UPDATE %s SET datevi='%s', heurevi='%s', comment='%s', commentvi='%s' where societe = '%s' and no_id=%s and nolig=%s;" % (table, datevi, heurevi, comment, commentvi, societe, no_id, nolig)
|
||||||
|
|
||||||
|
|||||||
@@ -70,14 +70,14 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
|
$('#rdv_edit-form').formValidation();
|
||||||
$('#date_rdv_picker').datetimepicker({
|
$('#date_rdv_picker').datetimepicker({
|
||||||
format: 'DD-MM-YYYY HH:mm',
|
format: 'DD-MM-YYYY HH:mm',
|
||||||
showClear: true,
|
showClear: true,
|
||||||
allowInputToggle: true,
|
allowInputToggle: true,
|
||||||
stepping: 15,
|
stepping: 15,
|
||||||
});
|
})
|
||||||
$('#rdv_edit-form').formValidation();
|
.on('changeDate', function(e) {
|
||||||
$('#date_rdv_picker').on('changeDate', function(e) {
|
|
||||||
// Revalidate the date field
|
// Revalidate the date field
|
||||||
$('#rdv_edit-form').formValidation('revalidateField', 'date_rdv');
|
$('#rdv_edit-form').formValidation('revalidateField', 'date_rdv');
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -111,7 +111,7 @@ def agenda(request):
|
|||||||
if not agenda:
|
if not agenda:
|
||||||
agenda = 'J'
|
agenda = 'J'
|
||||||
else:
|
else:
|
||||||
request.session.flash(u"Identifiant %s introuvable" % (logged_in), 'danger').n
|
request.session.flash(u"Identifiant %s introuvable" % (logged_in), 'danger')
|
||||||
return HTTPFound(location=request.route_url("/"))
|
return HTTPFound(location=request.route_url("/"))
|
||||||
|
|
||||||
if access >= 5:
|
if access >= 5:
|
||||||
|
|||||||
Reference in New Issue
Block a user