diff --git a/app/Http/Livewire/News/Form/NewsArticleForm.php b/app/Http/Livewire/News/Form/NewsArticleForm.php index f58618c5..44b6ffdc 100644 --- a/app/Http/Livewire/News/Form/NewsArticleForm.php +++ b/app/Http/Livewire/News/Form/NewsArticleForm.php @@ -24,9 +24,12 @@ class NewsArticleForm extends Component public array $temporaryUrls = []; public ?string $fromUrl = ''; + + public string $type = ''; + public bool $paid = false; - protected $queryString = ['fromUrl' => ['except' => ''], 'paid' => ['except' => false]]; + protected $queryString = ['fromUrl' => ['except' => ''], 'type' => ['except' => '']]; public function rules() { @@ -50,6 +53,9 @@ class NewsArticleForm extends Component public function mount() { + if ($this->type === 'paid') { + $this->paid = true; + } if ($this->libraryItem === null) { $this->libraryItem = new LibraryItem([ 'type' => 'markdown_article', diff --git a/resources/views/livewire/news/article-overview.blade.php b/resources/views/livewire/news/article-overview.blade.php index fc851439..298faf9e 100644 --- a/resources/views/livewire/news/article-overview.blade.php +++ b/resources/views/livewire/news/article-overview.blade.php @@ -24,7 +24,7 @@ @if(auth()->user()->lnbits) {{ __('Submit paid news article') }}