diff --git a/client/blueprints/Roadmaps.py b/client/blueprints/Roadmaps.py index 9887439608330bf466a6112ff73ed1178181d90a..d4fd07893ee81cd52b70efc67c1e8318ffb99081 100644 --- a/client/blueprints/Roadmaps.py +++ b/client/blueprints/Roadmaps.py @@ -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 diff --git a/client/static/js/main.js b/client/static/js/main.js index b75cb0c6387b6f1ae0b48e01ad5ec74780e36d8a..5abcee5b6198b7ebeabc7f7789c24802987c4cca 100644 --- a/client/static/js/main.js +++ b/client/static/js/main.js @@ -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() diff --git a/client/templates/admin/roadmaps/edit.html b/client/templates/admin/roadmaps/edit.html index 1af9e2888fb175f0ff30cc6f99dfbff6e733de7a..2c832eb54a4075256f5c6baabc35a3debf7f853f 100644 --- a/client/templates/admin/roadmaps/edit.html +++ b/client/templates/admin/roadmaps/edit.html @@ -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>