diff options
author | Malf Furious <m@lfurio.us> | 2016-03-06 22:04:37 -0500 |
---|---|---|
committer | Malf Furious <m@lfurio.us> | 2016-03-27 20:16:32 -0400 |
commit | ae2704f45ead57d437627efe7e4d44a564d923c4 (patch) | |
tree | 06025d5e26671bd59a3bf31d0d887653ff38c9ad /app/view/common/setting.modal.view.php | |
parent | 1392664aaf8d763b5cac927df01ce763d6672d36 (diff) | |
download | scrott-ae2704f45ead57d437627efe7e4d44a564d923c4.tar.gz scrott-ae2704f45ead57d437627efe7e4d44a564d923c4.zip |
Add User settings tab for Setting modal
This commit adds the basic structure to the Setting modal in Common MVC.
The meat of this commit is the content for the webform for the modal's form for user account settings. The next commit should implement form submission handling.
Diffstat (limited to 'app/view/common/setting.modal.view.php')
-rw-r--r-- | app/view/common/setting.modal.view.php | 87 |
1 files changed, 82 insertions, 5 deletions
diff --git a/app/view/common/setting.modal.view.php b/app/view/common/setting.modal.view.php index 27fb9d2..90d68f8 100644 --- a/app/view/common/setting.modal.view.php +++ b/app/view/common/setting.modal.view.php @@ -12,12 +12,89 @@ </div> <div class="modal-body"> - </div> + <ul class="nav nav-tabs" role="tablist"> + <li class="active"><a href="#settUserTab" aria-controls="settUserTab" data-toggle="tab"> + <span class="glyphicon glyphicon-user"></span> <?=$mod->getCurrentUser()->getDisplayName()?> + </a></li> - <div class="modal-footer"> - <button type="button" class="btn btn-primary" data-dismiss="modal"> - Close - </button> + <?php if ($mod->getCurrentUser()->admin == 1) { ?> + <li><a href="#settAdminTab" aria-controls="settAdminTab" data-toggle="tab"><span class="glyphicon glyphicon-sunglasses"></span> Admin</a></li> + <li><a href="#settUsersTab" aria-controls="settUsersTab" data-toggle="tab"><span class="glyphicon glyphicon-th"></span> All Users</a></li> + <?php } ?> + </ul> + + <div class="tab-content"> + <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()?>"> + <input type="hidden" name="input[action]" value="common-setting-user" /> + <div class="form-group"> + <label for="inputUserUsername">Username</label> + <input type="text" id="inputUserUsername" 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="true" /> Change Password + </label> + </div> + + <div class="collapse" id="inputUserPasswdCollapse"> + <div class="form-group"> + <label for="inputUserCurPasswd">Current Password</label> + <input type="password" name="input[curPasswd]" id="inputUserCurPasswd" class="form-control" /> + </div> + + <div class="form-group"> + <label for="inputUserNewPasswd">New Password</label> + <input type="password" name="input[newPasswd]" id="inputUserNewPasswd" class="form-control" /> + </div> + + <div class="form-group"> + <label for="inputUserConfPasswd">Confirm Password</label> + <input type="password" name="input[confPasswd]" id="inputUserConfPasswd" class="form-control" /> + </div> + </div> + + <div class="form-group"> + <label for="inputUserAlias">Alias</label> + <input type="text" name="input[alias]" id="inputUserAlias" class="form-control" value="<?=$mod->getCurrentUser()->alias?>" /> + </div> + + <div class="form-group"> + <label for="inputUserEmail">Email</label> + <input type="text" name="input[email]" id="inputUserEmail" class="form-control" value="<?=$mod->getCurrentUser()->email?>" /> + </div> + + <?php if ($mod->getCurrentUser()->email != "" && $mod->getCurrentUser()->emailConf == 0) { ?> + <div class="form-group has-warning"> + <label class="control-label" for="inputUserEmailConfKey">Email Confirmation Key</label> + <input type="text" name="input[emailConfKey]" id="inputUserEmailConfKey" class="form-control" /> + <span class="help-block">You have not yet confirmed ownership of your saved email address</span> + </div> + <?php } ?> + + <button type="submit" class="btn btn-success pull-right">Save</button> + </form> + + <p> </p> + </div> + + <?php if ($mod->getCurrentUser()->admin == 1) { ?> + <div class="tab-pane fade" id="settAdminTab"> + admin schings + </div> + + <div class="tab-pane fade" id="settUsersTab"> + all users' schings + </div> + <?php } ?> + </div> </div> </div> </div> |