Fixed 0 periods plan
This commit is contained in:
parent
17d159ac6a
commit
9fee6fb8b5
2
amd/build/studyplan-editor-components.min.js
vendored
2
amd/build/studyplan-editor-components.min.js
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -688,7 +688,7 @@ export default {
|
|||
},
|
||||
numberFilter(value){
|
||||
return value;
|
||||
}
|
||||
},
|
||||
}
|
||||
,
|
||||
template:
|
||||
|
@ -749,7 +749,12 @@ export default {
|
|||
<b-row>
|
||||
<b-col cols="4">{{ text.studyplan_slots}}</b-col>
|
||||
<b-col cols="8">
|
||||
<b-form-input type=number v-model="editdata.periods"></b-form-input>
|
||||
<b-form-input
|
||||
min="1"
|
||||
type="number"
|
||||
no-wheel
|
||||
v-model="editdata.periods"
|
||||
></b-form-input>
|
||||
</b-col>
|
||||
</b-row>
|
||||
<b-row>
|
||||
|
|
|
@ -234,10 +234,10 @@ class studyplanpage {
|
|||
$info[$f] = $fields[$f];
|
||||
}
|
||||
}
|
||||
if (!isset($addable['periods'])) {
|
||||
$addable['periods'] = 4;
|
||||
} else if ($addable['periods'] < 1) {
|
||||
$addable['periods'] = 1;
|
||||
if (!isset($info['periods'])) {
|
||||
$info['periods'] = 4;
|
||||
} else if ($info['periods'] < 1) {
|
||||
$info['periods'] = 1;
|
||||
}
|
||||
|
||||
$id = $DB->insert_record(self::TABLE, $info);
|
||||
|
|
Loading…
Reference in New Issue
Block a user