summaryrefslogtreecommitdiffstats
path: root/app/view/common/ownership.setting.modal.view.php
diff options
context:
space:
mode:
Diffstat (limited to 'app/view/common/ownership.setting.modal.view.php')
-rw-r--r--app/view/common/ownership.setting.modal.view.php26
1 files changed, 14 insertions, 12 deletions
diff --git a/app/view/common/ownership.setting.modal.view.php b/app/view/common/ownership.setting.modal.view.php
index 857ccb4..3f7c382 100644
--- a/app/view/common/ownership.setting.modal.view.php
+++ b/app/view/common/ownership.setting.modal.view.php
@@ -16,18 +16,20 @@
?>
-<?php if ($mod->obj->isOwner($mod->getCurrentUser())) { ?>
- <label class="text-danger">Change Owner</label>
- <div class="checkbox">
- <label data-toggle="collapse" data-target="#inputGroupOwnerCollapse">
- <input type="checkbox" name="input[setOwner]" value="1" /> Transfer Ownership
- </label>
- </div>
+<?php function common_setting_ownership($mod, $obj) { ?>
+ <?php if ($obj->isOwner($mod->getCurrentUser())) { ?>
+ <label class="text-danger">Change Owner</label>
+ <div class="checkbox">
+ <label data-toggle="collapse" data-target="#inputGroupOwnerCollapse">
+ <input type="checkbox" name="input[setOwner]" value="1" /> Transfer Ownership
+ </label>
+ </div>
- <div class="collapse" id="inputGroupOwnerCollapse">
- <div class="form-group has-error">
- <label class="control-label">Owner Username</label>
- <input type="text" name="input[newOwner]" class="form-control" value="<?=$mod->group->getOwner()->name?>" />
+ <div class="collapse" id="inputGroupOwnerCollapse">
+ <div class="form-group has-error">
+ <label class="control-label">Owner Username</label>
+ <input type="text" name="input[newOwner]" class="form-control" value="<?=$obj->getOwner()->name?>" />
+ </div>
</div>
- </div>
+ <?php } ?>
<?php } ?>