-
Notifications
You must be signed in to change notification settings - Fork 0
Edit position page #664
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
Open
NYABUTOA
wants to merge
7
commits into
department-portal-base
Choose a base branch
from
EDITPOSITIONPAGEA
base: department-portal-base
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Edit position page #664
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
7c7fc83
Created the revise position page bones i still need to figure out how…
NYABUTOA 1f7f422
added a connection so that we are able to press the button and see th…
NYABUTOA 48e83ec
This is the revise position page where one should be able to edit pos…
NYABUTOA 496a93f
DETELETD THIS DUPLICATE FILES
NYABUTOA 557e211
Implemented the revisePosition route and createPositionRevision funct…
NYABUTOA 8cddd37
Make revise position stay on the page after saving so the new pending…
NYABUTOA 1d902d3
fixed the merge conflicts
NYABUTOA File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| /* Revise position form - styles not covered by Bootstrap */ | ||
| .description-section-row { | ||
| background: #fff; | ||
| border: 1px solid #e6e6e6; | ||
| padding: 1rem; | ||
| border-radius: 6px; | ||
| margin-bottom: 1rem; | ||
| } | ||
|
|
||
| .revise-actions { | ||
| margin-top: 1.5rem; | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| $(document).ready(function () { | ||
| var sectionsContainer = document.getElementById('sectionsContainer'); | ||
| var sectionRowTemplate = document.getElementById('sectionRowTemplate'); | ||
|
|
||
| document.getElementById('addSectionBtn').addEventListener('click', function () { | ||
| sectionsContainer.appendChild(sectionRowTemplate.content.cloneNode(true)); | ||
| }); | ||
|
|
||
| sectionsContainer.addEventListener('click', function (event) { | ||
| if (event.target.classList.contains('remove-section-btn')) { | ||
| event.target.closest('.description-section-row').remove(); | ||
| } | ||
| }); | ||
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,105 @@ | ||
| {% extends "base.html" %} | ||
|
|
||
| {% block scripts %} | ||
| {{ super() }} | ||
| <script type="text/javascript" src="{{ url_for('static', filename='js/revisepositionpage.js') }}?u={{ lastStaticUpdate }}"></script> | ||
| <link rel="stylesheet" type="text/css" href="/static/css/individualPositions.css?u={{ lastStaticUpdate }}" /> | ||
| <link rel="stylesheet" type="text/css" href="/static/css/revisepositionpage.css?u={{ lastStaticUpdate }}" /> | ||
| {% endblock %} | ||
|
|
||
| {% block app_content %} | ||
| <div class="department-header-container"> | ||
| <h1 class="department-header">Revise {{ position.positionTitle }}</h1> | ||
| </div> | ||
|
|
||
| <div class="container-fluid position-container"> | ||
| <div class="row"> | ||
| <div class="col-12"> | ||
|
|
||
| <form method="POST" action="{{ url_for('main.revisePosition', org=department.ORG, account=department.ACCOUNT, positionCode=position.positionCode) }}"> | ||
|
|
||
| <div class="position-information"> | ||
| <div class="form-group row"> | ||
| <label class="col-sm-3 col-form-label" for="positionTitle">Position Title:</label> | ||
| <div class="col-sm-9"> | ||
| <input type="text" class="form-control" id="positionTitle" name="positionTitle" value="{{ position.positionTitle }}" required> | ||
| </div> | ||
| </div> | ||
|
|
||
| <div class="form-group row"> | ||
| <label class="col-sm-3 col-form-label">Position Code:</label> | ||
| <div class="col-sm-9"> | ||
| <p class="form-control-static">{{ position.positionCode }}</p> | ||
| </div> | ||
| </div> | ||
|
|
||
| <div class="form-group row"> | ||
| <label class="col-sm-3 col-form-label" for="wls">WLS Level:</label> | ||
| <div class="col-sm-9"> | ||
| <input type="number" class="form-control" id="wls" name="wls" min="0" value="{{ position.wls }}" required> | ||
| </div> | ||
| </div> | ||
|
|
||
| <div class="form-group row"> | ||
| <label class="col-sm-3 col-form-label">Last Revision Date:</label> | ||
| <div class="col-sm-9"> | ||
| <p class="form-control-static">{{ position.revisionDate }}</p> | ||
| </div> | ||
| </div> | ||
|
|
||
| <div class="form-group row"> | ||
| <label class="col-sm-3 col-form-label">Revised By:</label> | ||
| <div class="col-sm-9"> | ||
| <p class="form-control-static">{{ position.revisedBy }}</p> | ||
| </div> | ||
| </div> | ||
| </div> | ||
|
|
||
| <h3 class="description-header">Description</h3> | ||
| <section id="sectionsContainer"> | ||
| {%- for section in sections %} | ||
| <div class="description-section-row"> | ||
| <div class="form-group"> | ||
| <label>Section Title</label> | ||
| <input type="text" class="form-control" name="sectionTitle[]" value="{{ section.sectionTitle }}"> | ||
| </div> | ||
| <div class="form-group"> | ||
| <label>Section Content</label> | ||
| <textarea class="form-control" name="sectionContent[]" rows="4">{{ section.sectionContent }}</textarea> | ||
| </div> | ||
| <button type="button" class="btn btn-danger btn-sm remove-section-btn">Remove Section</button> | ||
| </div> | ||
| {%- endfor %} | ||
| </section> | ||
|
|
||
| <button type="button" id="addSectionBtn" class="btn btn-default">Add Section</button> | ||
|
|
||
| <div class="row revise-actions"> | ||
| <div class="col-xs-12 text-left"> | ||
| <a href="{{ url_for('main.managePositions', org=department.ORG, account=department.ACCOUNT) }}" class="btn btn-default"> | ||
| Cancel | ||
| </a> | ||
| <button type="submit" class="btn btn-primary">Save Revision</button> | ||
| </div> | ||
| </div> | ||
|
|
||
| </form> | ||
|
|
||
| </div> | ||
| </div> | ||
| </div> | ||
|
|
||
| <template id="sectionRowTemplate"> | ||
| <div class="description-section-row"> | ||
| <div class="form-group"> | ||
| <label>Section Title</label> | ||
| <input type="text" class="form-control" name="sectionTitle[]" value=""> | ||
| </div> | ||
| <div class="form-group"> | ||
| <label>Section Content</label> | ||
| <textarea class="form-control" name="sectionContent[]" rows="4"></textarea> | ||
| </div> | ||
| <button type="button" class="btn btn-danger btn-sm remove-section-btn">Remove Section</button> | ||
| </div> | ||
| </template> | ||
| {% endblock %} |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.