Permalink
Browse files

Merge branch 'develop' into columns-plugin

Conflicts:
	docs/upgrade/2.4.rst
  • Loading branch information...
2 parents 7908842 + af529e6 commit d60e7549498041d57ed94df6447444f0f242aba1 @digi604 committed Oct 19, 2012
Showing with 14,314 additions and 10,550 deletions.
  1. +4 −3 cms/admin/forms.py
  2. +23 −1 cms/admin/placeholderadmin.py
  3. +364 −105 cms/migrations/0001_initial.py
  4. +333 −74 cms/migrations/0002_auto_start.py
  5. +346 −18 cms/migrations/0003_remove_placeholder.py
  6. +333 −80 cms/migrations/0004_textobjects.py
  7. +333 −90 cms/migrations/0005_mptt_added_to_plugins.py
  8. +333 −130 cms/migrations/0006_apphook.py
  9. +333 −76 cms/migrations/0007_apphook_longer.py
  10. +334 −81 cms/migrations/0008_redirects.py
  11. +334 −85 cms/migrations/0009_added_meta_fields.py
  12. +333 −87 cms/migrations/0010_5char_language.py
  13. +332 −86 cms/migrations/0011_title_overwrites.py
  14. +325 −441 cms/migrations/0012_publisher.py
  15. +326 −202 cms/migrations/0013_site_copy.py
  16. +326 −203 cms/migrations/0014_sites_removed.py
  17. +325 −228 cms/migrations/0015_modified_by_added.py
  18. +326 −206 cms/migrations/0016_author_copy.py
  19. +326 −207 cms/migrations/0017_author_removed.py
  20. +326 −208 cms/migrations/0018_site_permissions.py
  21. +326 −214 cms/migrations/0019_public_table_renames.py
  22. +326 −259 cms/migrations/0020_advanced_permissions.py
  23. +314 −384 cms/migrations/0021_publisher2.py
  24. +315 −150 cms/migrations/0022_login_required_added.py
  25. +312 −137 cms/migrations/0023_plugin_table_naming_function_changed.py
  26. +294 −161 cms/migrations/0024_added_placeholder_model.py
  27. +299 −186 cms/migrations/0025_placeholder_migration.py
  28. +296 −152 cms/migrations/0026_finish_placeholder_migration.py
  29. +298 −143 cms/migrations/0027_added_width_to_placeholder.py
  30. +292 −138 cms/migrations/0028_limit_visibility_in_menu_step1of3.py
  31. +296 −146 cms/migrations/0029_limit_visibility_in_menu_step2of3_data.py
  32. +294 −137 cms/migrations/0030_limit_visibility_in_menu_step3of3.py
  33. +293 −142 cms/migrations/0031_improved_language_code_support.py
  34. +293 −145 cms/migrations/0032_auto__del_field_cmsplugin_publisher_public__del_field_cmsplugin_publis.py
  35. +293 −154 cms/migrations/0033_auto__del_field_title_publisher_is_draft__del_field_title_publisher_st.py
  36. +292 −150 cms/migrations/0034_auto__chg_field_title_language__chg_field_cmsplugin_language__add_fiel.py
  37. +292 −139 cms/migrations/0035_auto__add_field_globalpagepermission_can_view__add_field_pagepermissio.py
  38. +293 −136 cms/migrations/0036_auto__add_field_cmsplugin_changed_date.py
  39. +2 −2 cms/models/pluginmodel.py
  40. +8 −5 cms/plugin_base.py
  41. +40 −28 cms/plugins/file/migrations/0001_initial.py
  42. +29 −17 cms/plugins/file/migrations/0002_freeze.py
  43. +27 −152 cms/plugins/file/migrations/0003_publisher.py
  44. +29 −153 cms/plugins/file/migrations/0004_table_rename.py
  45. +25 −119 cms/plugins/file/migrations/0005_publisher2.py
  46. +42 −29 cms/plugins/flash/migrations/0001_initial.py
  47. +28 −15 cms/plugins/flash/migrations/0002_freeze.py
  48. +28 −58 cms/plugins/flash/migrations/0003_publisher.py
  49. +30 −123 cms/plugins/flash/migrations/0004_table_rename.py
  50. +27 −124 cms/plugins/flash/migrations/0005_publisher2.py
  51. +58 −82 cms/plugins/googlemap/migrations/0001_initial.py
  52. +40 −133 cms/plugins/googlemap/migrations/0002_table_rename.py
  53. +40 −143 cms/plugins/googlemap/migrations/0003_address_unified.py
  54. +39 −126 cms/plugins/googlemap/migrations/0004_copy_address.py
  55. +40 −141 cms/plugins/googlemap/migrations/0005_delete_street.py
  56. +40 −138 cms/plugins/googlemap/migrations/0006_publisher2.py
  57. +23 −98 cms/plugins/googlemap/migrations/0007_latlng.py
  58. +23 −56 cms/plugins/googlemap/migrations/0008_routeplaner.py
  59. +22 −56 cms/plugins/googlemap/migrations/0009_routeplaner_title.py
  60. +9 −12 cms/plugins/googlemap/migrations/0010_auto__chg_field_googlemap_content.py
  61. +9 −17 cms/plugins/googlemap/migrations/0011_remove_zoom_null_values.py
  62. +5 −25 ...oglemap/migrations/0012_auto__add_field_googlemap_width__add_field_googlemap_height__chg_field.py
  63. +2 −0 cms/plugins/inherit/cms_plugins.py
  64. +37 −32 cms/plugins/inherit/migrations/0001_initial.py
  65. +20 −60 cms/plugins/inherit/migrations/0002_fieldchanges.py
  66. +80 −28 cms/plugins/link/migrations/0001_initial.py
  67. +74 −5 cms/plugins/link/migrations/0002_link_rename.py
  68. +67 −18 cms/plugins/link/migrations/0003_page_link.py
  69. +66 −21 cms/plugins/link/migrations/0004_larger_link_names.py
  70. +65 −57 cms/plugins/link/migrations/0005_publisher.py
  71. +66 −123 cms/plugins/link/migrations/0006_table_rename.py
  72. +63 −122 cms/plugins/link/migrations/0007_publisher2.py
  73. +65 −59 cms/plugins/link/migrations/0008_mailto.py
  74. +20 −26 cms/plugins/link/migrations/0009_add_target.py
  75. +2 −2 cms/plugins/link/models.py
  76. +82 −28 cms/plugins/picture/migrations/0001_initial.py
  77. +75 −6 cms/plugins/picture/migrations/0002_link_rename.py
  78. +67 −17 cms/plugins/picture/migrations/0003_freeze.py
  79. +68 −62 cms/plugins/picture/migrations/0004_publisher.py
  80. +66 −116 cms/plugins/picture/migrations/0005_table_rename.py
  81. +66 −136 cms/plugins/picture/migrations/0006_float_added.py
  82. +65 −131 cms/plugins/picture/migrations/0007_publisher2.py
  83. +65 −111 cms/plugins/picture/migrations/0008_longdesc_added.py
  84. +27 −11 cms/plugins/picture/models.py
  85. +49 −40 cms/plugins/snippet/migrations/0001_initial.py
  86. +35 −59 cms/plugins/snippet/migrations/0002_publisher.py
  87. +37 −127 cms/plugins/snippet/migrations/0003_table_rename.py
  88. +34 −124 cms/plugins/snippet/migrations/0004_publisher2.py
  89. +34 −106 cms/plugins/snippet/migrations/0005_template_added.py
  90. +70 −133 cms/plugins/teaser/migrations/0001_initial.py
  91. +64 −129 cms/plugins/teaser/migrations/0002_publisher2.py
  92. +40 −29 cms/plugins/text/migrations/0001_initial.py
  93. +24 −10 cms/plugins/text/migrations/0002_freeze.py
  94. +25 −51 cms/plugins/text/migrations/0003_publisher.py
  95. +29 −117 cms/plugins/text/migrations/0004_table_rename.py
  96. +25 −117 cms/plugins/text/migrations/0005_publisher2.py
  97. +13 −21 cms/plugins/text/migrations/0006_2_1_4_upgrade.py
  98. +44 −59 cms/plugins/twitter/migrations/0001_initial.py
  99. +10 −22 cms/plugins/twitter/migrations/0002_auto__add_twittersearch.py
  100. +66 −94 cms/plugins/video/migrations/0001_initial.py
  101. +32 −85 cms/plugins/video/migrations/0002_color_mute_controller.py
  102. +22 −185 cms/plugins/video/migrations/0003_newplayer_step1.py
  103. +22 −63 cms/plugins/video/migrations/0004_newplayer_step2.py
  104. +23 −62 cms/plugins/video/migrations/0005_newplayer_step3.py
  105. +22 −56 cms/plugins/video/migrations/0006_newplayer_step4.py
  106. +21 −65 cms/plugins/video/migrations/0007_newplayer_step5.py
  107. +19 −0 cms/test_utils/testcases.py
  108. +48 −9 cms/tests/placeholder.py
  109. +156 −60 cms/tests/plugins.py
  110. +1 −1 docs/extending_cms/api_references.rst
  111. +10 −6 docs/extending_cms/custom_plugins.rst
  112. +4 −4 docs/extending_cms/extending_examples.rst
  113. +8 −0 docs/index.rst
  114. +23 −9 docs/upgrade/2.4.rst
View
@@ -113,7 +113,7 @@ def clean(self):
#AdminFormsTests.test_clean_overwrite_url validates the form with when no page instance available
#Looks like just a theoretical corner case
title = page.get_title_obj(lang)
- if title:
+ if title and slug:
oldslug = title.slug
title.slug = slug
title.save()
@@ -122,8 +122,9 @@ def clean(self):
except ValidationError,e:
title.slug = oldslug
title.save()
- del cleaned_data['published']
- self._errors['published'] = ErrorList(e.messages)
+ if 'slug' in cleaned_data:
+ del cleaned_data['slug']
+ self._errors['slug'] = ErrorList(e.messages)
return cleaned_data
def clean_slug(self):
@@ -202,7 +202,29 @@ def edit_plugin(self, request, plugin_id):
post_request = request.POST.copy()
post_request['_continue'] = True
request.POST = post_request
-
+
+ if request.POST.get("_cancel", False):
+ # cancel button was clicked
+ context = {
+ 'CMS_MEDIA_URL': settings.CMS_MEDIA_URL,
+ 'plugin': cms_plugin,
+ 'is_popup': True,
+ 'name': unicode(cms_plugin),
+ "type": cms_plugin.get_plugin_name(),
+ 'plugin_id': plugin_id,
+ 'icon': force_escape(escapejs(cms_plugin.get_instance_icon_src())),
+ 'alt': force_escape(escapejs(cms_plugin.get_instance_icon_alt())),
+ 'cancel': True,
+ }
+ instance = cms_plugin.get_plugin_instance()[0]
+ if not instance:
+ # cancelled before any content was added to plugin
+ cms_plugin.delete()
+ context.update({
+ "deleted":True,
+ })
+ return render_to_response('admin/cms/page/plugin_forms_ok.html', context, RequestContext(request))
+
if not instance:
# instance doesn't exist, call add view
response = plugin_admin.add_view(request)
Oops, something went wrong. Retry.

0 comments on commit d60e754

Please sign in to comment.