-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #313 from AntonShevchuk/master
Migrate to TB4.0 form validation
- Loading branch information
Showing
15 changed files
with
284 additions
and
194 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,82 +1,94 @@ | ||
<?php /** @var \Bluz\Layout\Layout $this */ ?> | ||
<nav class="col-sm-3 col-md-2 d-none d-sm-block bg-light sidebar"> | ||
<hr/> | ||
<ul class="nav nav-pills flex-column"> | ||
<li class="nav-item <?= ($this->module('pages') ? 'active' : '') ?>"> | ||
<?= $this->ahref( | ||
'<i class="fa fa-edit fa-fw"></i> ' . __('Pages'), | ||
['pages', 'grid', [], true], | ||
['class' => 'nav-link'] | ||
) ?> | ||
</li> | ||
<li class="nav-item <?= ($this->module('users') ? 'active' : '') ?>"> | ||
<?= $this->ahref( | ||
'<i class="fa fa-user fa-fw"></i> ' . __('Users'), | ||
['users', 'grid', [], true], | ||
['class' => 'nav-link'] | ||
) ?> | ||
</li> | ||
<?php if ($this->hasModule('wallet')) : ?> | ||
<li class="nav-item <?= ($this->module('wallet') ? 'active' : '') ?>"> | ||
<?= $this->ahref( | ||
'<i class="fa fa-credit-card fa-fw"></i> ' . __('Wallets'), | ||
['wallet', 'grid', [], true], | ||
['class' => 'nav-link'] | ||
) ?> | ||
</li> | ||
<?php endif; ?> | ||
<?php if ($this->hasModule('media')) : ?> | ||
<li class="nav-item <?= ($this->module('media') ? 'active' : '') ?>"> | ||
<?= $this->ahref( | ||
'<i class="fa fa-picture-o fa-fw"></i> ' . __('Media'), | ||
['media', 'grid', [], true], | ||
['class' => 'nav-link'] | ||
) ?> | ||
</li> | ||
<?php endif; ?> | ||
<?php if ($this->hasModule('categories')) : ?> | ||
<li class="nav-item <?= ($this->module('categories') ? 'active' : '') ?>"> | ||
<?= $this->ahref( | ||
'<i class="fa fa-folder-o fa-fw"></i> ' . __('Categories'), | ||
['categories', 'tree', [], true], | ||
['class' => 'nav-link'] | ||
) ?> | ||
</li> | ||
<?php endif; ?> | ||
<li class="nav-item <?= ($this->module('acl') ? 'active' : '') ?>"> | ||
<?= $this->ahref( | ||
'<i class="fa fa-lock fa-fw"></i> ' . __('Permissions'), | ||
['acl', 'index', [], true], | ||
['class' => 'nav-link'] | ||
) ?> | ||
</li> | ||
<?php if ($this->hasModule('options')) : ?> | ||
<li class="nav-item <?= ($this->module('options') ? 'active' : '') ?>"> | ||
<?= $this->ahref( | ||
'<i class="fa fa-th-list fa-fw"></i> ' . __('Options'), | ||
['options', 'grid', [], true], | ||
['class' => 'nav-link'] | ||
) ?> | ||
</li> | ||
<?php endif; ?> | ||
<?php if ($this->hasModule('contact-us')) : ?> | ||
<li class="nav-item <?= ($this->module('contact-us') ? 'active' : '') ?>"> | ||
<?= $this->ahref( | ||
'<i class="fa fa-envelope-o fa-fw"></i> ' . __('Contact Us'), | ||
['contact-us', 'grid', [], true], | ||
['class' => 'nav-link'] | ||
) ?> | ||
</li> | ||
<?php endif; ?> | ||
</ul> | ||
<hr/> | ||
<ul class="nav nav-pills flex-column"> | ||
<li class="nav-item <?= ($this->module('system') ? 'active' : '') ?>"> | ||
<?= $this->ahref( | ||
'<i class="fa fa-wrench fa-fw"></i> ' . __('System'), | ||
['system', 'index', [], true], | ||
['class' => 'nav-link'] | ||
) ?> | ||
</li> | ||
</ul> | ||
<hr/> | ||
<ul class="nav nav-pills flex-column"> | ||
<li class="nav-item <?= ($this->module('users') ? 'active' : '') ?>"> | ||
<?= $this->ahref( | ||
'<i class="fa fa-user fa-fw"></i> ' . __('Users'), | ||
['users', 'grid', [], true], | ||
['class' => 'nav-link'] | ||
) ?> | ||
</li> | ||
<?php if ($this->hasModule('wallet')) : ?> | ||
<li class="nav-item <?= ($this->module('wallet') ? 'active' : '') ?>"> | ||
<?= $this->ahref( | ||
'<i class="fa fa-credit-card fa-fw"></i> ' . __('Wallets'), | ||
['wallet', 'grid', [], true], | ||
['class' => 'nav-link'] | ||
) ?> | ||
</li> | ||
<?php endif; ?> | ||
<?php if ($this->hasModule('phones')) : ?> | ||
<li class="nav-item <?= ($this->module('phones') ? 'active' : '') ?>"> | ||
<?= $this->ahref( | ||
'<i class="fa fa-phone fa-fw"></i> ' . __('Phones'), | ||
['phones', 'grid', [], true], | ||
['class' => 'nav-link'] | ||
) ?> | ||
</li> | ||
<?php endif; ?> | ||
</ul> | ||
<hr/> | ||
<ul class="nav nav-pills flex-column"> | ||
<li class="nav-item <?= ($this->module('pages') ? 'active' : '') ?>"> | ||
<?= $this->ahref( | ||
'<i class="fa fa-edit fa-fw"></i> ' . __('Pages'), | ||
['pages', 'grid', [], true], | ||
['class' => 'nav-link'] | ||
) ?> | ||
</li> | ||
<?php if ($this->hasModule('media')) : ?> | ||
<li class="nav-item <?= ($this->module('media') ? 'active' : '') ?>"> | ||
<?= $this->ahref( | ||
'<i class="fa fa-picture-o fa-fw"></i> ' . __('Media'), | ||
['media', 'grid', [], true], | ||
['class' => 'nav-link'] | ||
) ?> | ||
</li> | ||
<?php endif; ?> | ||
<?php if ($this->hasModule('categories')) : ?> | ||
<li class="nav-item <?= ($this->module('categories') ? 'active' : '') ?>"> | ||
<?= $this->ahref( | ||
'<i class="fa fa-folder-o fa-fw"></i> ' . __('Categories'), | ||
['categories', 'tree', [], true], | ||
['class' => 'nav-link'] | ||
) ?> | ||
</li> | ||
<?php endif; ?> | ||
<?php if ($this->hasModule('contact-us')) : ?> | ||
<li class="nav-item <?= ($this->module('contact-us') ? 'active' : '') ?>"> | ||
<?= $this->ahref( | ||
'<i class="fa fa-envelope-o fa-fw"></i> ' . __('Contact Us'), | ||
['contact-us', 'grid', [], true], | ||
['class' => 'nav-link'] | ||
) ?> | ||
</li> | ||
<?php endif; ?> | ||
</ul> | ||
<hr/> | ||
<ul class="nav nav-pills flex-column"> | ||
<li class="nav-item <?= ($this->module('acl') ? 'active' : '') ?>"> | ||
<?= $this->ahref( | ||
'<i class="fa fa-lock fa-fw"></i> ' . __('Permissions'), | ||
['acl', 'index', [], true], | ||
['class' => 'nav-link'] | ||
) ?> | ||
</li> | ||
<?php if ($this->hasModule('options')) : ?> | ||
<li class="nav-item <?= ($this->module('options') ? 'active' : '') ?>"> | ||
<?= $this->ahref( | ||
'<i class="fa fa-th-list fa-fw"></i> ' . __('Options'), | ||
['options', 'grid', [], true], | ||
['class' => 'nav-link'] | ||
) ?> | ||
</li> | ||
<?php endif; ?> | ||
<li class="nav-item <?= ($this->module('system') ? 'active' : '') ?>"> | ||
<?= $this->ahref( | ||
'<i class="fa fa-wrench fa-fw"></i> ' . __('System'), | ||
['system', 'index', [], true], | ||
['class' => 'nav-link'] | ||
) ?> | ||
</li> | ||
</ul> | ||
</nav> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<?php | ||
/** | ||
* View User Profile | ||
* | ||
* @author Anton Shevchuk | ||
* @created 01.09.11 13:15 | ||
*/ | ||
|
||
namespace Application; | ||
|
||
use Application\Users; | ||
use Bluz\Controller\Controller; | ||
use Bluz\Proxy\Request; | ||
|
||
/** | ||
* @ accept JSON | ||
* @method GET | ||
* @privilege Management | ||
*/ | ||
return function () { | ||
/** | ||
* @var Controller $this | ||
*/ | ||
$params = Request::getParams(); | ||
|
||
$params = array_intersect_key($params, Users\Table::getMeta()); | ||
|
||
if (empty($params)) { | ||
return []; | ||
} | ||
return Users\Table::findWhere($params); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.