Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Павел Резуненко
/
MTAweb
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
1
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 001a2435
authored
Jul 08, 2013
by
Павел Резуненко
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Добавлена поддержка полей для системы backup
1 parent
f8df6b05
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
29 additions
and
1 deletions
public/app/model/Users.js
public/app/view/User.js
public/app/view/Users.js
public/protected/models/User.php
public/app/model/Users.js
View file @
001a243
...
@@ -36,6 +36,12 @@ Ext.define('MyMA.model.Users', {
...
@@ -36,6 +36,12 @@ Ext.define('MyMA.model.Users', {
},
{
},
{
name
:
'manager'
,
name
:
'manager'
,
type
:
'int'
type
:
'int'
},
{
name
:
'backup'
,
type
:
'int'
},
{
name
:
'backup_last'
,
type
:
'date'
}],
}],
validations
:
[{
validations
:
[{
type
:
'format'
,
type
:
'format'
,
...
...
public/app/view/User.js
View file @
001a243
...
@@ -73,6 +73,14 @@ Ext.define('MyMA.view.User', {
...
@@ -73,6 +73,14 @@ Ext.define('MyMA.view.User', {
fieldLabel
:
'Quota'
,
fieldLabel
:
'Quota'
,
anchor
:
'60%'
,
anchor
:
'60%'
,
value
:
100000000
value
:
100000000
},
{
xtype
:
'numberfield'
,
name
:
'backup'
,
allowDecimal
:
false
,
fieldLabel
:
'Backup (day)'
,
anchor
:
'60%'
,
maxValue
:
7
,
minValue
:
0
}]
}]
}]
}]
});
});
public/app/view/Users.js
View file @
001a243
...
@@ -112,10 +112,12 @@ Ext.define('MyMA.view.Users', {
...
@@ -112,10 +112,12 @@ Ext.define('MyMA.view.Users', {
},
{
},
{
header
:
'uid'
,
header
:
'uid'
,
dataIndex
:
'uid'
,
dataIndex
:
'uid'
,
hidden
:
true
,
width
:
40
width
:
40
},
{
},
{
header
:
'gid'
,
header
:
'gid'
,
dataIndex
:
'gid'
,
dataIndex
:
'gid'
,
hidden
:
true
,
width
:
40
width
:
40
},
{
},
{
header
:
'Mail directory'
,
header
:
'Mail directory'
,
...
@@ -123,6 +125,7 @@ Ext.define('MyMA.view.Users', {
...
@@ -123,6 +125,7 @@ Ext.define('MyMA.view.Users', {
},
{
},
{
header
:
'SMTP'
,
header
:
'SMTP'
,
dataIndex
:
'smtp'
,
dataIndex
:
'smtp'
,
width
:
55
,
editor
:
{
editor
:
{
xtype
:
'combo'
,
xtype
:
'combo'
,
valueField
:
'id'
,
valueField
:
'id'
,
...
@@ -140,6 +143,7 @@ Ext.define('MyMA.view.Users', {
...
@@ -140,6 +143,7 @@ Ext.define('MyMA.view.Users', {
},
{
},
{
header
:
'IMAP'
,
header
:
'IMAP'
,
dataIndex
:
'imap'
,
dataIndex
:
'imap'
,
width
:
55
,
editor
:
{
editor
:
{
xtype
:
'combo'
,
xtype
:
'combo'
,
valueField
:
'id'
,
valueField
:
'id'
,
...
@@ -162,6 +166,16 @@ Ext.define('MyMA.view.Users', {
...
@@ -162,6 +166,16 @@ Ext.define('MyMA.view.Users', {
allowDecimal
:
false
allowDecimal
:
false
}
}
},
{
},
{
header
:
'Backup (days)'
,
dataIndex
:
'backup'
,
renderer
:
function
(
value
)
{
return
value
==
0
?
'Off'
:
value
;
}
},
{
header
:
'Last Backup'
,
dataIndex
:
'backup_last'
,
renderer
:
Ext
.
util
.
Format
.
dateRenderer
(
'd.m.Y H:i'
)
},
{
xtype
:
'actioncolumn'
,
xtype
:
'actioncolumn'
,
width
:
30
,
width
:
30
,
items
:
[{
items
:
[{
...
...
public/protected/models/User.php
View file @
001a243
...
@@ -52,7 +52,7 @@ class User extends ActiveRecord
...
@@ -52,7 +52,7 @@ class User extends ActiveRecord
public
function
rules
()
public
function
rules
()
{
{
return
array
(
return
array
(
array
(
'name, login, passwd, uid, gid, maildir, smtp, imap, quota, manager'
,
'default'
,
'on'
=>
'update'
),
array
(
'name, login, passwd, uid, gid, maildir, smtp, imap, quota, manager
, backup
'
,
'default'
,
'on'
=>
'update'
),
array
(
'login, passwd, maildir'
,
'required'
,
'on'
=>
'update'
),
array
(
'login, passwd, maildir'
,
'required'
,
'on'
=>
'update'
),
array
(
'smtp, imap, manager'
,
'numerical'
,
'on'
=>
'update'
,
'allowEmpty'
=>
false
,
'integerOnly'
=>
true
),
array
(
'smtp, imap, manager'
,
'numerical'
,
'on'
=>
'update'
,
'allowEmpty'
=>
false
,
'integerOnly'
=>
true
),
array
(
'login'
,
'email'
,
'on'
=>
'update'
),
array
(
'login'
,
'email'
,
'on'
=>
'update'
),
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment