Skip to content
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

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

TacticalDoggo
Copy link

First rough draft of new layout, simple button logic to be looked at to fix the infinite button creation.

function addButton(){
document.getElementById("editButton").setAttribute("disabled", "true");

var buttonChange = document.createElement('button');
Copy link
Member

@Kenneth-W-Chen Kenneth-W-Chen Sep 24, 2024

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.

Comment on lines +226 to +257
<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']; ?>>
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants