Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions ItemRelationsPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -555,16 +555,21 @@ public function hookAdminItemsBatchEditForm()
<th><?php echo __('Subjects'); ?></th>
<th><?php echo __('Relation'); ?></th>
<th><?php echo __('Object'); ?></th>
<th><?php echo __('Comment'); ?></th>
</tr>
</thead>
<tbody>
<tr>
<td><?php echo __('These Items'); ?></td>
<td><?php echo get_view()->formSelect('custom[item_relations_property_id]',
null, array(), $formSelectProperties); ?></td>
<td><?php echo __('Item ID'); ?>
<?php echo get_view()->formText('custom[item_relations_item_relation_object_item_id]',
null, array('size' => 6));
<td><?php
echo get_view()->formText('custom[item_relations_item_relation_object_item_id]',
null, array('size' => 4, 'placeholder' => __('Item ID')));
?></td>
<td><?php
echo get_view()->formText('custom[item_relations_item_relation_relation_comment]',
null, array('size' => 12));
?></td>
</tr>
</tbody>
Expand Down Expand Up @@ -793,7 +798,7 @@ public static function insertItemRelation($subjectItem, $propertyId, $objectItem
$itemRelation->subject_item_id = $subjectItem->id;
$itemRelation->property_id = $propertyId;
$itemRelation->object_item_id = $objectItem->id;
$itemRelation->relation_comment = ( $relationComment ? $relationComment : "");
$itemRelation->relation_comment = strlen($relationComment)? $relationComment : '';
$itemRelation->save();

return true;
Expand Down