mirror of
https://git.rwth-aachen.de/acs/public/villas/web/
synced 2025-03-09 00:00:01 +01:00
Only save changes on project on save button
This commit is contained in:
parent
ddd2680d0d
commit
dbf95bc862
3 changed files with 9 additions and 4 deletions
|
@ -1,10 +1,17 @@
|
|||
import Ember from 'ember';
|
||||
|
||||
export default Ember.Controller.extend({
|
||||
name: function() {
|
||||
return this.get('model.name');
|
||||
}.property('model.name'),
|
||||
|
||||
actions: {
|
||||
saveEdit() {
|
||||
// save the changes
|
||||
// apply the changes
|
||||
var project = this.get('model');
|
||||
project.set('name', this.get('name'));
|
||||
|
||||
// save the changes
|
||||
let projectId = project.get('id');
|
||||
var controller = this;
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<form id="project-edit-form" {{action 'saveEdit' on='submit'}} >
|
||||
<p>
|
||||
<label for="name">Name</label>
|
||||
{{input id='name' placeholder='Enter project name' value=model.name}}
|
||||
{{input id='name' placeholder='Enter project name' value=name}}
|
||||
</p>
|
||||
|
||||
<button {{action 'cancelEdit'}}>Cancel</button>
|
||||
|
|
2
todo.md
2
todo.md
|
@ -1,5 +1,3 @@
|
|||
# To-Do
|
||||
- Change password
|
||||
- Create/register user
|
||||
- User management
|
||||
- Don't log out on unauthorized access (admin level lower than required)
|
||||
|
|
Loading…
Add table
Reference in a new issue