-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #67 from kiloutyg/62-add-the-archiving-commentary-…
…field lets save this and pass to the correction about the lastmodifier stu…
- Loading branch information
Showing
7 changed files
with
173 additions
and
102 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import { Controller } from '@hotwired/stimulus'; | ||
|
||
export default class extends Controller { | ||
|
||
static targets = ['archivingCommentary', 'archivingCommentaryMessage', 'archivingButton']; | ||
|
||
archivingCommentary() { | ||
console.log("archivingCommentary" + this.archivingCommentaryTarget.value); | ||
const commentary = this.archivingCommentaryTarget.value.trim(); | ||
const isValid = commentary.length > 5; | ||
|
||
if (isValid) { | ||
this.archivingCommentaryMessageTarget.textContent = ""; | ||
this.archivingButtonTarget.disabled = false; | ||
this.archivingButtonTarget.hidden = false; | ||
} else { | ||
this.archivingCommentaryMessageTarget.textContent = "Format invalide. Veuillez saisir un commentaire plus complet."; | ||
this.archivingCommentaryMessageTarget.style.color = "red"; // Display the message in red color. | ||
} | ||
} | ||
} |
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
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
Empty file.
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
Oops, something went wrong.