-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
447 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
{{! template-lint-disable no-at-ember-render-modifiers }} | ||
{{! TODO: Use this documentation to remove usage of did-insert and did-update | ||
https://guides.emberjs.com/release/components/template-lifecycle-dom-and-modifiers/#toc_communicating-between-elements-in-a-component}} | ||
<input {{did-insert this.updateState}} {{did-update this.updateState @state}} type="checkbox" ...attributes /> | ||
<PixInput {{did-insert this.updateState}} {{did-update this.updateState @state}} type="checkbox" ...attributes /> |
227 changes: 227 additions & 0 deletions
227
admin/app/components/organizations/information-section-edit.hbs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,227 @@ | ||
{{! template-lint-disable no-builtin-form-components}} | ||
{{! TODO: Use PixUI components instead }} | ||
<div class="organization__edit-form"> | ||
<form class="form" {{on "submit" this.updateOrganization}}> | ||
|
||
<span class="form__instructions"> | ||
Les champs marqués de | ||
<abbr title="obligatoire" class="mandatory-mark" aria-hidden="true">*</abbr> | ||
sont obligatoires. | ||
</span> | ||
|
||
<div class="form-field"> | ||
<label for="name" class="form-field__label"> | ||
<abbr title="obligatoire" class="mandatory-mark" aria-hidden="true">*</abbr> | ||
Nom | ||
</label> | ||
{{#if (v-get this.form "name" "isInvalid")}} | ||
<div class="form-field__error"> | ||
{{v-get this.form "name" "message"}} | ||
</div> | ||
{{/if}} | ||
<PixInput | ||
id="name" | ||
@type="text" | ||
class={{if (v-get this.form "name" "isInvalid") "form-control is-invalid" "form-control"}} | ||
@value={{this.form.name}} | ||
required={{true}} | ||
/> | ||
</div> | ||
|
||
<div class="form-field"> | ||
<label for="externalId" class="form-field__label">Identifiant externe</label> | ||
{{#if (v-get this.form "externalId" "isInvalid")}} | ||
<div class="form-field__error"> | ||
{{v-get this.form "externalId" "message"}} | ||
</div> | ||
{{/if}} | ||
<PixInput | ||
id="externalId" | ||
@type="text" | ||
class={{if (v-get this.form "externalId" "isInvalid") "form-control is-invalid" "form-control"}} | ||
@value={{this.form.externalId}} | ||
/> | ||
</div> | ||
|
||
<div class="form-field"> | ||
<label for="provinceCode" class="form-field__label">Département (en 3 chiffres)</label> | ||
{{#if (v-get this.form "provinceCode" "isInvalid")}} | ||
<div class="form-field__error"> | ||
{{v-get this.form "provinceCode" "message"}} | ||
</div> | ||
{{/if}} | ||
<PixInput | ||
id="provinceCode" | ||
@type="text" | ||
class={{if (v-get this.form "provinceCode" "isInvalid") "form-control is-invalid" "form-control"}} | ||
@value={{this.form.provinceCode}} | ||
/> | ||
</div> | ||
|
||
<div class="form-field"> | ||
<label for="dataProtectionOfficerFirstName" class="form-field__label">Prénom du DPO</label> | ||
{{#if (v-get this.form "dataProtectionOfficerFirstName" "isInvalid")}} | ||
<div class="form-field__error"> | ||
{{v-get this.form "dataProtectionOfficerFirstName" "message"}} | ||
</div> | ||
{{/if}} | ||
<PixInput | ||
id="dataProtectionOfficerFirstName" | ||
@type="text" | ||
class={{if | ||
(v-get this.form "dataProtectionOfficerFirstName" "isInvalid") | ||
"form-control is-invalid" | ||
"form-control" | ||
}} | ||
@value={{this.form.dataProtectionOfficerFirstName}} | ||
/> | ||
</div> | ||
|
||
<div class="form-field"> | ||
<label for="dataProtectionOfficerLastName" class="form-field__label">Nom du DPO</label> | ||
{{#if (v-get this.form "dataProtectionOfficerLastName" "isInvalid")}} | ||
<div class="form-field__error"> | ||
{{v-get this.form "dataProtectionOfficerLastName" "message"}} | ||
</div> | ||
{{/if}} | ||
<PixInput | ||
id="dataProtectionOfficerLastName" | ||
@type="text" | ||
class={{if | ||
(v-get this.form "dataProtectionOfficerLastName" "isInvalid") | ||
"form-control is-invalid" | ||
"form-control" | ||
}} | ||
@value={{this.form.dataProtectionOfficerLastName}} | ||
/> | ||
</div> | ||
|
||
<div class="form-field"> | ||
<label for="dataProtectionOfficerEmail" class="form-field__label">Adresse e-mail du DPO</label> | ||
{{#if (v-get this.form "dataProtectionOfficerEmail" "isInvalid")}} | ||
<div class="form-field__error"> | ||
{{v-get this.form "dataProtectionOfficerEmail" "message"}} | ||
</div> | ||
{{/if}} | ||
<PixInput | ||
id="dataProtectionOfficerEmail" | ||
@type="text" | ||
class={{if (v-get this.form "dataProtectionOfficerEmail" "isInvalid") "form-control is-invalid" "form-control"}} | ||
@value={{this.form.dataProtectionOfficerEmail}} | ||
/> | ||
</div> | ||
|
||
<div class="form-field"> | ||
<label for="credits" class="form-field__label">Crédits</label> | ||
{{#if (v-get this.form "credit" "isInvalid")}} | ||
<div class="form-field__error"> | ||
{{v-get this.form "credit" "message"}} | ||
</div> | ||
{{/if}} | ||
<PixInput | ||
id="credits" | ||
@type="number" | ||
class={{if (v-get this.form "credit" "isInvalid") "form-control is-invalid" "form-control"}} | ||
@value={{this.form.credit}} | ||
/> | ||
</div> | ||
|
||
<div class="form-field"> | ||
<label for="documentationUrl" class="form-field__label">Lien vers la documentation</label> | ||
{{#if (v-get this.form "documentationUrl" "isInvalid")}} | ||
<div class="form-field__error"> | ||
{{v-get this.form "documentationUrl" "message"}} | ||
</div> | ||
{{/if}} | ||
<PixInput | ||
id="documentationUrl" | ||
@type="text" | ||
class={{if (v-get this.form "documentationUrl" "isInvalid") "form-control is-invalid" "form-control"}} | ||
@value={{this.form.documentationUrl}} | ||
/> | ||
</div> | ||
|
||
<div class="form-field organization-edit-form__checkbox"> | ||
<PixInput | ||
id="showSkills" | ||
@type="checkbox" | ||
class={{if (v-get this.form "showSkills" "isInvalid") "form-control is-invalid" "form-control"}} | ||
@checked={{this.form.showSkills}} | ||
/> | ||
<label for="showSkills" class="form-field__label">Affichage des acquis dans l'export de résultats</label> | ||
{{#if (v-get this.form "showSkills" "isInvalid")}} | ||
<div class="form-field__error"> | ||
{{v-get this.form "showSkills" "message"}} | ||
</div> | ||
{{/if}} | ||
</div> | ||
|
||
<div class="form-field"> | ||
<PixSelect | ||
@options={{this.identityProviderOptions}} | ||
@value={{this.form.identityProviderForCampaigns}} | ||
@onChange={{this.onChangeIdentityProvider}} | ||
@hideDefaultOption={{true}} | ||
> | ||
<:label>SSO</:label> | ||
</PixSelect> | ||
</div> | ||
|
||
<div class="form-field"> | ||
<label for="email" class="form-field__label">Adresse e-mail d'activation SCO</label> | ||
{{#if (v-get this.form "email" "isInvalid")}} | ||
<div class="form-field__error"> | ||
{{v-get this.form "email" "message"}} | ||
</div> | ||
{{/if}} | ||
<PixInput | ||
id="email" | ||
@type="text" | ||
class={{if (v-get this.form "email" "isInvalid") "form-control is-invalid" "form-control"}} | ||
@value={{this.form.email}} | ||
/> | ||
</div> | ||
|
||
{{#if (or @organization.isOrganizationSCO @organization.isOrganizationSUP)}} | ||
<div class="form-field organization-edit-form__checkbox"> | ||
<PixInput | ||
id="isManagingStudents" | ||
@type="checkbox" | ||
class={{if (v-get this.form "isManagingStudents" "isInvalid") "form-control is-invalid" "form-control"}} | ||
@checked={{this.form.isManagingStudents}} | ||
/> | ||
<label for="isManagingStudents" class="form-field__label">Gestion d’élèves/étudiants</label> | ||
{{#if (v-get this.form "isManagingStudents" "isInvalid")}} | ||
<div class="form-field__error"> | ||
{{v-get this.form "isManagingStudents" "message"}} | ||
</div> | ||
{{/if}} | ||
</div> | ||
{{/if}} | ||
|
||
<div class="form-field organization-edit-form__checkbox"> | ||
<PixCheckbox | ||
@id="isMultipleSendingAssessmentEnabled" | ||
{{on "change" this.onChangeMultipleSendingAssessment}} | ||
@checked={{this.form.isMultipleSendingAssessmentEnabled}} | ||
@class="form-field__label" | ||
> | ||
<:label>Activer l'envoi multiple pour les campagnes de type évaluation</:label> | ||
</PixCheckbox> | ||
</div> | ||
<div class="form-field organization-edit-form__checkbox"> | ||
<PixCheckbox | ||
@id="isPlacesManagementEnabled" | ||
{{on "change" this.onChangePlacesManagement}} | ||
@checked={{this.form.isPlacesManagementEnabled}} | ||
@class="form-field__label" | ||
> | ||
<:label>Activer la page Places sur PixOrga</:label> | ||
</PixCheckbox> | ||
</div> | ||
<div class="form-actions"> | ||
<PixButton @size="small" @variant="secondary" @triggerAction={{this.closeAndResetForm}}>Annuler</PixButton> | ||
<PixButton @type="submit" @size="small" @variant="success">Enregistrer</PixButton> | ||
</div> | ||
</form> | ||
</div> |
102 changes: 102 additions & 0 deletions
102
admin/app/components/target-profiles/create-target-profile-form.hbs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
<form class="admin-form admin-form--target-profile" {{on "submit" this.onSubmit}}> | ||
<p class="admin-form__mandatory-text"> | ||
Les champs marqués de | ||
<span class="mandatory-mark">*</span> | ||
sont obligatoires. | ||
</p> | ||
<section class="admin-form__content admin-form__content--with-counters"> | ||
<Card class="admin-form__card" @title="Information sur le profil cible"> | ||
<PixInput | ||
@id="targetProfileName" | ||
required={{true}} | ||
@requiredLabel="Champ obligatoire" | ||
aria-required={{true}} | ||
{{on "change" (fn this.updateTargetProfileValue "name")}} | ||
> | ||
<:label>Nom :</:label> | ||
</PixInput> | ||
|
||
<PixSelect | ||
@onChange={{this.updateCategory}} | ||
@value={{@targetProfile.category}} | ||
@options={{this.optionsList}} | ||
@placeholder="-" | ||
@hideDefaultOption={{true}} | ||
required={{true}} | ||
@requiredLabel="Champ obligatoire" | ||
aria-required={{true}} | ||
> | ||
<:label>Catégorie :</:label> | ||
</PixSelect> | ||
<div class="create-target-profile__is-public"> | ||
<label for="isPublic">Public :</label> | ||
<PixInput @type="checkbox" @checked={{@targetProfile.isPublic}} id="isPublic" /> | ||
<span>Un profil cible marqué comme public sera affecté à toutes les organisations.</span> | ||
</div> | ||
<PixInput | ||
@id="organizationId" | ||
type="number" | ||
@errorMessage="" | ||
required={{true}} | ||
@requiredLabel="Champ obligatoire" | ||
aria-required={{true}} | ||
placeholder="7777" | ||
{{on "change" (fn this.updateTargetProfileValue "ownerOrganizationId")}} | ||
> | ||
<:label>Identifiant de l'organisation de référence :</:label> | ||
</PixInput> | ||
</Card> | ||
|
||
<Common::TubesSelection | ||
@frameworks={{@frameworks}} | ||
@onChange={{this.updateTubes}} | ||
@displayJsonImportButton={{true}} | ||
@displayDeviceCompatibility={{true}} | ||
@displaySkillDifficultyAvailability={{true}} | ||
/> | ||
|
||
<Card class="admin-form__card" @title="Personnalisation"> | ||
<PixInput | ||
@id="imageUrl" | ||
@subLabel="L'url à saisir doit être celle d'OVH. Veuillez | ||
vous rapprocher des équipes tech et produit pour la réalisation de celle-ci." | ||
{{on "change" (fn this.updateTargetProfileValue "imageUrl")}} | ||
> | ||
<:label>Lien de l'image du profil cible :</:label> | ||
</PixInput> | ||
|
||
<PixTextarea | ||
@id="description" | ||
@maxlength="500" | ||
rows="4" | ||
@value={{@targetProfile.description}} | ||
{{on "change" (fn this.updateTargetProfileValue "description")}} | ||
> | ||
<:label>Description :</:label> | ||
</PixTextarea> | ||
<PixTextarea | ||
@id="comment" | ||
@maxlength="500" | ||
rows="4" | ||
@value={{@targetProfile.comment}} | ||
{{on "change" (fn this.updateTargetProfileValue "comment")}} | ||
> | ||
<:label>Commentaire (usage interne) :</:label> | ||
</PixTextarea> | ||
</Card> | ||
</section> | ||
<section class="admin-form__actions"> | ||
<PixButton @variant="secondary" @size="large" @triggerAction={{@onCancel}}> | ||
Annuler | ||
</PixButton> | ||
<PixButton | ||
@variant="success" | ||
@size="large" | ||
@type="submit" | ||
@isLoading={{this.submitting}} | ||
@triggerAction={{this.noop}} | ||
> | ||
Créer le profil cible | ||
</PixButton> | ||
</section> | ||
</form> |
Oops, something went wrong.