@@ -264,6 +264,9 def send_beam(request, id_conf, id_beam): | |||
|
264 | 264 | return redirect(conf.get_absolute_url()) |
|
265 | 265 | |
|
266 | 266 | beam = get_object_or_404(ABSBeam, pk=id_beam) |
|
267 | ||
|
268 | if request.method == 'POST': | |
|
269 | ||
|
267 | 270 | beams_list = ABSBeam.objects.filter(abs_conf=conf) |
|
268 | 271 | conf.active_beam = id_beam |
|
269 | 272 | |
@@ -279,6 +282,16 def send_beam(request, id_conf, id_beam): | |||
|
279 | 282 | |
|
280 | 283 | return redirect('url_abs_conf', conf.id) |
|
281 | 284 | |
|
285 | kwargs = { | |
|
286 | 'title': 'ABS', | |
|
287 | 'suptitle': conf.label, | |
|
288 | 'message': 'Are you sure you want to change ABS Beam to: {}?'.format(beam.name), | |
|
289 | 'delete': False | |
|
290 | } | |
|
291 | kwargs['menu_configurations'] = 'active' | |
|
292 | ||
|
293 | return render(request, 'confirm.html', kwargs) | |
|
294 | ||
|
282 | 295 | |
|
283 | 296 | def add_beam(request, id_conf): |
|
284 | 297 |
@@ -1492,6 +1492,7 def dev_conf_write(request, id_conf): | |||
|
1492 | 1492 | |
|
1493 | 1493 | conf = get_object_or_404(Configuration, pk=id_conf) |
|
1494 | 1494 | |
|
1495 | if request.method == 'POST': | |
|
1495 | 1496 | if conf.write_device(): |
|
1496 | 1497 | conf.device.conf_active = conf.pk |
|
1497 | 1498 | conf.device.save() |
@@ -1503,6 +1504,16 def dev_conf_write(request, id_conf): | |||
|
1503 | 1504 | |
|
1504 | 1505 | return redirect(get_object_or_404(Configuration, pk=id_conf).get_absolute_url()) |
|
1505 | 1506 | |
|
1507 | kwargs = { | |
|
1508 | 'title': 'Write Configuration', | |
|
1509 | 'suptitle': conf.label, | |
|
1510 | 'message': 'Are you sure yo want to write this {} configuration?'.format(conf.device), | |
|
1511 | 'delete': False | |
|
1512 | } | |
|
1513 | kwargs['menu_configurations'] = 'active' | |
|
1514 | ||
|
1515 | return render(request, 'confirm.html', kwargs) | |
|
1516 | ||
|
1506 | 1517 | |
|
1507 | 1518 | @login_required |
|
1508 | 1519 | def dev_conf_read(request, id_conf): |
General Comments 0
You need to be logged in to leave comments.
Login now