Skip to content

Commit 5935aa1

Browse files
authored
Merge pull request #389 from dbarzin/dev
Dev
2 parents 8961589 + a76bd70 commit 5935aa1

File tree

7 files changed

+17
-12
lines changed

7 files changed

+17
-12
lines changed

app/Http/Controllers/ActionController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,7 @@ public function store(Request $request)
400400
// for Postegres
401401
$action->criticity = 0;
402402
$action->status = 0;
403-
403+
404404
// Save
405405
$action->save();
406406

app/Http/Controllers/ControlController.php

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,8 @@ public function create()
329329
->get();
330330
foreach ($attributes as $key) {
331331
foreach (explode(' ', $key->values) as $value) {
332-
array_push($values, $value);
332+
if (strlen($value)>0)
333+
array_push($values, $value);
333334
}
334335
}
335336
sort($values);
@@ -592,7 +593,8 @@ public function edit(int $id)
592593
->get();
593594
foreach ($attributes as $key) {
594595
foreach (explode(' ', $key->values) as $value) {
595-
array_push($values, $value);
596+
if (strlen($value)>0)
597+
array_push($values, $value);
596598
}
597599
}
598600
sort($values);
@@ -650,7 +652,8 @@ public function clone(Request $request)
650652
->get();
651653
foreach ($attributes as $key) {
652654
foreach (explode(' ', $key->values) as $value) {
653-
array_push($values, $value);
655+
if (strlen($value)>0)
656+
array_push($values, $value);
654657
}
655658
}
656659
sort($values);

app/Http/Controllers/MeasureController.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,8 @@ public function create()
101101
->get();
102102
foreach ($attributes as $key) {
103103
foreach (explode(' ', $key->values) as $value) {
104-
array_push($values, $value);
104+
if (strlen($value)>0)
105+
array_push($values, $value);
105106
}
106107
}
107108
sort($values);
@@ -241,7 +242,8 @@ public function edit(int $id)
241242
->get();
242243
foreach ($attributes as $key) {
243244
foreach (explode(' ', $key->values) as $value) {
244-
array_push($values, $value);
245+
if (strlen($value)>0)
246+
array_push($values, $value);
245247
}
246248
}
247249
sort($values);

resources/views/actions/create.blade.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,11 @@
3838
<strong>{{ trans('cruds.action.fields.due_date') }}</strong>
3939
</td>
4040
<td>
41-
<input type="text" data-role="calendarpicker" name="due_date" value=" {{ old('due_date') }}" data-input-format="%Y-%m-%d">
41+
<input type="text"
42+
data-role="calendarpicker"
43+
name="due_date"
44+
value=" {{ old('due_date') }}"
45+
data-format="YYYY-MM-DD"/>
4246
</td>
4347
</tr>
4448
</table>

resources/views/actions/edit.blade.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,7 @@
4343
data-role="calendarpicker"
4444
name="due_date"
4545
value="{{$action->due_date}}"
46-
data-format="YYYY-MM-DD"
47-
data-inputFormat="YYYY-MM-DD"/>
46+
data-format="YYYY-MM-DD"/>
4847
</td>
4948
</tr>
5049
</table>

resources/views/controls/create.blade.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,6 @@
9393
<input
9494
data-role="calendarpicker"
9595
data-format="YYYY-MM-DD"
96-
data-inputFormat="YYYY-MM-DD"
9796
name="plan_date"
9897
value="{{ old('plan_date') }}"/>
9998
</div>

resources/views/controls/edit.blade.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,6 @@
9393
<input
9494
data-role="calendarpicker"
9595
data-format="YYYY-MM-DD"
96-
data-inputFormat="YYYY-MM-DD"
9796
name="plan_date"
9897
value="{{ $control->plan_date }}"
9998
/>
@@ -107,7 +106,6 @@
107106
<input
108107
data-role="calendarpicker"
109108
data-format="YYYY-MM-DD"
110-
data-inputFormat="YYYY-MM-DD"
111109
name="realisation_date"
112110
value="{{ $control->realisation_date == '0000-00-00' ? null : $control->realisation_date}}"
113111
data-clear-button="true"

0 commit comments

Comments
 (0)