storedObject: add title in form twig and in activity show

This commit is contained in:
nobohan 2022-05-25 17:30:26 +02:00
parent e8cf7ae8e1
commit 60c163ae9d
3 changed files with 9 additions and 6 deletions

View File

@ -152,7 +152,7 @@
{% if entity.documents|length > 0 %} {% if entity.documents|length > 0 %}
<ul> <ul>
{% for d in entity.documents %} {% for d in entity.documents %}
<li>{{ m.download_button(d) }}</li> <li>{{ d.title }}{{ m.download_button(d) }}</li>
{% endfor %} {% endfor %}
</ul> </ul>
{% else %} {% else %}

View File

@ -68,7 +68,9 @@ class StoredObjectType extends AbstractType
if ($options['has_title']) { if ($options['has_title']) {
$builder $builder
->add('title', TextType::class); ->add('title', TextType::class, [
'label' => 'Title',
]);
} }
} }

View File

@ -18,5 +18,6 @@
{{ form_widget(form.keyInfos, { 'attr': { 'data-stored-object-key': 1 } }) }} {{ form_widget(form.keyInfos, { 'attr': { 'data-stored-object-key': 1 } }) }}
{{ form_widget(form.iv, { 'attr': { 'data-stored-object-iv': 1 } }) }} {{ form_widget(form.iv, { 'attr': { 'data-stored-object-iv': 1 } }) }}
{{ form_widget(form.type, { 'attr': { 'data-async-file-type': 1 } }) }} {{ form_widget(form.type, { 'attr': { 'data-async-file-type': 1 } }) }}
{{ form_row(form.title) }}
</div> </div>
{% endblock %} {% endblock %}