Skip to content

Commit

Permalink
Merge pull request #1090 from iamejaaz/add-required-attribute
Browse files Browse the repository at this point in the history
feat: add required indicator on the course add page
  • Loading branch information
pateljannat authored Oct 31, 2024
2 parents 7aa5f4d + dbd9632 commit 8f6f35d
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 5 deletions.
2 changes: 1 addition & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"codemirror-editor-vue3": "^2.8.0",
"dayjs": "^1.11.6",
"feather-icons": "^4.28.0",
"frappe-ui": "^0.1.69",
"frappe-ui": "^0.1.72",
"lucide-vue-next": "^0.383.0",
"markdown-it": "^14.0.0",
"pinia": "^2.0.33",
Expand Down
4 changes: 4 additions & 0 deletions frontend/src/components/Controls/MultiSelect.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<div>
<label class="block mb-1" :class="labelClasses" v-if="label">
{{ label }}
<span class="text-red-500" v-if="required">*</span>
</label>
<div class="grid grid-cols-3 gap-1">
<Button
Expand Down Expand Up @@ -115,6 +116,9 @@ const props = defineProps({
type: Function,
default: (value) => `${value} is an Invalid value`,
},
required: {
type: Boolean,
},
})
const values = defineModel()
Expand Down
5 changes: 5 additions & 0 deletions frontend/src/pages/CourseForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
v-model="course.title"
:label="__('Title')"
class="mb-4"
:required="true"
/>
<FormControl
v-model="course.short_introduction"
Expand All @@ -33,10 +34,12 @@
)
"
class="mb-4"
:required="true"
/>
<div class="mb-4">
<div class="mb-1.5 text-sm text-gray-600">
{{ __('Course Description') }}
<span class="text-red-500">*</span>
</div>
<TextEditor
:content="course.description"
Expand All @@ -49,6 +52,7 @@
<div class="mb-4">
<div class="text-xs text-gray-600 mb-2">
{{ __('Course Image') }}
<span class="text-red-500">*</span>
</div>
<FileUploader
v-if="!course.course_image"
Expand Down Expand Up @@ -140,6 +144,7 @@
v-model="instructors"
doctype="User"
:label="__('Instructors')"
:required="true"
/>
</div>
<div class="container border-t">
Expand Down
8 changes: 4 additions & 4 deletions frontend/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1224,10 +1224,10 @@ fraction.js@^4.3.7:
resolved "https://registry.yarnpkg.com/fraction.js/-/fraction.js-4.3.7.tgz#06ca0085157e42fda7f9e726e79fefc4068840f7"
integrity sha512-ZsDfxO51wGAXREY55a7la9LScWpwv9RxIrYABrlvOFBlH/ShPnrtsXeuUIfXKKOVicNxQ+o8JTbJvjS4M89yew==

frappe-ui@^0.1.69:
version "0.1.69"
resolved "https://registry.yarnpkg.com/frappe-ui/-/frappe-ui-0.1.69.tgz#bfc6d19dff97d2666c36da63f5de62f819539406"
integrity sha512-MKHYTcRvmccZwTYlIcmf4OCbJQH5eqKXsq3Cj2lbnmoWuuTh9m7T3AoRKEwOIlZ0mSGCH9yzaF2BINBXGpIJdQ==
frappe-ui@^0.1.72:
version "0.1.72"
resolved "https://registry.yarnpkg.com/frappe-ui/-/frappe-ui-0.1.72.tgz#f5550056ddee7ad4341f2c1825d046404d221820"
integrity sha512-XWYKmCjw3ViD+/+tZMUiYqwHFlMGMsVuazOYiN5bKlE+aiheJsnHlOOUyQswYX1Y7jNxuC7gGpSLNg2ZpXA7hA==
dependencies:
"@headlessui/vue" "^1.7.14"
"@popperjs/core" "^2.11.2"
Expand Down

0 comments on commit 8f6f35d

Please sign in to comment.