mirror of
https://github.com/friendica/friendica
synced 2025-04-23 19:10:13 +00:00
Channel definition now stays open after edit
This commit is contained in:
parent
62386e4c9e
commit
0a0d2c98e8
2 changed files with 17 additions and 12 deletions
|
@ -101,8 +101,6 @@ class Channels extends BaseSettings
|
|||
$saved = $this->channel->save($channel);
|
||||
$this->logger->debug('Save channel', ['id' => $id, 'saved' => $saved]);
|
||||
}
|
||||
|
||||
$this->baseUrl->redirect('/settings/channels');
|
||||
}
|
||||
|
||||
protected function content(array $request = []): string
|
||||
|
@ -125,11 +123,19 @@ class Channels extends BaseSettings
|
|||
$circles[$circle['id']] = $circle['name'];
|
||||
}
|
||||
|
||||
$id = 0;
|
||||
$channels = [];
|
||||
foreach ($this->channel->selectByUid($uid) as $channel) {
|
||||
if (!empty($request['id'])) {
|
||||
$open = $channel->code == $request['id'];
|
||||
} elseif (!empty($request['new_label'])) {
|
||||
$open = $channel->label == $request['new_label'];
|
||||
} else {
|
||||
$open = false;
|
||||
}
|
||||
|
||||
$channels[] = [
|
||||
'id' => ++$id,
|
||||
'id' => $channel->code,
|
||||
'open' => $open,
|
||||
'label' => ["label[$channel->code]", $this->t('Label'), $channel->label, '', $this->t('Required')],
|
||||
'description' => ["description[$channel->code]", $this->t("Description"), $channel->description],
|
||||
'access_key' => ["access_key[$channel->code]", $this->t("Access Key"), $channel->accessKey],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue