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', {
},
{
name
:
'manager'
,
type
:
'int'
},
{
name
:
'backup'
,
type
:
'int'
},
{
name
:
'backup_last'
,
type
:
'date'
}],
validations
:
[{
type
:
'format'
,
...
...
public/app/view/User.js
View file @
001a243
...
...
@@ -73,6 +73,14 @@ Ext.define('MyMA.view.User', {
fieldLabel
:
'Quota'
,
anchor
:
'60%'
,
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', {
},
{
header
:
'uid'
,
dataIndex
:
'uid'
,
hidden
:
true
,
width
:
40
},
{
header
:
'gid'
,
dataIndex
:
'gid'
,
hidden
:
true
,
width
:
40
},
{
header
:
'Mail directory'
,
...
...
@@ -123,6 +125,7 @@ Ext.define('MyMA.view.Users', {
},
{
header
:
'SMTP'
,
dataIndex
:
'smtp'
,
width
:
55
,
editor
:
{
xtype
:
'combo'
,
valueField
:
'id'
,
...
...
@@ -140,6 +143,7 @@ Ext.define('MyMA.view.Users', {
},
{
header
:
'IMAP'
,
dataIndex
:
'imap'
,
width
:
55
,
editor
:
{
xtype
:
'combo'
,
valueField
:
'id'
,
...
...
@@ -162,6 +166,16 @@ Ext.define('MyMA.view.Users', {
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'
,
width
:
30
,
items
:
[{
...
...
public/protected/models/User.php
View file @
001a243
...
...
@@ -52,7 +52,7 @@ class User extends ActiveRecord
public
function
rules
()
{
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
(
'smtp, imap, manager'
,
'numerical'
,
'on'
=>
'update'
,
'allowEmpty'
=>
false
,
'integerOnly'
=>
true
),
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