diff options
author | Malf Furious <m@lfurio.us> | 2016-03-26 17:18:08 -0400 |
---|---|---|
committer | Malf Furious <m@lfurio.us> | 2016-03-27 20:16:32 -0400 |
commit | 99ec6644fc93ee4d6bd8569148de6a03d64f69cb (patch) | |
tree | 68ac1f1e206d70887a2d445c20b0bb81746c9c71 /app/view | |
parent | 333351cbd18d12520fb0eae44e9805cb3b10e038 (diff) | |
download | scrott-99ec6644fc93ee4d6bd8569148de6a03d64f69cb.tar.gz scrott-99ec6644fc93ee4d6bd8569148de6a03d64f69cb.zip |
Add collapsable panel for editing each user's settings to admin setting tab
Also, added relevant initialization code to common model
Diffstat (limited to 'app/view')
-rw-r--r-- | app/view/common/setting.modal.view.php | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/app/view/common/setting.modal.view.php b/app/view/common/setting.modal.view.php index 93a273a..11adc69 100644 --- a/app/view/common/setting.modal.view.php +++ b/app/view/common/setting.modal.view.php @@ -181,6 +181,68 @@ </div> </div> </div> + + <?php foreach ($mod->common_settingAllUsers as $user) { ?> + <div class="panel panel-default"> + <div class="panel-heading"> + <h4 class="panel-title"> + <a href="#common-setting-allusers-<?=$user->guid?>-collapse" data-toggle="collapse" data-parent="#common-setting-allusers" aria-expanded="false"> + <span class="<?=$user->getGlyphicon()?>"></span> <?=$user->name?> <?=($user->alias != "" ? "(" . $user->alias . ")" : "")?> + </a> + </h4> + </div> + + <div class="panel-collapse collapse" id="common-setting-allusers-<?=$user->guid?>-collapse"> + <div class="panel-body"> + <form method="post" action="<?=$mod->ap()?>"> + <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> + + <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 class="collapse" id="input<?=$user->guid?>PasswdCollapse"> + <div class="form-group"> + <label>New Password</label> + <input type="password" name="input[newPasswd]" class="form-control" /> + </div> + + <div class="form-group"> + <label>Confirm Password</label> + <input type="password" name="input[confPasswd]" class="form-control" /> + </div> + </div> + + <div class="checkbox"> + <label> + <input type="checkbox" name="input[admin]" value="1" <?=($user->admin ? "checked" : "")?>> Administrator + </label> + </div> + + <div class="form-group"> + <label>Alias</label> + <input type="text" name="input[alias]" class="form-control" maxlength="50" value="<?=$user->alias?>" /> + </div> + + <div class="form-group"> + <label>Email</label> + <input type="text" name="input[email]" class="form-control" maxlength="50" value="<?=$user->email?>" /> + </div> + + <button type="submit" class="btn btn-success pull-right">Save</button> + </form> + </div> + </div> + </div> + <?php } ?> </div> </div> <?php } ?> |