clone of github.com/decent-newsroom/newsroom
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

47 lines
1.4 KiB

{% extends 'base.html.twig' %}
{% form_theme form _self %}
{% block quill_widget %}
<div {{ stimulus_controller('quill') }} class="quill" data-id="{{ id }}" >
<div id="editor">
{{ value|raw }}
</div>
</div>
<input type="hidden" {{ block('widget_attributes') }} value="{{ value }}" />
{% endblock %}
{% block body %}
<div {{ stimulus_controller('nostr-publish', {
publishUrl: path('api-article-publish'),
csrfToken: csrf_token('nostr_publish')
}) }} data-nostr-publish-target="form">
<!-- Status messages -->
<div data-nostr-publish-target="status"></div>
{{ form_start(form) }}
<!-- Override the submit button to use Nostr publishing -->
{{ form_row(form.title) }}
{{ form_row(form.summary) }}
{{ form_row(form.content) }}
{{ form_row(form.image) }}
{{ form_row(form.topics) }}
<!-- Custom actions section with Nostr publish button -->
<div class="actions">
<!-- Replace the default submit button with Nostr publish button -->
<button type="button"
class="btn btn-primary"
data-nostr-publish-target="publishButton"
data-action="click->nostr-publish#publish">
Publish
</button>
</div>
{{ form_end(form) }}
</div>
{% endblock %}