-
-
Notifications
You must be signed in to change notification settings - Fork 218
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 #34631 from dimagi/jls/b5-errors
[B5] web apps: errors in form entry
- Loading branch information
Showing
38 changed files
with
260 additions
and
74 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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
5 changes: 4 additions & 1 deletion
5
corehq/apps/cloudcare/templates/cloudcare/partials/form_entry/bootstrap5/entry_date.html
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,7 +1,10 @@ | ||
<script type="text/html" id="date-entry-ko-template"> | ||
<div class="input-group"> | ||
<input type="text" class="form-control" | ||
data-bind="attr: {id: entryId, 'aria-required': $parent.required() ? 'true' : 'false'}"/> | ||
data-bind=" | ||
css: { 'is-invalid': $parent.hasError() }, | ||
attr: {id: entryId, 'aria-required': $parent.required() ? 'true' : 'false'}, | ||
"/> | ||
<span class="input-group-text"><i class="fa-solid fa-calendar-days"></i></span> | ||
</div> | ||
</script> |
5 changes: 4 additions & 1 deletion
5
corehq/apps/cloudcare/templates/cloudcare/partials/form_entry/bootstrap5/entry_datetime.html
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,6 +1,9 @@ | ||
<script type="text/html" id="datetime-entry-ko-template"> | ||
<div class="input-group"> | ||
<input type="text" class="form-control" data-bind="attr: { id: entryId, 'aria-required': $parent.required() ? 'true' : 'false' }"/> | ||
<input type="text" class="form-control" data-bind=" | ||
css: { 'is-invalid': $parent.hasError() }, | ||
attr: { id: entryId, 'aria-required': $parent.required() ? 'true' : 'false' }, | ||
"/> | ||
<span class="input-group-text"><i class="fcc fcc-fd-datetime"></i></span> | ||
</div> | ||
</script> |
14 changes: 14 additions & 0 deletions
14
corehq/apps/cloudcare/templates/cloudcare/partials/form_entry/bootstrap5/entry_dropdown.html
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,14 @@ | ||
<script type="text/html" id="dropdown-entry-ko-template"> | ||
<select class="form-control" data-bind=" | ||
foreach: options, | ||
value: rawAnswer, | ||
css: { 'is-invalid': $parent.hasError() }, | ||
attr: { | ||
id: entryId, | ||
'aria-required': $parent.required() ? 'true' : 'false', | ||
}, | ||
valueAllowUnset: true, | ||
"> | ||
<option data-bind="value: id, text: text"></option> | ||
</select> | ||
</script> |
5 changes: 4 additions & 1 deletion
5
...ps/cloudcare/templates/cloudcare/partials/form_entry/bootstrap5/entry_ethiopian_date.html
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,6 +1,9 @@ | ||
<script type="text/html" id="ethiopian-date-entry-ko-template"> | ||
<div class="input-group"> | ||
<input type="text" class="form-control" autocomplete="off" data-bind="attr: { id: entryId, 'aria-required': $parent.required() ? 'true' : 'false' }"/> | ||
<input type="text" class="form-control" autocomplete="off" data-bind=" | ||
css: { 'is-invalid': $parent.hasError() }, | ||
attr: { id: entryId, 'aria-required': $parent.required() ? 'true' : 'false' }, | ||
"/> | ||
<span class="input-group-text"><i class="fa-solid fa-calendar-days"></i></span> | ||
</div> | ||
</script> |
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
13 changes: 13 additions & 0 deletions
13
...pps/cloudcare/templates/cloudcare/partials/form_entry/bootstrap5/entry_multidropdown.html
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,13 @@ | ||
<script type="text/html" id="multidropdown-entry-ko-template"> | ||
<select multiple class="form-control" data-bind=" | ||
options: choices, | ||
selectedOptions: rawAnswer, | ||
css: { 'is-invalid': $parent.hasError() }, | ||
attr: { | ||
id: entryId, | ||
'aria-required': $parent.required() ? 'true' : 'false', | ||
}, | ||
valueAllowUnset: true, | ||
"> | ||
</select> | ||
</script> |
11 changes: 11 additions & 0 deletions
11
corehq/apps/cloudcare/templates/cloudcare/partials/form_entry/bootstrap5/entry_password.html
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,11 @@ | ||
<script type="text/html" id="password-entry-ko-template"> | ||
<input type="password" class="form-control" data-bind=" | ||
value: $data.rawAnswer, | ||
valueUpdate: valueUpdate, | ||
css: { 'is-invalid': $parent.hasError() }, | ||
attr: { | ||
id: entryId, | ||
'aria-required': $parent.required() ? 'true' : 'false', | ||
}, | ||
"/> | ||
</script> |
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
13 changes: 13 additions & 0 deletions
13
corehq/apps/cloudcare/templates/cloudcare/partials/form_entry/bootstrap5/entry_str.html
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,13 @@ | ||
<script type="text/html" id="str-entry-ko-template"> | ||
<input autocomplete="off" type="text" class="form-control" data-bind=" | ||
value: $data.rawAnswer, | ||
valueUpdate: valueUpdate, | ||
css: { 'is-invalid': $parent.hasError() }, | ||
attr: { | ||
maxlength: lengthLimit, | ||
id: entryId, | ||
placeholder: placeholderText, | ||
'aria-required': $parent.required() ? 'true' : 'false', | ||
} | ||
"/> | ||
</script> |
13 changes: 13 additions & 0 deletions
13
corehq/apps/cloudcare/templates/cloudcare/partials/form_entry/bootstrap5/entry_text.html
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,13 @@ | ||
<script type="text/html" id="text-entry-ko-template"> | ||
<textarea class="textfield form-control vertical-resize" data-bind=" | ||
value: $data.rawAnswer, | ||
valueUpdate: valueUpdate, | ||
css: { 'is-invalid': $parent.hasError() }, | ||
attr: { | ||
placeholder: placeholderText, | ||
maxlength: lengthLimit, | ||
id: entryId, | ||
'aria-required': $parent.required() ? 'true' : 'false', | ||
}, | ||
"></textarea> | ||
</script> |
5 changes: 4 additions & 1 deletion
5
corehq/apps/cloudcare/templates/cloudcare/partials/form_entry/bootstrap5/entry_time.html
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,6 +1,9 @@ | ||
<script type="text/html" id="time-entry-ko-template"> | ||
<div class="input-group"> | ||
<input type="text" class="form-control" data-bind="attr: { id: entryId, 'aria-required': $parent.required() ? 'true' : 'false' }"/> | ||
<input type="text" class="form-control" data-bind=" | ||
attr: { id: entryId, 'aria-required': $parent.required() ? 'true' : 'false' }, | ||
css: { 'is-invalid': $parent.hasError() }, | ||
"/> | ||
<span class="input-group-text"><i class="fa-regular fa-clock"></i></span> | ||
</div> | ||
</script> |
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
10 changes: 9 additions & 1 deletion
10
...ests/data/bootstrap5_diffs/cloudcare/partials/form_entry/entry_choice_label.html.diff.txt
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
9 changes: 7 additions & 2 deletions
9
...webapp/tests/data/bootstrap5_diffs/cloudcare/partials/form_entry/entry_date.html.diff.txt
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,10 +1,15 @@ | ||
--- | ||
+++ | ||
@@ -2,6 +2,6 @@ | ||
@@ -1,7 +1,10 @@ | ||
<script type="text/html" id="date-entry-ko-template"> | ||
<div class="input-group"> | ||
<input type="text" class="form-control" | ||
data-bind="attr: {id: entryId, 'aria-required': $parent.required() ? 'true' : 'false'}"/> | ||
- data-bind="attr: {id: entryId, 'aria-required': $parent.required() ? 'true' : 'false'}"/> | ||
- <span class="input-group-addon"><i class="fa-solid fa-calendar-days"></i></span> | ||
+ data-bind=" | ||
+ css: { 'is-invalid': $parent.hasError() }, | ||
+ attr: {id: entryId, 'aria-required': $parent.required() ? 'true' : 'false'}, | ||
+ "/> | ||
+ <span class="input-group-text"><i class="fa-solid fa-calendar-days"></i></span> | ||
</div> | ||
</script> |
8 changes: 6 additions & 2 deletions
8
...pp/tests/data/bootstrap5_diffs/cloudcare/partials/form_entry/entry_datetime.html.diff.txt
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,10 +1,14 @@ | ||
--- | ||
+++ | ||
@@ -1,6 +1,6 @@ | ||
@@ -1,6 +1,9 @@ | ||
<script type="text/html" id="datetime-entry-ko-template"> | ||
<div class="input-group"> | ||
<input type="text" class="form-control" data-bind="attr: { id: entryId, 'aria-required': $parent.required() ? 'true' : 'false' }"/> | ||
- <input type="text" class="form-control" data-bind="attr: { id: entryId, 'aria-required': $parent.required() ? 'true' : 'false' }"/> | ||
- <span class="input-group-addon"><i class="fcc fcc-fd-datetime"></i></span> | ||
+ <input type="text" class="form-control" data-bind=" | ||
+ css: { 'is-invalid': $parent.hasError() }, | ||
+ attr: { id: entryId, 'aria-required': $parent.required() ? 'true' : 'false' }, | ||
+ "/> | ||
+ <span class="input-group-text"><i class="fcc fcc-fd-datetime"></i></span> | ||
</div> | ||
</script> |
10 changes: 10 additions & 0 deletions
10
...pp/tests/data/bootstrap5_diffs/cloudcare/partials/form_entry/entry_dropdown.html.diff.txt
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,10 @@ | ||
--- | ||
+++ | ||
@@ -2,6 +2,7 @@ | ||
<select class="form-control" data-bind=" | ||
foreach: options, | ||
value: rawAnswer, | ||
+ css: { 'is-invalid': $parent.hasError() }, | ||
attr: { | ||
id: entryId, | ||
'aria-required': $parent.required() ? 'true' : 'false', |
8 changes: 6 additions & 2 deletions
8
...ts/data/bootstrap5_diffs/cloudcare/partials/form_entry/entry_ethiopian_date.html.diff.txt
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,10 +1,14 @@ | ||
--- | ||
+++ | ||
@@ -1,6 +1,6 @@ | ||
@@ -1,6 +1,9 @@ | ||
<script type="text/html" id="ethiopian-date-entry-ko-template"> | ||
<div class="input-group"> | ||
<input type="text" class="form-control" autocomplete="off" data-bind="attr: { id: entryId, 'aria-required': $parent.required() ? 'true' : 'false' }"/> | ||
- <input type="text" class="form-control" autocomplete="off" data-bind="attr: { id: entryId, 'aria-required': $parent.required() ? 'true' : 'false' }"/> | ||
- <span class="input-group-addon"><i class="fa-solid fa-calendar-days"></i></span> | ||
+ <input type="text" class="form-control" autocomplete="off" data-bind=" | ||
+ css: { 'is-invalid': $parent.hasError() }, | ||
+ attr: { id: entryId, 'aria-required': $parent.required() ? 'true' : 'false' }, | ||
+ "/> | ||
+ <span class="input-group-text"><i class="fa-solid fa-calendar-days"></i></span> | ||
</div> | ||
</script> |
7 changes: 5 additions & 2 deletions
7
...webapp/tests/data/bootstrap5_diffs/cloudcare/partials/form_entry/entry_file.html.diff.txt
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.