do not output 'this category is used' for new category

This commit is contained in:
Uwe Steinmann 2016-03-04 16:06:19 +01:00
parent 0369e95157
commit 691565473d

View File

@ -62,7 +62,12 @@ $(document).ready( function() {
<tr> <tr>
<td></td><td> <td></td><td>
<?php <?php
if($category && !$category->isUsed()) { if($category) {
if($category && $category->isUsed()) {
?>
<p><?php echo getMLText('category_in_use') ?></p>
<?php
} else {
?> ?>
<form style="display: inline-block;" method="post" action="../op/op.Categories.php" > <form style="display: inline-block;" method="post" action="../op/op.Categories.php" >
<?php echo createHiddenFieldWithKey('removecategory'); ?> <?php echo createHiddenFieldWithKey('removecategory'); ?>
@ -71,10 +76,7 @@ $(document).ready( function() {
<button class="btn" type="submit"><i class="icon-remove"></i> <?php echo getMLText("rm_document_category")?></button> <button class="btn" type="submit"><i class="icon-remove"></i> <?php echo getMLText("rm_document_category")?></button>
</form> </form>
<?php <?php
} else { }
?>
<p><?php echo getMLText('category_in_use') ?></p>
<?php
} }
?> ?>
</td> </td>