-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathmodels_mail_shortcode.go
More file actions
executable file
·39 lines (36 loc) · 1015 Bytes
/
models_mail_shortcode.go
File metadata and controls
executable file
·39 lines (36 loc) · 1015 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
package mail
import (
"github.com/hexya-erp/hexya/src/models"
"github.com/hexya-erp/hexya/src/models/types"
"github.com/hexya-erp/pool/h"
)
func init() {
h.MailShortcode().DeclareModel()
h.MailShortcode().AddFields(map[string]models.FieldDefinition{
"Source": models.CharField{
String: "Shortcut",
Required: true,
Index: true,
Help: "The shortcut which must be replaced in the Chat Messages",
},
"Substitution": models.TextField{
String: "Substitution",
Required: true,
Index: true,
Help: "The escaped html code replacing the shortcut",
},
"Description": models.CharField{
String: "Description",
},
"ShortcodeType": models.SelectionField{
Selection: types.Selection{
"image": "Smiley",
"text": "Canned Response",
},
Required: true,
Default: models.DefaultValue("text"),
Help: "* Smiley are only used for HTML code to display an image" +
"* Text (default value) is used to substitute text with another text",
},
})
}