-
-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Edited profile page to include buttons, and rework layout #161
base: develop
Are you sure you want to change the base?
Conversation
function addButton(){ | ||
document.getElementById("editButton").setAttribute("disabled", "true"); | ||
|
||
var buttonChange = document.createElement('button'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alex, the infinite button creation is probably because of this line. You're recreating the element every time addButton()
is called. The button is never deleted, it's only disabled here.
You should probably have the "Save" button already in the HTML, or you should check that it exists before using createElement()
Also, you should probably disable the 'Edit Profile' button when the edit menu is open or check if it's already opened before doing anything.
<h4 class = "profileText" style = "text-align:center"><?php echo $userinfo['UNTEUID']; ?></h4> | ||
</div> | ||
<div class="col-md-4"> | ||
<!-- <h3 class = "button">Edit</h3>--> | ||
</div> | ||
</div> | ||
<div class="row"> | ||
<div class="col-md-4"> | ||
<h4 class = "profileText" style = "text-align:right">Graduation Date:</h4> | ||
</div> | ||
<div class="col-md-4"> | ||
<h4 class = "profileText" style = "text-align:center"><?php echo $userinfo['GradDate']; ?></h4> <!--Check variable name(s) and change accordingly--> | ||
</div> | ||
<div class="col-md-4"> | ||
<!-- <h3 class = "button">Edit</h3>--> | ||
</div> | ||
</div> | ||
<div class="row"> | ||
<div class="col-md-12"><br></div> | ||
</div> | ||
<div class="row"> | ||
<div class="col-md-3" style = "left:14%"> | ||
<h4 class = "profileText">CampusLabs Member</h4> | ||
</div> | ||
<div class="col-md-3" style = "left:13%"> | ||
<input type="checkbox" name="campusLabsBox" value=<?php echo $userinfo['IsCampusLabMember']; ?>> | ||
</div> | ||
<div class="col-md-3"> | ||
<h4 class = "profileText" style = "text-align:right">Good Standing</h4> | ||
</div> | ||
<div class="col-md-3"> | ||
<input type="checkbox" name="goodStandingBox" value=<?php echo $userinfo['IsGoodStanding']; ?>> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The proper indices to use from $userinfo
are unteuid
and grad_year
+ grad_term
(I'm assuming grad_term
uses the constants defined in the Semester
class in untrobotics.php
), For Good Standing, use $untrobotics->is_user_in_good_standing($userinfo)
. I don't see anything that stores Campus Labs/OrgSync info though.
First rough draft of new layout, simple button logic to be looked at to fix the infinite button creation.