diff options
Diffstat (limited to 'app/view')
-rw-r--r-- | app/view/common/setting.modal.view.php | 89 | ||||
-rw-r--r-- | app/view/master/foot.view.php | 1 |
2 files changed, 70 insertions, 20 deletions
diff --git a/app/view/common/setting.modal.view.php b/app/view/common/setting.modal.view.php index 11adc69..e43f723 100644 --- a/app/view/common/setting.modal.view.php +++ b/app/view/common/setting.modal.view.php @@ -27,21 +27,46 @@ <div class="tab-pane fade in active" id="settUserTab"> <p> </p> - <?php if ($mod->getCurrentUser()->admin == 1) { ?> - <p class="pull-right"><span class="glyphicon glyphicon-sunglasses"></span> <?=$mod->getCurrentUser()->getDisplayName()?> is a Scrott Administrator</p> - <?php } ?> - - <form method="post" action="<?=$mod->ap()?>"> + <form method="post" action="<?=$mod->ap()?>" enctype="multipart/form-data"> <input type="hidden" name="input[action]" value="common-setting-user" /> - <div class="form-group"> - <label>Username</label> - <input type="text" class="form-control" value="<?=$mod->getCurrentUser()->name?>" disabled /> + + <div class="row"> + <div class="col-md-8"> + <?php if ($mod->getCurrentUser()->admin == 1) { ?> + <p class="pull-right"><span class="glyphicon glyphicon-sunglasses"></span> <?=$mod->getCurrentUser()->getDisplayName()?> is a Scrott Administrator</p> + <?php } ?> + + <div class="form-group"> + <label>Username</label> + <input type="text" class="form-control" value="<?=$mod->getCurrentUser()->name?>" disabled /> + </div> + + <div class="checkbox"> + <label data-toggle="collapse" data-target="#inputUserPasswdCollapse"> + <input type="checkbox" name="input[setPasswd]" value="1" /> Change Password + </label> + </div> + </div> + + <div class="col-md-4 text-center"> + <img src="<?=$mod->getCurrentUser()->getHeadImage()?>" alt="<?=$mod->getCurrentUser()->getDisplayName()?>" class="img-circle" height="100" /> + <br /> + <br /> + <button type="button" class="btn btn-default btn-xs" data-toggle="collapse" data-target="#inputUserImageCollapse"> + <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> + </div> </div> - <div class="checkbox"> - <label data-toggle="collapse" data-target="#inputUserPasswdCollapse"> - <input type="checkbox" name="input[setPasswd]" value="1" /> Change Password - </label> + <div class="collapse" id="inputUserImageCollapse"> + <div class="form-group"> + <label>User Image</label> + <input type="file" name="attachment" /> + </div> </div> <div class="collapse" id="inputUserPasswdCollapse"> @@ -194,19 +219,43 @@ <div class="panel-collapse collapse" id="common-setting-allusers-<?=$user->guid?>-collapse"> <div class="panel-body"> - <form method="post" action="<?=$mod->ap()?>"> + <form method="post" action="<?=$mod->ap()?>" enctype="multipart/form-data"> <input type="hidden" name="input[action]" value="common-setting-allusers-edituser" /> <input type="hidden" name="input[guid]" value="<?=$user->guid?>" /> - <div class="form-group"> - <label>Username</label> - <input type="text" class="form-control" value="<?=$user->name?>" disabled /> + <div class="row"> + <div class="col-md-8"> + <div class="form-group"> + <label>Username</label> + <input type="text" class="form-control" value="<?=$user->name?>" disabled /> + </div> + + <div class="checkbox"> + <label data-toggle="collapse" data-target="#input<?=$user->guid?>PasswdCollapse"> + <input type="checkbox" name="input[setPasswd]" value="1" /> Change Password + </label> + </div> + </div> + + <div class="col-md-4 text-center"> + <img src="<?=$user->getHeadImage()?>" alt="<?=$user->getDisplayName()?>" class="img-circle" height="100" /> + <br /> + <br /> + <button type="button" class="btn btn-default btn-xs" data-toggle="collapse" data-target="#input<?=$user->guid?>ImageCollapse"> + <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> + </div> </div> - <div class="checkbox"> - <label data-toggle="collapse" data-target="#input<?=$user->guid?>PasswdCollapse"> - <input type="checkbox" name="input[setPasswd]" value="1" /> Change Password - </label> + <div class="collapse" id="input<?=$user->guid?>ImageCollapse"> + <div class="form-group"> + <label>User Image</label> + <input type="file" name="attachment" /> + </div> </div> <div class="collapse" id="input<?=$user->guid?>PasswdCollapse"> diff --git a/app/view/master/foot.view.php b/app/view/master/foot.view.php index 6220f89..c749ad0 100644 --- a/app/view/master/foot.view.php +++ b/app/view/master/foot.view.php @@ -1,5 +1,6 @@ <script type="text/javascript" src="<?=$mod->ar()?>/assets/js/jquery.min.js"></script> <script type="text/javascript" src="<?=$mod->ar()?>/assets/js/bootstrap.min.js"></script> +<script type="text/javascript" src="<?=$mod->ar()?>/assets/js/scrott.js"></script> <?php if ($mod->isError() || $mod->isWarning() || $mod->isNotice()) { ?> <script type="text/javascript"> |