Просмотр исходного кода

Don't inject recaptcha element if recaptcha is not enabled

James Allen 8 лет назад
Родитель
Сommit
0b03bbc7c3
1 измененных файлов с 8 добавлено и 7 удалено
  1. 8 7
      services/web/app/views/project/editor/share.pug

+ 8 - 7
services/web/app/views/project/editor/share.pug

@@ -102,13 +102,14 @@ script(type='text/ng-template', id='shareProjectModalTemplate')
 						i.fa.fa-times
 			.row.invite-controls
 				form(ng-show="canAddCollaborators")
-					div(
-						id="recaptcha"
-				 		class="g-recaptcha"
-						data-sitekey=settings.recaptcha.siteKey
-						data-size="invisible"
-						data-badge="inline"
-					)
+					- if (settings.recaptcha)
+						div(
+							id="recaptcha"
+					 		class="g-recaptcha"
+							data-sitekey=settings.recaptcha.siteKey
+							data-size="invisible"
+							data-badge="inline"
+						)
 					.small #{translate("share_with_your_collabs")}
 					.form-group
 						tags-input(