Commit dfe7be58 by benjaoming

hand empty notifications settings

parent d7df0af4
...@@ -162,7 +162,8 @@ class SubscriptionForm(PluginSettingsFormMixin, forms.Form): ...@@ -162,7 +162,8 @@ class SubscriptionForm(PluginSettingsFormMixin, forms.Form):
if cd['edit']: if cd['edit']:
edit_notification = models.ArticleSubscription.objects.get_or_create( edit_notification = models.ArticleSubscription.objects.get_or_create(
article=self.article, article=self.article,
notification_type=self.notification_type notification_type=self.notification_type,
settings=cd['settings'],
)[0] )[0]
edit_notification.settings = cd['settings'] edit_notification.settings = cd['settings']
edit_notification.send_emails = cd['edit_email'] edit_notification.send_emails = cd['edit_email']
......
...@@ -23,13 +23,17 @@ ...@@ -23,13 +23,17 @@
{% include "wiki/includes/formfield.html" %} {% include "wiki/includes/formfield.html" %}
{% endfor %} {% endfor %}
</fieldset> </fieldset>
{% empty %}
<em>{% trans "You are not subscribed to any notifications yet." %}</em>
{% endfor %} {% endfor %}
{% if formset.forms %}
<div class="form-actions"> <div class="form-actions">
<button type="submit" class="btn btn-primary"> <button type="submit" class="btn btn-primary">
<span class="icon-ok"></span> <span class="icon-ok"></span>
{% trans "Save changes" %} {% trans "Save changes" %}
</button> </button>
</div> </div>
{% endif %}
</form> </form>
<div class="row-fluid"> <div class="row-fluid">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment