-
-
Save Fi1osof/d3323ac5a2a82dbacc46 to your computer and use it in GitHub Desktop.
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
{* | |
Редактирование компании | |
*} | |
{extends file="office/users/create.tpl"} | |
{block name=properties} | |
{$params = [ | |
"where" => [ | |
"id" => $smarty.get.id | |
], | |
"limit" => 1 | |
]} | |
{processor action="mgr/users/getdata" ns="modxsite" params=$params assign=result} | |
{* | |
Если был получен user, то выполняем все остальные действия | |
*} | |
{if $result.success && $result.object} | |
{$user = $result.object|current} | |
{$properties = array_merge($user, (array)$request)} | |
{$action = 'update'} | |
{/if} | |
{/block} | |
{* | |
Этот блок внутри блока form | |
*} | |
{block name=EditFields} | |
<div class="editor-label"> | |
Логин: {$user.username} | |
</div> | |
{/block} | |
{block name=form} | |
{if $user} | |
{include file="office/users/form.tpl"} | |
{else} | |
<p style="color:red;">{$result.message|default:"Не был получен пользователь"}</p> | |
{/if} | |
{/block} | |
{block name="result"} | |
<p style="color:green;">{$result.message|default:"Пользователь успешно обновлен"}</p> | |
{/block} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment