DEV: Remove old group form code (#13542)

DEV: Remove old group form code (#13542)

We don’t use this group form anymore since https://github.com/discourse/discourse/commit/964da218173db007fefe6357e96292f5545c513e when we revamped the UI

diff --git a/app/assets/javascripts/discourse/app/components/groups-form-email-fields.js b/app/assets/javascripts/discourse/app/components/groups-form-email-fields.js
deleted file mode 100644
index e9f4a7e..0000000
--- a/app/assets/javascripts/discourse/app/components/groups-form-email-fields.js
+++ /dev/null
@@ -1,19 +0,0 @@
-import Component from "@ember/component";
-import discourseComputed from "discourse-common/utils/decorators";
-
-export default Component.extend({
-  @discourseComputed("model.imap_mailboxes")
-  mailboxes(imapMailboxes) {
-    return imapMailboxes.map((mailbox) => ({ name: mailbox, value: mailbox }));
-  },
-
-  @discourseComputed("model.imap_old_emails")
-  oldEmails(oldEmails) {
-    return oldEmails || 0;
-  },
-
-  @discourseComputed("model.imap_old_emails", "model.imap_new_emails")
-  totalEmails(oldEmails, newEmails) {
-    return (oldEmails || 0) + (newEmails || 0);
-  },
-});
diff --git a/app/assets/javascripts/discourse/app/templates/components/groups-form-email-fields.hbs b/app/assets/javascripts/discourse/app/templates/components/groups-form-email-fields.hbs
deleted file mode 100644
index 386935c..0000000
--- a/app/assets/javascripts/discourse/app/templates/components/groups-form-email-fields.hbs
+++ /dev/null
@@ -1,82 +0,0 @@
-{{#if currentUser.admin}}
-  <div class="control-group">
-    <label class="control-label">{{i18n "groups.manage.email.credentials.title"}}</label>
-  </div>
-
-  {{#if model.imap_last_error}}
-    <div class="alert alert-error">{{model.imap_last_error}}</div>
-  {{else}}
-    <div class="alert alert-info">
-      {{i18n "groups.manage.email.status" old_emails=oldEmails total_emails=totalEmails}}
-    </div>
-  {{/if}}
-
-  <div class="control-group">
-    <label for="smtp_server">{{i18n "groups.manage.email.credentials.smtp_server"}}</label>
-    {{input type="text" name="smtp_server" value=model.smtp_server}}
-  </div>
-
-  <div class="control-group">
-    <label for="smtp_port">{{i18n "groups.manage.email.credentials.smtp_port"}}</label>
-    {{input type="text" name="smtp_port" value=model.smtp_port}}
-  </div>
-
-  <div class="control-group">
-    <label class="control-group-inline" for="smtp_ssl">
-      {{input type="checkbox" name="smtp_ssl" id="smtp_ssl" checked=model.smtp_ssl}}
-      {{i18n "groups.manage.email.credentials.smtp_ssl"}}
-    </label>
-  </div>
-
-  <div class="control-group">
-    <label for="imap_server">{{i18n "groups.manage.email.credentials.imap_server"}}</label>
-    {{input type="text" name="imap_server" value=model.imap_server}}
-  </div>
-
-  <div class="control-group">
-    <label for="imap_port">{{i18n "groups.manage.email.credentials.imap_port"}}</label>
-    {{input type="text" name="imap_port" value=model.imap_port}}
-  </div>
-
-  <div class="control-group">
-    <label class="control-group-inline" for="imap_ssl">
-      {{input type="checkbox" name="imap_ssl" checked=model.imap_ssl id="imap_ssl"}}
-      {{i18n "groups.manage.email.credentials.imap_ssl"}}
-    </label>
-  </div>
-
-  <div class="control-group">
-    <label for="username">{{i18n "groups.manage.email.credentials.username"}}</label>
-    {{input type="text" name="username" value=model.email_username}}
-  </div>
-
-  <div class="control-group">
-    <label for="password">{{i18n "groups.manage.email.credentials.password"}}</label>
-    {{input type="password" name="password" value=model.email_password}}
-  </div>
-
-  <div class="control-group">
-    {{#if mailboxes}}
-      <label for="imap_mailbox_name">{{i18n "groups.manage.email.mailboxes.synchronized"}}</label>
-      {{combo-box name="imap_mailbox_name"
-                  value=model.imap_mailbox_name
-                  valueProperty="value"
-                  content=mailboxes
-                  none="groups.manage.email.mailboxes.disabled"
-                  onChange=(action (mut model.imap_mailbox_name))}}
-    {{else}}
-      {{i18n "groups.manage.email.mailboxes.none_found"}}
-    {{/if}}
-  </div>
-
-  <div class="control-group">
-    <label class="control-label">{{i18n "groups.manage.email.settings.title"}}</label>
-  </div>
-  <div class="control-group">
-    <label class="control-group-inline" for="allow_unknown_sender_topic_replies">
-      {{input type="checkbox" name="allow_unknown_sender_topic_replies" id="allow_unknown_sender_topic_replies" checked=model.allow_unknown_sender_topic_replies}}
-      <span>{{i18n "groups.manage.email.settings.allow_unknown_sender_topic_replies"}}</span>
-    </label>
-    <p>{{i18n "groups.manage.email.settings.allow_unknown_sender_topic_replies_hint"}}</p>
-  </div>
-{{/if}}

GitHub sha: a6b928947788bd75cdc6ff9256d81274015e20af

This commit appears in #13542 which was approved by tgxworld. It was merged by martin.