diff --git a/share/views.py b/share/views.py index 0f06a3b56d..b7911d0386 100644 --- a/share/views.py +++ b/share/views.py @@ -115,12 +115,15 @@ def share_repo(request): if not is_registered_user(to_email): # Generate shared link and send mail if user has not registered. - kwargs = {'repo_id': repo_id, - 'repo_owner': from_email, - 'anon_email': to_email, - 'is_encrypted': is_encrypted, - } - anonymous_share(request, **kwargs) + # kwargs = {'repo_id': repo_id, + # 'repo_owner': from_email, + # 'anon_email': to_email, + # 'is_encrypted': is_encrypted, + # } + # anonymous_share(request, **kwargs) + msg = u'共享给 %s 失败,用户未注册。' % to_email + messages.add_message(request, messages.ERROR, msg) + continue else: msg = u'共享给 %s 成功,请前往共享管理查看。' % \ (to_email, reverse('share_admin')) diff --git a/templates/myhome.html b/templates/myhome.html index 94cc894460..cfa735dbd1 100644 --- a/templates/myhome.html +++ b/templates/myhome.html @@ -53,7 +53,7 @@ {% include "snippets/shared_in_repos.html" %} {% url 'share_repo' as repo_share_url %} -{% with post_url=repo_share_url tips='可以是非网站注册用户,我们会以邮件通知对方。' %} +{% with post_url=repo_share_url tips='' %} {% include "snippets/repo_share_form.html" %} {% endwith %}