Skip to content

Commit

Permalink
[Training] fixes course form
Browse files Browse the repository at this point in the history
  • Loading branch information
Elorfin committed Apr 19, 2023
1 parent ba9dbca commit b068e8b
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const CatalogCreation = (props) =>
type: LINK_BUTTON,
icon: 'fa fa-fw fa-plus',
label: trans('add_course', {}, 'cursus'),
target: `${props.path}/new`,
target: `${props.path}/catalog/new`,
group: trans('management'),
primary: true
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const CatalogList = (props) =>
type: LINK_BUTTON,
icon: 'fa fa-fw fa-plus',
label: trans('add_course', {}, 'cursus'),
target: `${props.path}/new`,
target: `${props.path}/catalog/new`,
group: trans('management'),
displayed: props.canEdit,
primary: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const CatalogMain = (props) =>
onEnter: () => props.openForm(null, CourseTypes.defaultProps),
disabled: !props.canEdit,
render: () => (
<CatalogCreation path={`${props.path}/catalog`} />
<CatalogCreation path={props.path} />
)
}, {
path: '/:slug/edit',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ actions.openForm = (courseSlug = null, defaultProps = {}) => (dispatch) => {
[API_REQUEST]: {
url: ['apiv2_cursus_course_get', {field: 'slug', id: courseSlug}],
silent: true,
before: () => dispatch(formActions.resetForm(selectors.FORM_NAME, null, false)),
success: (data) => dispatch(formActions.resetForm(selectors.FORM_NAME, data))
}
})
Expand Down

0 comments on commit b068e8b

Please sign in to comment.