Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
register: Ask which review site for how found zulip.
Aman Agrawalb6c37a347418
diff --git a/corporate/views/installation_activity.py b/corporate/views/installation_activity.pyindex 4383fc20ab4..afad3e16448 100644--- a/corporate/views/installation_activity.py+++ b/corporate/views/installation_activity.py@@ -254,6 +254,7 @@ def realm_summary_table(export: bool) -> str:if how_found in (RealmAuditLog.HOW_REALM_CREATOR_FOUND_ZULIP_OPTIONS["other"],RealmAuditLog.HOW_REALM_CREATOR_FOUND_ZULIP_OPTIONS["ad"],+ RealmAuditLog.HOW_REALM_CREATOR_FOUND_ZULIP_OPTIONS["review_site"],):row["how_realm_creator_found_zulip"] += f": {extra_context}"elif how_found == RealmAuditLog.HOW_REALM_CREATOR_FOUND_ZULIP_OPTIONS["existing_user"]:diff --git a/templates/zerver/register.html b/templates/zerver/register.htmlindex 89a1b4f50b2..394c128cd57 100644--- a/templates/zerver/register.html+++ b/templates/zerver/register.html@@ -210,9 +210,10 @@ Form is validated both client-side using jquery-validation (see signup.js) and s<option value="{{ option_id }}">{{ option_name }}</option>{% endfor %}</select>- <input id="how-realm-creator-found-zulip-other" type="text" placeholder="{{ _('Please describe') }}" name="how_realm_creator_found_zulip_other_text" maxlength="100"/>- <input id="how-realm-creator-found-zulip-where-ad" type="text" placeholder="{{ _('Where did you see the ad?') }}" name="how_realm_creator_found_zulip_where_ad" maxlength="100"/>- <input id="how-realm-creator-found-zulip-which-organization" type="text" placeholder="{{ _('Which organization?') }}" name="how_realm_creator_found_zulip_which_organization" maxlength="100"/>+ <input id="how-realm-creator-found-zulip-other" class="how-found-zulip-extra-data-input" type="text" placeholder="{{ _('Please describe') }}" name="how_realm_creator_found_zulip_other_text" maxlength="100"/>+ <input id="how-realm-creator-found-zulip-where-ad" class="how-found-zulip-extra-data-input" type="text" placeholder="{{ _('Where did you see the ad?') }}" name="how_realm_creator_found_zulip_where_ad" maxlength="100"/>+ <input id="how-realm-creator-found-zulip-which-organization" class="how-found-zulip-extra-data-input" type="text" placeholder="{{ _('Which organization?') }}" name="how_realm_creator_found_zulip_which_organization" maxlength="100"/>+ <input id="how-realm-creator-found-zulip-review-site" class="how-found-zulip-extra-data-input" type="text" placeholder="{{ _('Which one?') }}" name="how_realm_creator_found_zulip_review_site" maxlength="100"/></div>{% endif %}diff --git a/web/src/portico/signup.ts b/web/src/portico/signup.tsindex 20b13771ede..782b7824db8 100644--- a/web/src/portico/signup.ts+++ b/web/src/portico/signup.ts@@ -312,6 +312,7 @@ $(() => {["other", "how-realm-creator-found-zulip-other"],["ad", "how-realm-creator-found-zulip-where-ad"],["existing_user", "how-realm-creator-found-zulip-which-organization"],+ ["review_site", "how-realm-creator-found-zulip-review-site"],]);const hideElement = (element: string): void => {diff --git a/web/styles/portico/portico_signin.css b/web/styles/portico/portico_signin.cssindex 226cee1dcf2..2ebec58c3ec 100644--- a/web/styles/portico/portico_signin.css+++ b/web/styles/portico/portico_signin.css@@ -1464,9 +1464,7 @@ button#register_auth_button_gitlab {top: -5px;}-#how-realm-creator-found-zulip-where-ad,-#how-realm-creator-found-zulip-other,-#how-realm-creator-found-zulip-which-organization {+#how-realm-creator-found-zulip .how-found-zulip-extra-data-input {margin-top: 5px;display: none;}diff --git a/zerver/forms.py b/zerver/forms.pyindex dc9d3c4b036..f25338d9dfc 100644--- a/zerver/forms.py+++ b/zerver/forms.py@@ -206,6 +206,9 @@ class RegistrationForm(RealmDetailsForm):self.fields["how_realm_creator_found_zulip_which_organization"] = forms.CharField(max_length=100, required=False)+ self.fields["how_realm_creator_found_zulip_review_site"] = forms.CharField(+ max_length=100, required=False+ )def clean_full_name(self) -> str:try:diff --git a/zerver/views/registration.py b/zerver/views/registration.pyindex ee59964826a..34a47ffb83f 100644--- a/zerver/views/registration.py+++ b/zerver/views/registration.py@@ -506,6 +506,13 @@ def registration_helper(how_realm_creator_found_zulip_extra_context = form.cleaned_data["how_realm_creator_found_zulip_which_organization"]+ elif (+ how_realm_creator_found_zulip+ == RealmAuditLog.HOW_REALM_CREATOR_FOUND_ZULIP_OPTIONS["review_site"]+ ): # nocoverage+ how_realm_creator_found_zulip_extra_context = form.cleaned_data[+ "how_realm_creator_found_zulip_review_site"+ ]realm = do_create_realm(string_id,