blob: d0e11ca781fb105318ef59b3e904b8f9d1a429be (
plain) (
tree)
|
|
<?php
/*
* SCROTT Copyright (C) 2016 Malf Furious
*
* Scrott is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published
* by the Free Software Foundation, either version 3 of the License,
* or (at your option) any later version.
*
* Scrott is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
* License for more details.
*/
?>
<?php require_once "view/common/permissions.setting.modal.view.php"; ?>
<div class="tab-pane fade <?=$mod->getSettingModalTabDispClasses()?>" id="settGroupTab">
<p> </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 common_setting_permissions($mod, $mod->group); ?>
<?php if ($mod->group->canModify($mod->getCurrentUser())) { ?>
<p> </p>
<button type="submit" class="btn btn-success pull-right">Save</button>
<?php } ?>
</form>
<p> </p>
<p> </p>
<div class="btn-toolbar pull-right">
<?php if ($mod->group->canModifyMembers($mod->getCurrentUser())) { ?>
<div class="btn-group">
<a href="<?=$mod->group->getURL()?>/members" class="btn btn-primary btn-xs">
<span class="glyphicon glyphicon-user"></span> Manage Members
</a>
</div>
<?php } ?>
<?php if ($mod->group->isOwner($mod->getCurrentUser())) { ?>
<div class="btn-group">
<a href="<?=$mod->group->getURL()?>/transfer" class="btn btn-danger btn-xs">
<span class="glyphicon glyphicon-new-window"></span> Transfer Ownership
</a>
</div>
<div class="btn-group">
<a href="<?=$mod->group->getURL()?>/delete" class="btn btn-danger btn-xs">
<span class="glyphicon glyphicon-trash"></span> Delete Group
</a>
</div>
<?php } ?>
</div>
<p> </p>
</div>
|