XML Interface description

From ISPWiki

(Redirected from Interface XML description)
Jump to: navigation, search

Contents

Introduction

Description of all the forms, tables, menus and messages are located in XML-files in the /usr/local/ispmgr/etc directory. All the files should be encoded in the UTF-8 characters set. An XML document is also a result of any operation that the control panel executes.

We recommend that you not modify XML documents, which are an integral part of the control panel. You may add your own forms and tables, add or remove the existing forms using Plug-ins and Events.

This document describes XML files that are used by the control panel.

The following attributes can be used with almost any element that describes interface items.

<xs:attributeGroup name="isp:default">
  <xs:attribute name="if" type="xs:string"/>
  <xs:attribute name="level" type="xs:string"/>
</xs:attributeGroup>
the if attribute
defines a feature, when this element is available. You can use thefeaturelist control panel function to get a list of available values for this attribute.
the level attribute
the level of access a user must have to view this tag. You can specify several tags space separated.

XML root element (mgrdata)

 <xs:element name="mgrdata">
   <xs:complexType>
     <xs:sequence>
       <xs:element minOccurs="1" maxOccurs="1" ref="mainmenu"/>
       <xs:choice maxOccurs="unbounded">
         <xs:element ref="handler"/>
         <xs:element ref="metadata"/>
       </xs:choice>
     </xs:sequence>
   </xs:complexType>
 </xs:element>

The following elements are used to describe the control panel interface:

the mainmenu element
content of the main menu. Only one element is allowed
the metadata element
description of interface lists and other functional elements.
the handler element
description of external events handler.

Main menu

Menu description example

<mainmenu level="7">
      <node name="tool">
        <node name="myconf"/>
      </node>
</mainmenu>

Main menu (the mainmenu element)

 <xs:element name="mainmenu">
   <xs:complexType>
     <xs:sequence>
       <xs:element maxOccurs="unbounded" ref="node"/>
     </xs:sequence>
     <xs:attribute name="level" use="required" type="xs:integer"/>
     <xs:attribute name="name" use="required" type="xs:NCName"/>
     <xs:attribute name="startpage" use="required" type="xs:NCName"/>
   </xs:complexType>
 </xs:element>

The main menu is divided into sub-sections:

the level attribute
the level of access this menu describes.
the name attribute
a random menu name, which in practice is not used.
the startpage attribute
the name of the page that opens by default (when calling the control panel without set func parameter value or in case of func=desktop). You need to specify the name of the existing function. For example startpage="user".
the node element
describes menu elements and its sub-sections.

Menu element (the node element)

 <xs:element name="node">
   <xs:complexType>
     <xs:sequence>
       <xs:element minOccurs="0" ref="node"/>
       <xs:element minOccurs="0" ref="isform"/>
     </xs:sequence>
     <xs:attribute name="name" use="required" type="xs:NCName"/>
   </xs:complexType>
 </xs:element>

The node element describes a menu element (no child nodes) or its section (child nodes describe the elements).

the name attribute
the name of the function to be called. It is used for language binding as well.
the isform attribute
if the value is "yes", the function that displays a from rather than a list will be called.

External handlers

Script-handler description example

<handler name="myconf.pl" type="cgi">
       <func>myconf</func>
       <func>myconf.edit</func>
       <func>myconf.delete</func>
</handler>

Handler (the handler element)

 <xs:element name="handler">
   <xs:complexType>
     <xs:choice minOccurs="1" maxOccurs="unbounded">
       <xs:element minOccurs="0" maxOccurs="unbounded" ref="func"/>
       <xs:element minOccurs="0" maxOccurs="unbounded" ref="event"/>
     </xs:choice>
     <xs:attribute name="name" use="required" type="xs:NCName"/>
     <xs:attribute name="type" use="required" type="xs:NCName"/>
     <xs:attribute name="minlevel" type="xs:NCName"/>
   </xs:complexType>
 </xs:element>

Each external handler is described by a separate handler.

the name attribute
the name of the file to be run from the /usr/local/ispmgr/addon directory.
the type attribute
the type of an external handler. It can have any of the following values: xml, cgi.
the minlevel attribute
the minimal level of access a user must have to use handler functions.
the func element
the name of the function processed by the handler.
the event element
allows to perform user actions when addressing to the function that already exists.

The func element

 <xs:element name="func">
   <xs:complexType>
     <xs:attribute name="minlevel" type="xs:NCName"/>
   </xs:complexType>
 </xs:element>
the minlevel attribute
the minimal access level a user must have to use a function.

The func element contains a name of a function.

The event element

 <xs:element name="event">
   <xs:complexType>
     <xs:attribute name="before" type="xs:NCName"/>
     <xs:attribute name="after" type="xs:NCName"/>
     <xs:attribute name="final" type="xs:NCName"/>
     <xs:attribute name="priority" type="xs:NCName"/>  
   </xs:complexType>
 </xs:element>
the before attribute
if specified, the event will be executed prior to the main function.
the after attribute
if specified, the event will be executed after the main function.
the final attribute
if specified, the event will be executed after the main function, the control panel will not wait for the handler to finish. You may address the control panel via API.
the priority attribute
a handler's priority. The possible values is hi. we do not guarantee that all handlers with high priority will be called first.

The element should contain the name of an existent function, for which you need to specify an additional action. For example:

 <handler name="myscript.php">
   <event after="yes">user.edit</event>
 </handler>

Interface description (the metadata element)

 <xs:element name="metadata">
   <xs:complexType>
     <xs:sequence>
       <xs:element minOccurs="0" ref="text"/>
       <xs:element minOccurs="0" maxOccurs="unbounded" ref="form"/>
       <xs:choice minOccurs="0">
         <xs:element ref="band"/>
         <xs:element ref="script"/>
       </xs:choice>
       <xs:element minOccurs="0" ref="toolbar"/>
       <xs:element minOccurs="0" ref="diagram"/>
       <xs:element minOccurs="0" ref="coldata"/>
       <xs:choice minOccurs="0" maxOccurs="unbounded">
         <xs:element ref="jscript"/>
         <xs:element ref="externalscript"/>
       </xs:choice>
     </xs:sequence>
     <xs:attribute name="autoupdate" type="xs:integer"/>
     <xs:attribute name="if" type="xs:NCName"/>
     <xs:attribute name="key" type="xs:NCName"/>
     <xs:attribute name="name" use="required" type="xs:NCName"/>
     <xs:attribute name="selficon" type="xs:NCName"/>
     <xs:attribute name="help" type="xs:NCName"/>
     <xs:attribute name="top" type="xs:NCName"/>
     <xs:attribute name="type" use="required" type="xs:NCName"/>
   </xs:complexType>
 </xs:element>

Each metadata describes one interface element:

the type attribute
the type of an interface element. It can have the form (describes an input form)) and the list (describes a data list) value.
the name attribute
specifies a name of the function this element describes.
the top attribute
if "yes", the form is a top-level element (such as login forms)
the autoupdate attribute
specifies interval in seconds to automatically refresh a page.
the if attribute
See the Introduction.
the key attribute
the key field (used for lists).
the help attribute
the help link is taken from the help parameter.
the selficon attribute
this list has its own logo. The parameter's value is the name of a picture.
the form element
can exist only if type="form". Describes form fields.
the coldata element
exists only if type="list". Describes data table fields.
the toolbar element
exists only if type="list". Describes the table toolbar.
the diagram element
exists only if type="list". Allows to create diagrams on the basis of table data.
the text element
the band element
the jscript element
allows to add an additional JavaScript code to the element.
the externalscript element
allows the browser to download the JavaScript code from external files.

List description

Table description example

    <metadata name="myconf" type="list" key="item">
      <toolbar>
        <toolbtn func="myconf.edit" type="new"  img="t-new" name="new"/>
        <toolbtn func="myconf.edit" type="edit" img="t-edit" name="edit" default="yes"/>
        <toolbtn func="myconf.delete" type="group" img="t-delete" name="delete"/>
      </toolbar>
      <coldata>
        <col sort="alpha" sorted="yes" name="item" type="data"/>
      </coldata>
    </metadata>

Toolbar (the toolbar element)

 <xs:element name="toolbar">
   <xs:complexType>
     <xs:choice minOccurs="0" maxOccurs="unbounded">
       <xs:element ref="toolbtn"/>
       <xs:element ref="toolsep"/>
     </xs:choice>
   </xs:complexType>
 </xs:element>

The toolbar can contain buttons and separators. They are described by the toolbtn and toolsep child elements correspondingly.

Toolbar button (the toolbtn element)
 <xs:element name="toolbtn">
   <xs:complexType>
     <xs:attribute name="default" type="xs:NCName"/>
     <xs:attribute name="func" use="required"/>
     <xs:attribute name="if" type="xs:NCName"/>
     <xs:attribute name="img" use="required" type="xs:NCName"/>
     <xs:attribute name="level"/>
     <xs:attribute name="name" use="required" type="xs:NCName"/>
     <xs:attribute name="noapi" type="xs:NCName"/>
     <xs:attribute name="type" use="required" type="xs:NCName"/>
   </xs:complexType>
 </xs:element>
the func attribute
the name of the function that will be called when clicking the button.
the img attribute
the name of the picture that will be displayed on the button. You do not need to specify its extension.
the default attribute
"yes" is a default action (for example, when double-clicking a table row).
the if attribute
see the Introduction
the level attribute
see the Introduction
the name attribute
the name of the button, which should have a unique value within one metadata. Used for languages bounding.
the noapi attribute
this button is not available via API.
the type attribute
the type of an action the button provides. See the information below.

The attribute type can have the following values:

new
new element form.
back
back to the previous list.
edit
edit form.
editlist
call the list, for which the selected element on the current list will be a parent element (plid).
func
call the JavaScript function that is specified in the func attribute.
group
perform a group action over the selected elements.
groupform
call the group edit form.
groupformnosel
similar to groupform, but allows to call a function without table elements.
Toolbar separator (the toolsep element)
 <xs:element name="toolsep">
   <xs:complexType>
     <xs:attribute name="level" type="xs:integer"/>
   </xs:complexType>
 </xs:element>
the level attribute
see the Introduction.

Table columns description (the coldata element)

 <xs:element name="coldata">
   <xs:complexType>
     <xs:sequence>
       <xs:element maxOccurs="unbounded" ref="col"/>
     </xs:sequence>
   </xs:complexType>
 </xs:element>

Contains the list of columns (the "col" elements).

Сolumn description (the col element)

 <xs:element name="col">
   <xs:complexType>
     <xs:sequence>
       <xs:element minOccurs="0" maxOccurs="unbounded" ref="prop"/>
     </xs:sequence>
     <xs:attribute name="align" type="xs:NCName"/>
     <xs:attribute name="if" type="xs:NCName"/>
     <xs:attribute name="level"/>
     <xs:attribute name="name" use="required" type="xs:NCName"/>
     <xs:attribute name="sort" type="xs:NCName"/>
     <xs:attribute name="sorted" type="xs:NCName"/>
     <xs:attribute name="stat" type="xs:NCName"/>
     <xs:attribute name="total" type="xs:NCName"/>
     <xs:attribute name="type" type="xs:NCName"/>
     <xs:attribute name="width" type="xs:NMTOKEN"/>
     <xs:attribute name="wrap" type="xs:NCName"/>
     <xs:attribute name="noescaping"/>
     <xs:attribute name="noescaping"/>
   </xs:complexType>
 </xs:element>
the name attribute
the name of a сolumn. Should have a unique value within metadata. Used for languages binding.
the type attribute
the type of the data in the column: data (data from the control panel is set by default), indicator (indicator; used amount/limit), msg (displays the message corresponding to the value transferred from the control panel).
the sort attribute
specifies the type of the data sorting: alpha (alphabetic assortment is set by default), digit (numerical sorting in ascending order), file (alphabetic assortment, directories followed by files), indicator (sorting by the "used value" indicator; only for columns with indicators), ip (IP-address sorting), prop (sorting by properties; only for columns that display property icons).
the sorted attribute
If sorted="yes", the table will be sorted by this column as default.
the stat attribute
displays the total number of lines with such a field at the bottom of the table.
the wrap attribute
if specified, line breaks in data will not be ignored. Data in the column is displayed in multiple lines.
the align attribute
alignment of column data: left, right, center.
the width attribute
the default width of a column.
the if attribute
see the Introduction.
the level attribute
see the Introduction.
the prop element
describes a property. Only for sort="prop".
the noescaping attribute
disable html escaping.
Property description (the prop element)
 <xs:element name="prop">
   <xs:complexType>
     <xs:attribute name="animated" type="xs:NCName"/>
     <xs:attribute name="defimg" type="xs:NCName"/>
     <xs:attribute name="if" type="xs:NCName"/>
     <xs:attribute name="name" use="required" type="xs:NCName"/>
     <xs:attribute name="onimg" use="required" type="xs:NCName"/>
     <xs:attribute name="stat" type="xs:NCName"/>
   </xs:complexType>
 </xs:element>

A special column with properties, which can have several tabs. Each parameter is described by a prop child element with the following attributes:

the animated attribute
an onimg picture is an animated gif file.
the defimg attribute
a picture that will be displayed if the property is not present.
the name attribute
the name of property. Used for languages binding.
the onimg attribute
the picture that will be displayed, if the table line contains this property.
the stat attribute
displays the total number of lines with this property at the bottom of the table.
the if attribute
see the Introduction.

Diagram description (the diagrame lement)

 <xs:element name="diagram">
   <xs:complexType>
     <xs:sequence>
       <xs:element minOccurs="0" maxOccurs="unbounded" ref="line"/>
     </xs:sequence>
     <xs:attribute name="data" type="xs:NCName"/>
     <xs:attribute name="label" use="required" type="xs:NCName"/>
     <xs:attribute name="type" use="required" type="xs:NCName"/>
   </xs:complexType>
 </xs:element>

Using the diagram element will allow to display data.

the type attribute
the diagram type: line, histogram, pie.
the data attribute
the column, in which the data for a pie graph are located (only for type="pie").
the label attribute
the column, in which the value captions are located.
the line element
one or several elements describe the data that should be represented on the diagram.
Diagram data description (the line element)
 <xs:element name="line">
   <xs:complexType>
     <xs:attribute name="data" use="required" type="xs:NCName"/>
   </xs:complexType>
 </xs:element>
data
contains the name of a column, from which values for a diagram are taken.

Form description

Form description example

    <metadata name="myconf.edit" type="form">
      <form>
        <field name="item">
          <input type="text" name="item"/>
        </field>
        <field name="itemtype">
          <select name="itemtype"/>
        </field>
      </form>
    </metadata>

Form

 <xs:element name="form">
   <xs:complexType>
     <xs:choice>
       <xs:choice minOccurs="0" maxOccurs="unbounded">
         <xs:element ref="field"/>
         <xs:element ref="page"/>
       </xs:choice>
     </xs:choice>
     <xs:attribute name="autocomplete" type="xs:NCName"/>
     <xs:attribute name="cancelrefresh" type="xs:NCName"/>
     <xs:attribute name="enctype"/>
     <xs:attribute name="event" type="xs:NCName"/>
     <xs:attribute name="backevent" type="xs:NCName"/>
     <xs:attribute name="extokmsg" type="xs:NCName"/>
     <xs:attribute name="height" type="xs:integer"/>
     <xs:attribute name="id" type="xs:NCName"/>
     <xs:attribute name="maxwidth" type="xs:NCName"/>
     <xs:attribute name="nocancel" type="xs:NCName"/>
     <xs:attribute name="wizard" type="xs:NCName"/>
     <xs:attribute name="onsubmit" type="xc:NCName"/>
     <xs:attribute name="helpurl" type="xc:NCName"/>
     <xs:attribute name="clear"/>
   </xs:complexType>
 </xs:element>

To describe a form, create a form child element in metadata.

the autocomplete attribute
"off" disables auto-complete.
the cancelrefresh attribute
if specified, clicking Cancel will refresh the list as well.
the enctype attribute
encodes the form data to be sent. For example, "multipart/form-data".
the event attribute
if specified, clicking Ok will call the JavaScript frm_event() function.
the backevent attribute
if specified, clicking Back will call the JavaScript frm_backevent() function. If false will return, the form won't be submitted, if true, the form will be submitted.
the extokmsg attribute
if specified, the OK button message is taken from msg_extokmsg.
the height attribute
hight of a form.
the maxwidth attribute
if specified, the maximum form width will be applied.
the nocancel attribute
if specified, the Cancel button will be hidden.
the nosubmit attribute
if specified, the OK button will be hidden.
the wizard attribute
if specified, a wizard will be displayed. The "first" value will display the first page, "middle" will display a middle one, "last", the last one.
the helpurl attribute
if specified, clicking the Help button will open a page provided in this attribute. The __LANG__ macros in the URL will be changed into a user's interface language.
the clear
manages the "Clear the form" button. If specified (regardless its value), the form fields will be reset. If not .reset() will be applied.
the field element
describes a form's field.
the page element
allows to create forms with many tabs.

Tabs (the page element)

 <xs:element name="page">
   <xs:complexType>
     <xs:sequence>
       <xs:element maxOccurs="unbounded" ref="field"/>
     </xs:sequence>
     <xs:attribute name="name" use="required" type="xs:NCName"/>
   </xs:complexType>
 </xs:element>
the name attribute
tab name. Used for languages binding.
the field element
describes fields in this tab.

Form fields description (the field element)

 <xs:element name="field">
   <xs:complexType>
     <xs:sequence>
       <xs:element minOccurs="0" ref="htmldata"/>
       <xs:element minOccurs="0" ref="textarea"/>
       <xs:choice minOccurs="0" maxOccurs="unbounded">
         <xs:element ref="input"/>
         <xs:element ref="select"/>
         <xs:element ref="desc"/>
         <xs:element ref="textdata"/>
       </xs:choice>
       <xs:element minOccurs="0" ref="link"/>
     </xs:sequence>
     <xs:attribute name="fullwidth" type="xs:NCName"/>
     <xs:attribute name="id" type="xs:NCName"/>
     <xs:attribute name="if" type="xs:NMTOKEN"/>
     <xs:attribute name="level"/>
     <xs:attribute name="name" type="xs:NCName"/>
     <xs:attribute name="zoom" type="xs:integer"/>
   </xs:complexType>
 </xs:element>
the name attribute
the field name.
the fullwidth attribute
expands a filed to full width. Only for textarea fields.
the zoom attribute
adds a function to extend a field by the specified the number of lines. For example: zoom="5".
the if attribute
see the Introduction.
the level attribute
see the Introduction.
the input element
сorresponds to input from HTML.
the select element
сreates a drop-down list.
the textdata element
a pseudo-filed that displays text information without modifying.
the textarea element
a multiline text filed.
the desc element
a pseudo-filed that enables to create captions for check box.

The input element

 <xs:element name="input">
   <xs:complexType>
     <xs:attribute name="checkpasswd" type="xs:NCName"/>
     <xs:attribute name="date" type="xs:NCName"/>
     <xs:attribute name="default" type="xs:NCName"/>
     <xs:attribute name="empty" type="xs:NCName"/>
     <xs:attribute name="event" type="xs:NCName"/>
     <xs:attribute name="filter"/>
     <xs:attribute name="hide"/>
     <xs:attribute name="id" type="xs:NCName"/>
     <xs:attribute name="level" type="xs:integer"/>
     <xs:attribute name="maxlength" type="xs:integer"/>
     <xs:attribute name="name" use="required" type="xs:NCName"/>
     <xs:attribute name="readonly" type="xs:NCName"/>
     <xs:attribute name="show"/>
     <xs:attribute name="type" use="required" type="xs:NCName"/>
     <xs:attribute name="unlimit" type="xs:integer"/>
     <xs:attribute name="value"/>
     <xs:attribute name="width"/>
   </xs:complexType>
 </xs:element>
the name attribute
the field name.
the type attribute
the field type: text, check box, password.
the checkpasswd attribute
contains a name of the field that can be compared with the current value. If they do not match, a corresponding message will be returned.
the date attribute
if specified, a field will have a button to call the calendar. Only for type="text".
the default attribute
default value. Only for type="text".
the empty attribute
if "no", the form data will be checked (whether it is blank or not) before sending. Only for type="text".
the event attribute
if specified, modifying the value will call the FILEDNAME_event()JavaScript function, where FIELDNAME is the attribute name value.
the hide attribute
listed fields will be hidden with the checkbox enabled. For example: hide="'os','hostname','disk'".
the maxlength attribute
the maximum length of a field.
the readonly attribute
if specified, a field will be read-only.
the show attribute
listed fileds will be displayed with the checkbox enabled. For example: show="'os','hostname','disk'".
the unlimit attribute
adds a button that can be used for setting the infinite value. You can specify the infinite value as a value for this attribute.
the value attribute
the default field value.
the width attribute
athe idth of a field.
the level attribute
see the Introduction.

Multiline edit control (the textarea element)

 <xs:element name="textarea">
   <xs:complexType>
     <xs:attribute name="height" type="xs:integer"/>
     <xs:attribute name="id" type="xs:NCName"/>
     <xs:attribute name="name" use="required" type="xs:NCName"/>
     <xs:attribute name="readonly" type="xs:NCName"/>
     <xs:attribute name="rows" type="xs:integer"/>
     <xs:attribute name="wrap" type="xs:NCName"/>
   </xs:complexType>
 </xs:element>
the name attribute
field name.
the height attribute
height of a filed.
the readonly attribute
if specified, a field will be read-only.
the rows attribute
number of lines in a field.
the wrap attribute
If "off", lines won't brake.

Drop-down list (the select element)

 <xs:element name="select">
   <xs:complexType>
     <xs:sequence>
       <xs:element minOccurs="0" maxOccurs="unbounded" ref="if"/>
       <xs:element minOccurs="0" ref="else"/>
     </xs:sequence>
     <xs:attribute name="depend" type="xs:NCName"/>
     <xs:attribute name="type" type="xs:NCName"/>
     <xs:attribute name="dependact" type="xs:NCName"/>
     <xs:attribute name="dependindex" type="xs:integer"/>
     <xs:attribute name="event" type="xs:NCName"/>
     <xs:attribute name="filter"/>
     <xs:attribute name="id" type="xs:NCName"/>
     <xs:attribute name="level" type="xs:integer"/>
     <xs:attribute name="name" use="required" type="xs:NCName"/>
     <xs:attribute name="readonly" type="xs:NCName"/>
     <xs:attribute name="sorted" type="xs:NCName"/>
     <xs:attribute name="urlopen" type="xs:integer"/>
     <xs:attribute name="values"/>
   </xs:complexType>
 </xs:element>
the name attribute
the field name.
the depend attribute
this list will depend on the current value of the other list, which name is transferred as a value to this attribute.
the type attribute
selection type that is used to add radiobutton into the form, the value is type="radio".
the dependindex attribute
an array index in the parent list that should be used for comparing values of this list when selecting.
the event attribute
if specified, modifying the value will call the JavaScript FIELDNAME_event() function, where FIELDNAME is a value of the name attribute.
the readonly attribute
if specified, a field will be read-only.
the sorted attribute
sort by values description: asc (in ascending order), desc (in descending order).
the urlopen attribute
if specified, the element will contain a button for opening a URL in a new window. The URL is taken from the select array. The index in array is used as an attribute value.
the values attribute
allows to set the list of possible values directly from XML that describes the interface. Value descriptions will be taken from corresponding languages. For example: values="404 505 200".
the level attribute
see the Introduction.
The if and else child elements
 <xs:element name="if">
   <xs:complexType>
     <xs:attribute name="hide"/>
     <xs:attribute name="show"/>
     <xs:attribute name="value"/>
   </xs:complexType>
 </xs:element>
 
 <xs:element name="else">
   <xs:complexType>
     <xs:attribute name="hide"/>
     <xs:attribute name="show"/>
   </xs:complexType>
 </xs:element>

The select element can contain the if and else child elements that are used to specify what a form is used for depending on the value from the list.

the value attribute
specifies a value. If this value matches that selected from the list, a certain action will be performed.
the show attribute
specifies a list of fields to be displayed if the condition is met.
the hide attribute
specifies a list of fields to be hidden if the condition is met.

The Radiobutton element (the Select[type="radio"] element)

Its properties are similar to those of a select drop-down list.

The htmldata element

 <xs:element name="htmldata">
   <xs:complexType>
     <xs:attribute name="chheight" type="xs:NCName"/>
     <xs:attribute name="height" use="required" type="xs:integer"/>
     <xs:attribute name="name" use="required" type="xs:NCName"/>
     <xs:attribute name="scrolldown" type="xs:NCName"/>
   </xs:complexType>
 </xs:element>

Allows to display HTML-data. HTML will not be modified when transferring to the browser.

the name attribute
the field name
the chheight attribute
allows to change the htmldata height using other input field (which should be placed below), which id is transferred as an attribute.
the height attribute
the height of a field.

checkbox description (the desc element)

 <xs:element name="desc">
   <xs:complexType>
     <xs:attribute name="lmargin" type="xs:integer"/>
     <xs:attribute name="name" use="required" type="xs:NCName"/>
   </xs:complexType>
 </xs:element>

desc allows to display one-line information without modification. A caption will be bound to a same-name checkbox.

the name attribute
the field name.
the lmargin attribute
allows to specify the left indent.

Text information output (the textdata element)

 <xs:element name="textdata">
   <xs:complexType>
     <xs:attribute name="name" use="required" type="xs:NCName"/>
     <xs:attribute name="type" use="required" type="xs:NCName"/>
     <xs:attribute name="warning" type="xs:NCName"/>
   </xs:complexType>
 </xs:element>
the name attribute
the field name.
the type attribute
an obligatory field that can have either the msg (the content of a pseudo-field will be taken from corresponding languages), data (content will be taken from the control panel) value or msgdata (the content of a pseudo-field will be taken from corresponding languages, its name will be taken from the control panel).

The nocancel

In order to remove the Сancel button, you need to add the nocancel="yes" parameter into the <form> tag.

Language description and translation

Text description example

  <lang name="en">
    <messages name="file.edit">
      <msg name="encoding">Encoding</msg>
      <msg name="hint_default">You can edit contents of your files here</msg>
      <msg name="hint_encoding">Select the file encoding</msg>
      <msg name="title">Edit file</msg>
      <msg name="title_new">Create file</msg>
    </messages>
  </lang>

Locale (language) description

 <xs:element name="lang">
   <xs:complexType>
     <xs:attribute name="name" use="required" type="xs:NCName"/>
     <xs:sequence>
       <xs:element minOccurs="1" maxOccurs="unbounded" ref="messages"/>
     </xs:sequence>
   </xs:complexType>
 </xs:element>
the name attribute
obligatory attribute that contains a code of a described language. For example, en, fr, es.
the name messages
describes a message for a specific function.

Function messages description (the messages element)

 <xs:element name="messages">
   <xs:complexType>
     <xs:attribute name="name" use="required" type="xs:NCName"/>
     <xs:sequence>
       <xs:element minOccurs="1" maxOccurs="unbounded" ref="msg"/>
     </xs:sequence>
   </xs:complexType>
 </xs:element>
the name attribute
obligatory attribute that contains the name of a described function.
the msg element
contains a message.

Message description (the msg element)

 <xs:element name="msg">
   <xs:complexType>
     <xs:attribute name="name" use="required" type="xs:NCName"/>
   </xs:complexType>
 </xs:element>
the name attribute
obligatory attribute that contains an internal message name.

The element does not have child nodes. It contains the text of a message.

More information can be found in the article Plug-ins.

Was this helpful? Yes | No
Views
Personal tools