[
  { /* system layout specs */

    blockid=system;
    custom=com.netscape.management.msgserv.nntp.NNTPSystem;

    localvar=
    {
      .label.size=200;
      .l.comp.space=5;

      .menu.storage="Storage Permissions...";
      .menu.paths="Paths...";

      .conn.title=[titled, "Connection Settings"];
      .conn.enabled="Enable NNTP service by default";
      .conn.maxreaders="Maximum User Connections :";
      .conn.maxfeeds="Maximum Replication Connections :";
      .conn.timeout="Connection Timeout :";
      .conn.timeout.items=
      [
        sec,
        min,
        hour
      ];

      .label.size=200;
      .enc.encryption.label="Encryption :";
      .enc.enable.items=
      [
        false,
        true
      ];
      .enc.enable.labels=
      [
        Disabled,
        Enabled
      ];
      .enc.port.label="NNTP Server Port :";
      .enc.def.auth.label="Default Authentication Method :";
      .enc.auth.method.items=
      [
        basic,
        certs
      ];
      .enc.auth.method.labels=
      [
        "Basic",
        "Certificates"
      ];

      .spool.title=[titled, "Spool Settings"];
      .spool.dir.label="Spool directory :";
      .spool.maxarticlesize.label="Maximum article size :";
      .spool.maxarticlesize.unlimited="Unlimited";
      .spool.maxarticlesize.limited.items=[kb,mb];
      .spool.maxarticlesize.limited.labels=["KB", "MB"];
    },

    content=
    [ /* system layout contents */

      { /* service enabled */
        ctrl=togglepane;
        text=$.conn.enabled;
        val=$service.nntp.service.enabled.nsvalue;
      }, /* service enabled */
 
      { /* comp. space */
        ctrl=vstrut;
        size=$.l.comp.space;
      }, /* comp. space */

      { /* start of connection settings group */
        ctrl=pane;
        border=$.conn.title;
        layout=[ybox];
        content=
        [ /* start of conn. settings contents */

          { /* Start of max readers */
            ctrl=pane;
            layout=[xbox];
            content=
            [ /* contents of max readers */

              { /* max readers label */
                ctrl=label;
                wrap=$.label.size;
                alignh=left;
                aligny=0.5;
                text=$.conn.maxreaders;
                id=maxreaders;
              }, /* max readers label */

              { /* comp. space */
                ctrl=rigid;
              }, /* comp. space */

              { /* max readers textfield */
                ctrl=number;
                aligny=0.5;
                alignh=left;
                label=maxreaders;
                val=$service.nntp.network.maxreaders.nsvalue;
              }, /* max readers textfield */

              {
                ctrl=hglue;
              }

            ] /* max readers contents */
          }, /* End of max readers */

          { /* vertical spacing between components */
            ctrl=vstrut;
            size=$g.comp.space;
          },
  
          { /* Start of max feeds */
            ctrl=pane;
            layout=[xbox];
            content=
            [ /* contents of max feeds */
              { /* max feeds label */
                ctrl=label;
                wrap=$.label.size;
                alignh=left;
                aligny=0.5;
                text=$.conn.maxfeeds;
                id=maxfeeds;
              }, /* max feeds label */

              { /* comp. space */
                ctrl=rigid;
              }, /* comp. space */

              { /* max feeds textfield */
                ctrl=number;
                aligny=0.5;
                alignh=left;
                label=maxfeeds;
                val=$service.nntp.network.maxfeeds.nsvalue;
              }, /* max feeds textfield */

              {
                ctrl=hglue;
              }

            ] /* max feeds contents */
          }, /* End of max feeds */

          { /* vertical spacing between components */
            ctrl=vstrut;
            size=$g.comp.space;
          },

          { /* Start of timeout */
            ctrl=pane;
            layout=[xbox];
            content=
            [ /* contents of timeout */
              { /* timeout label */
                ctrl=label;
                wrap=$.label.size;
                alignh=left;
                aligny=0.5;
                text=$.conn.timeout;
                id=timeout;
              }, /* timeout label */

              { /* comp. space */
                ctrl=rigid;
              }, /* comp. space */

              { /* timeout textfield */
                ctrl=number;
                label=timeout;
                alignh=left;
                items=$.conn.timeout.items;
                labels=$g.timeunit.labels;
                val=$service.nntp.network.timeout.nsvalue;
                unit=sec;
                aligny=0.5;
              }, /* timeout textfield */

              {
                ctrl=hglue;
              }

            ] /* timeout contents */
          } /* End of timeout */

        ] /* end of conn. settings contents */
      }, /* end of connection settings group */

      {
        ctrl=vstrut;
        size=$.l.comp.space;
      },

      { /* spool settings */
        ctrl=pane;
        border=$.spool.title;
        layout=[ybox];
        content=
        [ /* spool contents */

          { /* spool dir */
            ctrl=pane;
            layout=[xbox];
            content=
            [ /* spool dir contents */

              { /* label */
                ctrl=label;
                text=$.spool.dir.label;
                wrap=$.label.size;
                alignh=left;
                aligny=0.5;
                id=spooldir;
              }, /* label */

              { /* comp space */
                ctrl=rigid;
              }, /* comp space */

              { /* textfield */
                ctrl=text;
                aligny=0.5;
                alignh=left;
                label=spooldir;
                val=$local.nntp.paths.spool.nsvalue;
              } /* textfield */

            ] /* spool dir contents */
          }, /* spool dir */

          {
            ctrl=vstrut;
            size=$g.comp.space;
          },

          { /* max. art. size */
            ctrl=pane;
            layout=[xbox];
            content=
            [ /* max. art. size contents */

              { /* label */
                ctrl=label;
                text=$.spool.maxarticlesize.label;
                wrap=$.label.size;
                alignh=left;
                aligny=0.5;
                id=maxarticlesize;
              }, /* label */

              {
                ctrl=rigid;
              },

              { /* max. art. size input choices */
                ctrl=pane;
                layout=[ybox];
                aligny=0.5;
                content=
                [ /* contents */

                  { /* unlimited */
                    ctrl=togglepane;
                    style=radio;
                    inline=true;
                    group=maxarticlesize;
                    text=$.spool.maxarticlesize.unlimited;
                    label=maxarticlesize;
                    id=unlimitedarticlesize;
                  }, /* unlimited */

                  { /* comp space */
                    ctrl=vstrut;
                    size=$.l.comp.space;
                  }, /* comp space */

                  { /* limit art. size */
                    ctrl=togglepane;
                    style=radio;
                    inline=true;
                    group=maxarticlesize;
                    text="";
                    label=maxarticlesize;
                    id=limitedarticlesize;
                    content=
                    [ /* limit art. size contents */

                      { /* max. art. size in bytes */
                        ctrl=number;
                        unit=byte;
                        items=$.spool.maxarticlesize.limited.items;
                        labels=$.spool.maxarticlesize.limited.labels;
                        label=maxarticlesize;
                        val=$local.nntp.content.maxarticlesize.nsvalue;
                        min=-1;
                        id=maxarticlesizevalue;
                      }, /* max. art. size in bytes */

                      {
                        ctrl=hglue;
                      }

                    ]; /* limit art. size contents */
                  } /* limit art. size */
                ] /* contents */
              } /* max. art. size input choices */

            ] /* max. art. size contents */
          } /* max. art. size */

        ] /* spool contents */
      }, /* spool settings */

      { /* comp. space */
        ctrl=vstrut;
        size=$.l.comp.space;
      }, /* comp. space */

      { /* switchboard to enable/disable security */
        ctrl=switchboard;
        switchalign=left;
        switchborder=false;
        switch=
        [ /* switch contents */

          { /* encryption enabled ?*/
            ctrl=pane;
            layout=[xbox];
            content=
            [ /* encryption enabled contents */

              { /* encryption label */
                ctrl=label;
                text=$.enc.encryption.label;
                aligny=0.5;
                id=encryption;
              },

              { /* component space */
                ctrl=rigid;
              }, /* component space */

              { /* enabled/disabled combobox */
                ctrl=choice;
                style=combobox;
                items=$.enc.enable.items;
                labels=$.enc.enable.labels;
                aligny=0.5;
                bounds=[0,0,30,19];
                val=$service.nntp.security.usesecurity.nsvalue;
                label=encryption;
                id=encryptionEnabled;
              } /* pane containing radio btns */

            ]; /* enabled/disabled combobox */
          } /* encryption enabled ?*/

        ]; /* switch contents */

        content=
        [ /* switchboard contents */

          { /* secure port number */
            ctrl=pane;
            layout=[xbox];
            content=
            [ /* secure port contents */

              { /* port label */
                ctrl=label;
                text=$.enc.port.label;
                wrap=$.label.size;
                alignh=left;
                aligny=0.5;
                id=port;
              }, /* port label */

              { /* component space */
                ctrl=rigid;
              }, /* component space */

              { /* port textfield */
                ctrl=number;
                aligny=0.5;
                alignh=left;
                val=$service.nntp.network.port.nsvalue;
                label=port;
              }, /* port textfield */

              {
                ctrl=hglue;
              }

            ] /* secure port contents */
          }, /* secure port number */

          { /* component space */
            ctrl=vstrut;
            size=$g.comp.space;
          }, /* component space */

          { /* def. auth. method */
            ctrl=pane;
            layout=[xbox];
            content=
            [ /* def. auth. method contents */

              { /* label */
                ctrl=label;
                text=$.enc.def.auth.label;
                wrap=$.label.size;
                alignh=left;
                aligny=0.5;
                id=authmethod;
              }, /* label */

              { /* component space */
                ctrl=rigid;
              }, /* component space */

              { /* auth. method combobox */
                ctrl=choice;
                style=combobox;
                items=$.enc.auth.method.items;
                labels=$.enc.auth.method.labels;
                aligny=0.5;
                val=$service.nntp.security.defaultauthmethod.nsvalue;
                label=authmethod;
              }, /* auth. method combobox */

              {
                ctrl=hglue;
              }

            ] /* def. auth. method contents */
          } /* def. auth. method */

        ]; /* switchboard contents */

      } /* switchboard to enable/disable security */

    ] /* system layout contents */
  } /* system layout specs */

]



