Skip to content
Snippets Groups Projects
Commit 1b0b821a authored by Robert Goldmann's avatar Robert Goldmann
Browse files

#40 - handle and save roadmap start date

parent 8210118b
No related branches found
No related tags found
No related merge requests found
......@@ -40,6 +40,10 @@ def construct_blueprint(urlBuilder):
return render_template('error.html', message=LOCALIZATION['error_param_invalid'])
_, roadmap = ApiRequest.send_api_request(urlBuilder.build_url('roadmap', ID), requests.get, {}, [])
if roadmap['StartDate'] == '-':
roadmap['StartDate'] = ''
return render_template('admin/roadmaps/edit.html',
title='Edit Roadmap',
roadmap=roadmap,
......@@ -50,7 +54,8 @@ def construct_blueprint(urlBuilder):
def edit_post():
success, response = ApiRequest.send_api_request(urlBuilder.build_url('roadmap'),
requests.put, request.form,
[('ID', int), ('Projectname', str), ('Hidden', bool)])
[('ID', int), ('Projectname', str),
('Hidden', bool), ('StartDate', str)])
if not success:
return response
......
......@@ -148,12 +148,18 @@ function validateLoginForm()
function validateNewRoadmapForm()
{
var projectName = $('#project-name').val();
var startDate = document.getElementById('start-date');
if(isNull(projectName))
{
alert("Please enter a project name.");
return false;
}
if(isNull(startDate.value))
{
startDate.value = "01.01.2000";
}
}
function validateNewMilestoneForm()
......
......@@ -20,6 +20,15 @@
</div>
</div>
<div class="row center-align">
<div class="col s12 m8 offset-m2 l6 offset-l3">
<div class="col s12 left-align">
<label for="start-date" style="font-size: 1rem;">Due Date</label>
<input type="text" class="datepicker" id="start-date" name="StartDate" value="{% if roadmap %}{{ roadmap["StartDate"] }}{% endif %}">
</div>
</div>
</div>
<div class="col s12 m8 offset-m2 l6 offset-l3">
<div class="input-field col s12">
<p>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment