<field> <fielddescr>Enable</fielddescr> <fieldname>enable</fieldname> <description>Check this for enable package.</description> <type>checkbox</type> </field>
<field> <fielddescr>Login</fielddescr> <fieldname>pkglogin</fieldname> <description>Enter package login.</description> <type>input</type> <size>30</size> </field>
<field> <fielddescr>Password</fielddescr> <fieldname>pkgpass</fieldname> <description>Enter package password.</description> <type>password</type> <size>30</size> </field>
<field> <fielddescr>Comments</fielddescr> <fieldname>pkgcomments</fieldname> <description> Enter you coments here. </description> <type>textarea</type> <cols>60</cols> <rows>3</rows> <encoding>base64</encoding> </field>
<field> <fielddescr>Age</fielddescr> <fieldname>pkgage</fieldname> <description>Choose your age.</description> <type>select</type> <default_value>adl</default_value> <options> <option><value>chd</value><name>children</name></option> <option><value>tng</value><name>teenager</name></option> <option><value>adl</value><name>adult</name></option> </options> <multiple/> </field>
<field> <fielddescr>Interface</fielddescr> <fieldname>pkginterface</fieldname> <description> Select interface(s) for using in the package. Use 'Ctrl' + L_click for multiple selection. </description> <type>interfaces_selection</type> <default_value>lan</default_value> <multiple/> </field>
<?xml version="1.0" encoding="utf-8" ?> <packagegui> <name>mypkg</name> <title>My First Package</title> <category>Test</category> <version>0.1</version> <include_file>/usr/local/pkg/mypkg.inc</include_file> <tabs> <tab> <text>My Package</text> <url>/pkg_edit.php?xml=mypkg.xml</url> <active/> </tab> </tabs> <fields> <field> <fielddescr>Enable</fielddescr> <fieldname>enable</fieldname> <description>Check this for enable package.</description> <type>checkbox</type> </field> <field> <fielddescr>Interface</fielddescr> <fieldname>pkginterface</fieldname> <description>Select interface(s) for using in the package. Use 'Ctrl' + L_click for multiple selection.</description> <type>interfaces_selection</type> <default_value>lan</default_value> <required/> <multiple/> </field> <field> <fielddescr>Login</fielddescr> <fieldname>pkglogin</fieldname> <description>Enter package login.</description> <type>input</type> <size>30</size> </field> <field> <fielddescr>Password</fielddescr> <fieldname>pkgpass</fieldname> <description>Enter package password.</description> <type>password</type> <size>30</size> </field> <field> <fielddescr>Comments</fielddescr> <fieldname>pkgcomments</fieldname> <description> Enter you coments here. </description> <type>textarea</type> <cols>60</cols> <rows>3</rows> <encoding>base64</encoding> </field> <field> <fielddescr>Age</fielddescr> <fieldname>pkgage</fieldname> <description>Choose your age.</description> <type>select</type> <default_value>adl</default_value> <options> <option><value>chd</value><name>children</name></option> <option><value>tng</value><name>teenager</name></option> <option><value>adl</value><name>adult</name></option> </options> </field> </fields> <custom_php_command_before_form/> <custom_php_validation_command/> <custom_php_resync_config_command/> <custom_php_install_command/> <custom_php_deinstall_command/> </packagegui>
Source: https://habr.com/ru/post/229151/
All Articles