[Mpuls-commits] r1486 - wasko/branches/2.0/mpulsweb/controllers

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Thu Feb 11 08:26:23 CET 2010


Author: torsten
Date: 2010-02-11 08:26:20 +0100 (Thu, 11 Feb 2010)
New Revision: 1486

Modified:
   wasko/branches/2.0/mpulsweb/controllers/appointment.py
Log:
* mpulsweb/controllers/appointment.py (AppointmentController): Adapted
c-vars fro dialogs.



Modified: wasko/branches/2.0/mpulsweb/controllers/appointment.py
===================================================================
--- wasko/branches/2.0/mpulsweb/controllers/appointment.py	2010-02-11 07:15:00 UTC (rev 1485)
+++ wasko/branches/2.0/mpulsweb/controllers/appointment.py	2010-02-11 07:26:20 UTC (rev 1486)
@@ -105,8 +105,8 @@
                 appointment = factory.createNew()
                 appointment.setData(form_result)
                 appointment.store()
-                c.success_for = CREATE_APPOINT_NOTIFICATION_SUCCESS
-                c.success_text = CREATE_APPOINT_NOTIFICATION_TEXT_SUCCESS
+                c.dialog_title = CREATE_APPOINT_NOTIFICATION_SUCCESS
+                c.dialog_text = CREATE_APPOINT_NOTIFICATION_TEXT_SUCCESS
                 c.url_ok = "/appointment/overview"
                 return render('/appointments/dialogs/success_create_appointment.mako')
             except formencode.Invalid, error:
@@ -160,8 +160,8 @@
                 appointment = factory.loadById(form_result.get('id'))
                 appointment.setData(form_result)
                 appointment.store()
-                c.success_for = EDIT_APPOINT_NOTIFICATION_SUCCESS
-                c.success_text = EDIT_APPOINT_NOTIFICATION_TEXT_SUCCESS
+                c.dialog_title = EDIT_APPOINT_NOTIFICATION_SUCCESS
+                c.dialog_text = EDIT_APPOINT_NOTIFICATION_TEXT_SUCCESS
                 c.url_ok = "/appointment/overview"
                 return render('/appointments/dialogs/success_edit_appointment.mako')
             except formencode.Invalid, error:
@@ -183,19 +183,19 @@
         if confirmed == 1:
             appointment = factory.loadById(id)
             if appointment.delete():
-                c.success_for = DELETE_APPOINT_NOTIFICATION_SUCCESS
-                c.success_text = DELETE_APPOINT_NOTIFICATION_TEXT_SUCCESS
+                c.dialog_title = DELETE_APPOINT_NOTIFICATION_SUCCESS
+                c.dialog_text = DELETE_APPOINT_NOTIFICATION_TEXT_SUCCESS
                 c.url_ok = "/appointment/overview"
                 return render('/appointments/dialogs/success_delete_appointment.mako')
             else:
-                c.failed_for = DELETE_APPOINT_NOTIFICATION_FAILED
-                c.failed_text = DELETE_APPOINT_NOTIFICATION_TEXT_FAILED
+                c.dialog_title = DELETE_APPOINT_NOTIFICATION_FAILED
+                c.dialog_text = DELETE_APPOINT_NOTIFICATION_TEXT_FAILED
                 c.url_ok = "/appointment/overview"
                 return render('/appointments/dialogs/failed_delete_appointment.mako')
         else:
             c.context = "../main.mako"
-            c.confirm_for = DELETE_APPOINT_CONFIRM
-            c.question = DELETE_APPOINT_CONFIRM_TEXT
+            c.dialog_title = DELETE_APPOINT_CONFIRM
+            c.dialog_text = DELETE_APPOINT_CONFIRM_TEXT
             c.url_yes = "/appointment/delete/%s/1" % id
             c.url_no = "/appointment/overview/"
             return render('/appointments/dialogs/confirm.mako')



More information about the Mpuls-commits mailing list