diff options
author | Malf Furious <m@lfurio.us> | 2016-09-17 00:11:16 -0400 |
---|---|---|
committer | Malf Furious <m@lfurio.us> | 2016-09-17 00:11:16 -0400 |
commit | cdcc2bcb837729ffdc365e3701865298433b1c73 (patch) | |
tree | e8ad5ca91257f5603bab2c2fe8811ac402016d6b /app/view/common/ownership.setting.modal.view.php | |
parent | c45e5d50970fd285e93ca318c6e91e9f98ba1504 (diff) | |
download | scrott-cdcc2bcb837729ffdc365e3701865298433b1c73.tar.gz scrott-cdcc2bcb837729ffdc365e3701865298433b1c73.zip |
Change ownership view template into a PHP function
Diffstat (limited to 'app/view/common/ownership.setting.modal.view.php')
-rw-r--r-- | app/view/common/ownership.setting.modal.view.php | 26 |
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 } ?> |