mirror of
https://github.com/snipe/snipe-it.git
synced 2025-02-21 03:15:45 -08:00
Normalize the flash session to the way we do it elsewhere
Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
parent
d55ae44638
commit
b28a25f544
|
@ -126,7 +126,7 @@ class SlackSettingsForm extends Component
|
||||||
}
|
}
|
||||||
|
|
||||||
//}
|
//}
|
||||||
return session()->flash('message' , trans('admin/settings/message.webhook.error_misc'));
|
return session()->flash('error' , trans('admin/settings/message.webhook.error_misc'));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -140,23 +140,28 @@ class SlackSettingsForm extends Component
|
||||||
|
|
||||||
$this->setting->save();
|
$this->setting->save();
|
||||||
|
|
||||||
session()->flash('save',trans('admin/settings/message.update.success'));
|
session()->flash('success',trans('admin/settings/message.update.success'));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function submit()
|
public function submit()
|
||||||
{
|
{
|
||||||
if($this->webhook_selected != 'general') {
|
if (app('demo_mode')) {
|
||||||
$this->validate($this->rules);
|
session()->flash('error',trans('general.feature_disabled'));
|
||||||
|
} else {
|
||||||
|
if ($this->webhook_selected != 'general') {
|
||||||
|
$this->validate($this->rules);
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->setting->webhook_selected = $this->webhook_selected;
|
||||||
|
$this->setting->webhook_endpoint = $this->webhook_endpoint;
|
||||||
|
$this->setting->webhook_channel = $this->webhook_channel;
|
||||||
|
$this->setting->webhook_botname = $this->webhook_botname;
|
||||||
|
|
||||||
|
$this->setting->save();
|
||||||
|
|
||||||
|
session()->flash('success',trans('admin/settings/message.update.success'));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->setting->webhook_selected = $this->webhook_selected;
|
|
||||||
$this->setting->webhook_endpoint = $this->webhook_endpoint;
|
|
||||||
$this->setting->webhook_channel = $this->webhook_channel;
|
|
||||||
$this->setting->webhook_botname = $this->webhook_botname;
|
|
||||||
|
|
||||||
$this->setting->save();
|
|
||||||
|
|
||||||
session()->flash('save',trans('admin/settings/message.update.success'));
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue