Jake Vanderwerf
5 days ago 0dfe1d8afafc59c4a5559c498342668d5a58d6ef
inc/registrar/Fields.php
@@ -36,6 +36,9 @@
            break;
         case 'user':
            $this->addUserFields();
            if ($registrar->hasAnyIntegrations()) {
               $this->addIntegrationSetupField();
            }
            break;
      }
   }
@@ -190,18 +193,22 @@
         'first_name'   => [
            'type'   => 'text',
            'label'  => 'First Name',
            'section'=> 'your-account'
         ],
         'last_name' => [
            'type'   => 'text',
            'label'  => 'Last Name',
            'section'=> 'your-account'
         ],
         'user_email'   => [
            'type'   => 'email',
            'label'  => 'Your Email',
            'section'=> 'your-account'
         ],
         'display_name' => [
            'type'   => 'text',
            'label'  => 'Display Name',
            'section'=> 'your-account'
         ],
//       'website'   => [
//          'type'   => 'url',
@@ -454,4 +461,17 @@
   {
      return (new self())->defaultUserFields();
   }
   protected function addIntegrationSetupField():void
   {
      $integrations = $this->registrar->getIntegrations();
      foreach (array_keys($integrations) as $integration) {
         $this->addField('integration_'.$integration.'_connected', [
            'type'   => 'true_false',
            'hidden' => true,
            'label'     => 'Connected to '.$integration,
            'default'   => false,
         ]);
      }
   }
}