1
1
< main class ="flex-shrink-0 ">
2
2
< section >
3
- < form *ngIf ="ready " action =" /editVg/{{videogame.id}} " method =" post " enctype =" multipart/form-data " >
3
+ < form *ngIf ="ready " >
4
4
5
5
< div class ="container " style ="background-color:#f5f5f5; margin-top: 5%; padding-bottom: 1%; ">
6
6
@@ -12,13 +12,13 @@ <h2 style="text-align: center; padding-top: 2%;">Edit Videogame Form</h2>
12
12
< div class ="col-md-4 ">
13
13
< div >
14
14
< label > Title: </ label >
15
- < p > < textarea name ="title " placeholder ="title " style ="width: 100%; "> {{ videogame.title}} </ textarea > </ p >
15
+ < p > < textarea name ="title " placeholder ="title " style ="width: 100%; " [(ngModel)] =" videogame.title " > </ textarea > </ p >
16
16
</ div >
17
17
</ div >
18
18
< div class ="col-md-4 ">
19
19
< div >
20
20
< label > Price: </ label >
21
- < p > < input name ="price " placeholder ="price " type ="number " value =" {{ videogame.price}} "
21
+ < p > < input name ="price " placeholder ="price " type ="number " [(ngModel)] =" videogame.price "
22
22
style ="width: 100%; "> </ p >
23
23
</ div >
24
24
</ div >
@@ -29,14 +29,14 @@ <h2 style="text-align: center; padding-top: 2%;">Edit Videogame Form</h2>
29
29
< div >
30
30
< label > Company: </ label >
31
31
< p > < textarea name ="company " placeholder ="company "
32
- style ="width: 100%; "> [(ngModel)]="videogame.company"</ textarea > </ p >
32
+ style ="width: 100%; " [(ngModel)] ="videogame.company "> </ textarea > </ p >
33
33
</ div >
34
34
</ div >
35
35
< div class ="col-md-4 ">
36
36
< div >
37
37
< label > Continent: </ label >
38
38
< p > < textarea name ="continent " placeholder ="continent "
39
- style ="width: 100%; "> [(ngModel)]="videogame.continent"</ textarea > </ p >
39
+ style ="width: 100%; "[(ngModel)] ="videogame.continent "> </ textarea > </ p >
40
40
</ div >
41
41
</ div >
42
42
</ div >
@@ -63,16 +63,13 @@ <h2 style="text-align: center; padding-top: 2%;">Edit Videogame Form</h2>
63
63
</ div >
64
64
</ div >
65
65
</ div >
66
- < div class ="col-md-4 ">
67
-
68
- </ div >
69
66
70
67
< div class ="row mt-3 d-flex justify-content-center ">
71
68
< div class ="col-md-8 ">
72
69
< div >
73
70
< label style ="text-align: left !important; "> Game Content: </ label >
74
71
< p > < textarea name ="description " placeholder ="description " rows ="10 "
75
- style ="width: 100%; "> [(ngModel)]=' videogame.description'' </ textarea > </ p >
72
+ style ="width: 100%; "[(ngModel)] =" videogame.description " > </ textarea > </ p >
76
73
</ div >
77
74
</ div >
78
75
</ div >
@@ -82,7 +79,7 @@ <h2 style="text-align: center; padding-top: 2%;">Edit Videogame Form</h2>
82
79
< div >
83
80
< label style ="text-align: left !important; "> Game short description: </ label >
84
81
< p > < textarea name ="shortDescription " placeholder ="shortDescription " rows ="10 "
85
- style ="width: 100%; "> [(ngModel)]='videogame.shortDescription'</ textarea > </ p >
82
+ style ="width: 100%; "[(ngModel)] ='videogame.shortDescription '> </ textarea > </ p >
86
83
</ div >
87
84
</ div >
88
85
</ div >
@@ -92,7 +89,7 @@ <h2 style="text-align: center; padding-top: 2%;">Edit Videogame Form</h2>
92
89
< div >
93
90
< label style ="text-align: left !important; "> In game history: </ label >
94
91
< p > < textarea name ="history " placeholder ="history " rows ="10 "
95
- style ="width: 100%; "> [(ngModel)]='videogame.history'</ textarea > </ p >
92
+ style ="width: 100%; "[(ngModel)] ='videogame.history '> </ textarea > </ p >
96
93
</ div >
97
94
</ div >
98
95
</ div >
@@ -103,13 +100,13 @@ <h2 style="text-align: center; padding-top: 2%;">Edit Videogame Form</h2>
103
100
< div class ="col-md-4 ">
104
101
< div >
105
102
< label > Cpu recommended: </ label >
106
- < p > < textarea name ="cpuR " placeholder ="cpuR " style ="width: 100%; "> [(ngModel)]='videogame.cpuR'</ textarea > </ p >
103
+ < p > < textarea name ="cpuR " placeholder ="cpuR " style ="width: 100%; "[(ngModel)] ='videogame.cpuR '> </ textarea > </ p >
107
104
</ div >
108
105
</ div >
109
106
< div class ="col-md-4 ">
110
107
< div >
111
108
< label > Cpu min: </ label >
112
- < p > < textarea name ="cpuM " placeholder ="cpuM " style ="width: 100%; "> [(ngModel)]='videogame.cpuM'</ textarea > </ p >
109
+ < p > < textarea name ="cpuM " placeholder ="cpuM " style ="width: 100%; "[(ngModel)] ='videogame.cpuM '> </ textarea > </ p >
113
110
</ div >
114
111
</ div >
115
112
</ div >
@@ -118,13 +115,13 @@ <h2 style="text-align: center; padding-top: 2%;">Edit Videogame Form</h2>
118
115
< div class ="col-md-4 ">
119
116
< div >
120
117
< label > Ram recommended: </ label >
121
- < p > < textarea name ="ramR " placeholder ="ramR " style ="width: 100%; "> [(ngModel)]='videogame.ramR'</ textarea > </ p >
118
+ < p > < textarea name ="ramR " placeholder ="ramR " style ="width: 100%; "[(ngModel)] ='videogame.ramR '> </ textarea > </ p >
122
119
</ div >
123
120
</ div >
124
121
< div class ="col-md-4 ">
125
122
< div >
126
123
< label > Ram min: </ label >
127
- < p > < textarea name ="ramM " placeholder ="ramM " style ="width: 100%; "> [(ngModel)]='videogame.ramM'</ textarea > </ p >
124
+ < p > < textarea name ="ramM " placeholder ="ramM " style ="width: 100%; "[(ngModel)] ='videogame.ramM '> </ textarea > </ p >
128
125
</ div >
129
126
</ div >
130
127
</ div >
@@ -133,13 +130,13 @@ <h2 style="text-align: center; padding-top: 2%;">Edit Videogame Form</h2>
133
130
< div class ="col-md-4 ">
134
131
< div >
135
132
< label > Operativ system recommended: </ label >
136
- < p > < textarea name ="ssooR " placeholder ="ssooR " style ="width: 100%; "> [(ngModel)]='videogame.ssooR'</ textarea > </ p >
133
+ < p > < textarea name ="ssooR " placeholder ="ssooR " style ="width: 100%; "[(ngModel)] ='videogame.ssooR '> </ textarea > </ p >
137
134
</ div >
138
135
</ div >
139
136
< div class ="col-md-4 ">
140
137
< div >
141
138
< label > Operativ sistem min: </ label >
142
- < p > < textarea name ="ssooM " placeholder ="ssooM " style ="width: 100%; "> [(ngModel)]='videogame.ssooM'</ textarea > </ p >
139
+ < p > < textarea name ="ssooM " placeholder ="ssooM " style ="width: 100%; "[(ngModel)] ='videogame.ssooM '> </ textarea > </ p >
143
140
</ div >
144
141
</ div >
145
142
</ div >
@@ -148,13 +145,13 @@ <h2 style="text-align: center; padding-top: 2%;">Edit Videogame Form</h2>
148
145
< div class ="col-md-4 ">
149
146
< div >
150
147
< label > Gpu recommended: </ label >
151
- < p > < textarea name ="gpuR " placeholder ="gpuR " style ="width: 100%; "> [(ngModel)]='videogame.gpuR'</ textarea > </ p >
148
+ < p > < textarea name ="gpuR " placeholder ="gpuR " style ="width: 100%; "[(ngModel)] ='videogame.gpuR '> </ textarea > </ p >
152
149
</ div >
153
150
</ div >
154
151
< div class ="col-md-4 ">
155
152
< div >
156
153
< label > Gpu min: </ label >
157
- < p > < textarea name ="gpuM " placeholder ="gpuM " style ="width: 100%; "> [(ngModel)]='videogame.gpuM'</ textarea > </ p >
154
+ < p > < textarea name ="gpuM " placeholder ="gpuM " style ="width: 100%; "[(ngModel)] ='videogame.gpuM '> </ textarea > </ p >
158
155
</ div >
159
156
</ div >
160
157
</ div >
@@ -164,28 +161,28 @@ <h2 style="text-align: center; padding-top: 2%;">Edit Videogame Form</h2>
164
161
< div >
165
162
< label > Storage recommended: </ label >
166
163
< p > < textarea name ="storageR " placeholder ="storageR "
167
- style ="width: 100%; "> [(ngModel)]='videogame.storageR'</ textarea > </ p >
164
+ style ="width: 100%; "[(ngModel)] ='videogame.storageR '> </ textarea > </ p >
168
165
</ div >
169
166
</ div >
170
167
< div class ="col-md-4 ">
171
168
< div >
172
169
< label > Storage min: </ label >
173
170
< p > < textarea name ="storageM " placeholder ="storageM "
174
- style ="width: 100%; "> [(ngModel)]='videogame.storageM'</ textarea > </ p >
171
+ style ="width: 100%; "[(ngModel)] ='videogame.storageM '> </ textarea > </ p >
175
172
</ div >
176
173
</ div >
177
174
</ div >
178
175
179
- <!-- < div class="row mt-3 d-flex justify-content-center">
176
+ < div class ="row mt-3 d-flex justify-content-center ">
180
177
< div class ="col-md-8 ">
181
178
< p > Related News: </ p >
182
179
< select name ="notices " multiple style ="width: 100%; ">
183
- {{#news}}
180
+ <!-- {{#news}}
184
181
<option value="{{ id }}">{{ title }}</option>
185
- {{/news}}
182
+ {{/news}} -->
186
183
</ select >
187
184
</ div >
188
- </div> -->
185
+ </ div >
189
186
190
187
191
188
< div class ="row mt-3 d-flex justify-content-center ">
@@ -205,9 +202,9 @@ <h2 style="text-align: center; padding-top: 2%;">Edit Videogame Form</h2>
205
202
</ div >
206
203
207
204
<!-- <input type="hidden" name="_csrf" value="{{token}}" /> -->
208
- < p >
209
- < button (click) ="cancel () "> Cancel </ button >
210
- < button (click) ="save () "> Save </ button >
205
+ < p style =" align-items: center !important; text-align: center; align-self: center; " >
206
+ < button class =" btn btn-primary " (click) ="save () "> Save </ button >
207
+ < button class =" btn btn-outline-light " style =" color: black; border-color: black; " (click) ="cancel () "> Cancel </ button >
211
208
</ p >
212
209
</ div >
213
210
</ form >
0 commit comments