Generate question bank domain model from JDL
This commit is contained in:
1 parent
1d97cc4e31
commit
1d74d8f04b
160 files changed
+26900
-2
No files matched your search
@@ -0,0 +1,79 @@
|
||||
<template>
|
||||
<div class="d-flex justify-content-center">
|
||||
<div class="col-8">
|
||||
<form name="editForm" novalidate @submit.prevent="save()">
|
||||
<h2 id="questionBankApp.subject.home.createOrEditLabel" data-cy="SubjectCreateUpdateHeading">
|
||||
{{ t$('questionBankApp.subject.home.createOrEditLabel') }}
|
||||
</h2>
|
||||
<div>
|
||||
<div class="mb-3" v-if="subject.id">
|
||||
<label for="id">{{ t$('global.field.id') }}</label>
|
||||
<input type="text" class="form-control" id="id" name="id" v-model="subject.id" readonly />
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="form-control-label" for="subject-name">{{ t$('questionBankApp.subject.name') }}</label>
|
||||
<input
|
||||
type="text"
|
||||
class="form-control"
|
||||
name="name"
|
||||
id="subject-name"
|
||||
data-cy="name"
|
||||
:class="{ valid: !v$.name.$invalid, invalid: v$.name.$invalid }"
|
||||
v-model="v$.name.$model"
|
||||
required
|
||||
/>
|
||||
<div v-if="v$.name.$anyDirty && v$.name.$invalid">
|
||||
<small class="form-text text-danger" v-for="error of v$.name.$errors" :key="error.$uid">{{ error.$message }}</small>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="form-control-label" for="subject-description">{{ t$('questionBankApp.subject.description') }}</label>
|
||||
<input
|
||||
type="text"
|
||||
class="form-control"
|
||||
name="description"
|
||||
id="subject-description"
|
||||
data-cy="description"
|
||||
:class="{ valid: !v$.description.$invalid, invalid: v$.description.$invalid }"
|
||||
v-model="v$.description.$model"
|
||||
/>
|
||||
<div v-if="v$.description.$anyDirty && v$.description.$invalid">
|
||||
<small class="form-text text-danger" v-for="error of v$.description.$errors" :key="error.$uid">{{ error.$message }}</small>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mb-3 form-check">
|
||||
<input
|
||||
type="checkbox"
|
||||
class="form-check-input"
|
||||
name="active"
|
||||
id="subject-active"
|
||||
data-cy="active"
|
||||
:class="{ valid: !v$.active.$invalid, invalid: v$.active.$invalid }"
|
||||
v-model="v$.active.$model"
|
||||
required
|
||||
/>
|
||||
<label class="form-check-label" for="subject-active">{{ t$('questionBankApp.subject.active') }}</label>
|
||||
<div v-if="v$.active.$anyDirty && v$.active.$invalid">
|
||||
<small class="form-text text-danger" v-for="error of v$.active.$errors" :key="error.$uid">{{ error.$message }}</small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<button type="button" id="cancel-save" data-cy="entityCreateCancelButton" class="btn btn-secondary" @click="previousState()">
|
||||
<font-awesome-icon icon="ban"></font-awesome-icon> <span>{{ t$('entity.action.cancel') }}</span>
|
||||
</button>
|
||||
<button
|
||||
type="submit"
|
||||
id="save-entity"
|
||||
data-cy="entityCreateSaveButton"
|
||||
:disabled="v$.$invalid || isSaving"
|
||||
class="btn btn-primary"
|
||||
>
|
||||
<font-awesome-icon icon="save"></font-awesome-icon> <span>{{ t$('entity.action.save') }}</span>
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts" src="./subject-update.component.ts"></script>
|
||||
Reference in new issue
Block a user