Admin: Added possibility to change page URL

This commit is contained in:
Ilya Prokopenko 2021-12-31 11:11:29 +07:00
parent dc40b992fe
commit c2588d18dc
No known key found for this signature in database
GPG key ID: 7736BBBB05F14A56
2 changed files with 8 additions and 0 deletions

View file

@ -72,6 +72,8 @@ final class AdminPresenter extends OpenVKPresenter
$user->setStatus($this->postParam("status")); $user->setStatus($this->postParam("status"));
$user->setVerified(empty($this->postParam("verify") ? 0 : 1)); $user->setVerified(empty($this->postParam("verify") ? 0 : 1));
if($user->onlineStatus() != $this->postParam("online")) $user->setOnline(intval($this->postParam("online"))); if($user->onlineStatus() != $this->postParam("online")) $user->setOnline(intval($this->postParam("online")));
if(!$user->setShortCode(empty($this->postParam("shortcode")) ? NULL : $this->postParam("shortcode")))
$this->flash("err", tr("error"), tr("error_shorturl_incorrect"));
$user->save(); $user->save();
break; break;

View file

@ -63,6 +63,12 @@
</label> </label>
<input class="text medium-field" type="email" id="email" name="email" value="{$user->getEmail()}" /> <input class="text medium-field" type="email" id="email" name="email" value="{$user->getEmail()}" />
</div> </div>
<div class="field-group">
<label for="shortcode">
Адрес страницы
</label>
<input class="text medium-field" type="text" id="shortcode" name="shortcode" value="{$user->getShortCode()}" />
</div>
<hr> <hr>
<div class="field-group"> <div class="field-group">
<label for="city"> <label for="city">