mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-23 18:03:17 +00:00
handle case where a DC field is null
This commit is contained in:
@@ -34,7 +34,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<input class="required_field" type='text' name='{{name}}' value="{{ caption.get_dc_field('Title').get_value()|default(record.get_title()) }}"/>
|
<input class="required_field" type='text' name='{{name}}' value="{{ caption.get_dc_field('Title') is not none ? caption.get_dc_field('Title').get_value()|default(record.get_title()) : record.get_title() }}"/>
|
||||||
<br />
|
<br />
|
||||||
{{ error_form.display_errors(name, constraint_errors) }}
|
{{ error_form.display_errors(name, constraint_errors) }}
|
||||||
</td>
|
</td>
|
||||||
@@ -48,7 +48,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
<td class='column_right'>
|
<td class='column_right'>
|
||||||
<textarea class="required_field" name="{{name}}" rows="5">{{ caption.get_dc_field('Description').get_value() }}</textarea>
|
<textarea class="required_field" name="{{name}}" rows="5">{{ caption.get_dc_field('Description') is not none ? caption.get_dc_field('Description').get_value() : "" }}</textarea>
|
||||||
<br />
|
<br />
|
||||||
{{ error_form.display_errors(name, constraint_errors) }}
|
{{ error_form.display_errors(name, constraint_errors) }}
|
||||||
</td>
|
</td>
|
||||||
@@ -66,7 +66,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<input class='required_field' type='text' name='{{name}}' value="{{ caption.get_dc_field('Subject').get_value(true, ' ') }}"/>
|
<input class='required_field' type='text' name='{{name}}' value="{{ caption.get_dc_field('Subject') is not none ? caption.get_dc_field('Subject').get_value(true, ' ') : ''}}"/>
|
||||||
<br />
|
<br />
|
||||||
{{ error_form.display_errors(name, constraint_errors) }}
|
{{ error_form.display_errors(name, constraint_errors) }}
|
||||||
</td>
|
</td>
|
||||||
|
@@ -45,7 +45,7 @@
|
|||||||
<label for='{{name}}'>{% trans 'Titre' %}</label>
|
<label for='{{name}}'>{% trans 'Titre' %}</label>
|
||||||
</td>
|
</td>
|
||||||
<td style="width:180px;">
|
<td style="width:180px;">
|
||||||
<input class="required_field" style="width:150px;" type='text' name='{{name}}' value="{{ caption.get_dc_field('Title').get_value()|default(record.get_title()) }}"/>
|
<input class="required_field" style="width:150px;" type='text' name='{{name}}' value="{{ caption.get_dc_field('Title') is not none ? caption.get_dc_field('Title').get_value()|default(record.get_title()) : record.get_title() }}"/>
|
||||||
<br />
|
<br />
|
||||||
{{ error_form.display_errors(name, constraint_errors) }}
|
{{ error_form.display_errors(name, constraint_errors) }}
|
||||||
</td>
|
</td>
|
||||||
@@ -61,7 +61,7 @@
|
|||||||
</label>
|
</label>
|
||||||
</td>
|
</td>
|
||||||
<td class='column_right'>
|
<td class='column_right'>
|
||||||
<textarea class="required_field" name="{{ name }}" rows="5" style="width:150px;">{{ caption.get_dc_field('Description').get_value() }}</textarea>
|
<textarea class="required_field" name="{{ name }}" rows="5" style="width:150px;">{{ caption.get_dc_field('Description') is not none ? caption.get_dc_field('Description').get_value() : "" }}</textarea>
|
||||||
<br />
|
<br />
|
||||||
{{ error_form.display_errors(name, constraint_errors) }}
|
{{ error_form.display_errors(name, constraint_errors) }}
|
||||||
</td>
|
</td>
|
||||||
@@ -74,7 +74,7 @@
|
|||||||
<label for='{{ name }}'>{% trans 'Tags' %}</label>
|
<label for='{{ name }}'>{% trans 'Tags' %}</label>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<input class='required_field' type='text' style="width:150px;" name='{{ name }}' value="{{ caption.get_dc_field('Subject').get_value(true, ' ') }}"/>
|
<input class='required_field' type='text' style="width:150px;" name='{{ name }}' value="{{ caption.get_dc_field('Subject') is not none ? caption.get_dc_field('Subject').get_value(true, ' ') : '' }}"/>
|
||||||
<br />
|
<br />
|
||||||
{{ error_form.display_errors(name, constraint_errors) }}
|
{{ error_form.display_errors(name, constraint_errors) }}
|
||||||
</td>
|
</td>
|
||||||
|
@@ -34,7 +34,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<input class="required_field" type='text' name='{{name}}' value="{{ caption.get_dc_field('Title').get_value()|default(record.get_title()) }}"/>
|
<input class="required_field" type='text' name='{{name}}' value="{{ caption.get_dc_field('Title') is not none ? caption.get_dc_field('Title').get_value()|default(record.get_title()) : record.get_title() }}"/>
|
||||||
<br />
|
<br />
|
||||||
{{ error_form.display_errors(name, constraint_errors) }}
|
{{ error_form.display_errors(name, constraint_errors) }}
|
||||||
</label>
|
</label>
|
||||||
@@ -49,7 +49,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
<td class='column_right'>
|
<td class='column_right'>
|
||||||
<textarea class="required_field" name="{{ name }}" rows="5">{{ caption.get_dc_field('Description').get_value() }}</textarea>
|
<textarea class="required_field" name="{{ name }}" rows="5">{{ caption.get_dc_field('Description') is not none ? caption.get_dc_field('Description').get_value() : ""}}</textarea>
|
||||||
<br />
|
<br />
|
||||||
{{ error_form.display_errors(name, constraint_errors) }}
|
{{ error_form.display_errors(name, constraint_errors) }}
|
||||||
</td>
|
</td>
|
||||||
@@ -78,7 +78,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<input class='required_field' type='text' name='{{ name }}' value="{{ caption.get_dc_field('Subject').get_value(true, ' ') }}"/>
|
<input class='required_field' type='text' name='{{ name }}' value="{{ caption.get_dc_field('Subject') is not none ? caption.get_dc_field('Subject').get_value(true, ' ') : ""}}"/>
|
||||||
<br />
|
<br />
|
||||||
{{ error_form.display_errors(name, constraint_errors) }}
|
{{ error_form.display_errors(name, constraint_errors) }}
|
||||||
</td>
|
</td>
|
||||||
|
Reference in New Issue
Block a user