summaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorMalf Furious <m@lfurio.us>2016-09-15 19:46:45 -0400
committerMalf Furious <m@lfurio.us>2016-09-15 19:46:45 -0400
commit0e00677199347f296426b77f48c8423602c56d66 (patch)
tree3810967175135bd4bec537c400ce007d2874b00c /app
parentfa01eb6b8432b1700a393042bbf6626e420001eb (diff)
downloadscrott-0e00677199347f296426b77f48c8423602c56d66.tar.gz
scrott-0e00677199347f296426b77f48c8423602c56d66.zip
Commit work on setting modal groups tab
I am committing this change incomplete. I'm stopping work on this particular piece to save some work overall and explore view templating using PHP features. The idea is to define this markup once in just one file, rather than having to duplicate it for each object type.
Diffstat (limited to '')
-rw-r--r--app/view/common/group.setting.modal.view.php53
1 files changed, 52 insertions, 1 deletions
diff --git a/app/view/common/group.setting.modal.view.php b/app/view/common/group.setting.modal.view.php
index e5c096c..e2a73e0 100644
--- a/app/view/common/group.setting.modal.view.php
+++ b/app/view/common/group.setting.modal.view.php
@@ -17,5 +17,56 @@
?>
<div class="tab-pane fade <?=$mod->getSettingModalTabDispClasses()?>" id="settGroupTab">
- TODO -- Design this tab.
+ <p>&nbsp;</p>
+
+ <form method="post" action="<?=$mod->ap()?>" enctype="multipart/form-data">
+ <input type="hidden" name="input[action]" value="common-setting-group" />
+ <input type="hidden" name="input[guid]" value="<?=$mod->group->guid?>" />
+
+ <div class="row">
+ <div class="col-md-8">
+ <div class="form-group">
+ <label>Group name</label>
+ <input type="text" name="input[name]" class="form-control" value="<?=$mod->group->name?>" required="true" maxlength="50" <?=($mod->group->canModify($mod->getCurrentUser()) ? "" : "disabled")?> />
+ </div>
+ </div>
+
+ <div class="col-md-4 text-center">
+ <img src="<?=$mod->group->getHeadImage()?>" alt="<?=$mod->group->name?>" class="img-circle" height="100" />
+
+ <?php if ($mod->group->canModify($mod->getCurrentUser())) { ?>
+ <br />
+ <br />
+ <button type="button" class="btn btn-default btn-xs" data-toggle="collapse" data-target="#inputGroupImageCollapse">
+ <span class="glyphicon glyphicon-camera"></span> Upload new image
+ </button>
+ <br />
+ <button type="submit" name="input[rmImage]" class="btn btn-danger btn-xs" onclick="return assertConfirm()">
+ <span class="glyphicon glyphicon-remove"></span> Remove image
+ </button>
+ <?php } ?>
+ </div>
+ </div>
+
+ <div class="collapse" id="inputGroupImageCollapse">
+ <div class="form-group">
+ <label>Group Image</label>
+ <input type="file" name="attachment" />
+ </div>
+ </div>
+
+ <?php include "view/common/permissions.setting.modal.view.php"; ?>
+ <?php include "view/common/ownership.setting.modal.view.php"; ?>
+
+ <button type="submit" class="btn btn-success pull-right">Save</button>
+
+ <p>&nbsp;</p>
+ <p>&nbsp;</p>
+
+ <button type="submit" name="input[rmGroup]" class="btn btn-danger btn-xs pull-right">
+ <span class="glyphicon glyphicon-trash"></span> Delete Group
+ </button>
+ </form>
+
+ <p>&nbsp;</p>
</div>