Skip to content

Commit

Permalink
mustache: Update context comment to use {title}, use MOODLE_400_STABL…
Browse files Browse the repository at this point in the history
…E branch for ci (at-tools#26)

* mustache: Update context comment to use {title}

* Change obsolete label attributes to aria-label

* Make ci dependent on MOODLE_400_STABLE branch, let mustache linter errors make ci fail again

* Add a single ci job against moodle master branch to spot problems with current master

Co-authored-by: Philipp Memmel <[email protected]>
  • Loading branch information
jrchamp and Philipp Memmel authored Apr 19, 2022
1 parent 8e30c6b commit 9a86bcc
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 20 deletions.
14 changes: 8 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,21 +33,24 @@ jobs:
include:
- php: '8.0'
moodle-branch: 'master'
database: 'pgsql'
- php: '8.0'
moodle-branch: 'MOODLE_400_STABLE'
database: 'mariadb'
- php: '8.0'
moodle-branch: 'master'
moodle-branch: 'MOODLE_400_STABLE'
database: 'pgsql'
- php: '7.4'
moodle-branch: 'master'
moodle-branch: 'MOODLE_400_STABLE'
database: 'mariadb'
- php: '7.4'
moodle-branch: 'master'
moodle-branch: 'MOODLE_400_STABLE'
database: 'pgsql'
- php: '7.3'
moodle-branch: 'master'
moodle-branch: 'MOODLE_400_STABLE'
database: 'mariadb'
- php: '7.3'
moodle-branch: 'master'
moodle-branch: 'MOODLE_400_STABLE'
database: 'pgsql'

steps:
Expand Down Expand Up @@ -108,7 +111,6 @@ jobs:
run: moodle-plugin-ci savepoints

- name: Mustache Lint
continue-on-error: true # This step will show errors but will not fail
if: ${{ always() }}
run: moodle-plugin-ci mustache

Expand Down
8 changes: 4 additions & 4 deletions templates/duplicateto_select.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -19,23 +19,23 @@
Data attributes required for JS:
* none
Context variables required for this template:
* number, name
* number, title
Example context (json):
{
"sections": {
"number": "0",
"name": "Test"
"title": "Test"
}
}
}}
<select id="block-massaction-control-section-list-duplicateto"
name="{{#str}} action_duplicatetosection, block_massaction {{/str}}"
aria-label="{{#str}} action_duplicatetosection, block_massaction {{/str}}">
<option value="{{#str}} action_duplicatetosection, block_massaction {{/str}}"
label="{{#str}} action_duplicatetosection, block_massaction {{/str}}">
aria-label="{{#str}} action_duplicatetosection, block_massaction {{/str}}">
{{#str}} action_duplicatetosection, block_massaction {{/str}}
</option>
{{#sections}}
<option value="{{number}}" label="{{title}}">{{title}}</option>
<option value="{{number}}">{{title}}</option>
{{/sections}}
</select>&nbsp;
8 changes: 4 additions & 4 deletions templates/moveto_select.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -19,23 +19,23 @@
Data attributes required for JS:
* none
Context variables required for this template:
* number, name
* number, title
Example context (json):
{
"sections": {
"number": "0",
"name": "Test"
"title": "Test"
}
}
}}
<select id="block-massaction-control-section-list-moveto"
name="{{#str}} action_movetosection, block_massaction {{/str}}"
aria-label="{{#str}} action_movetosection, block_massaction {{/str}}">
<option value="{{#str}} action_movetosection, block_massaction {{/str}}"
label="{{#str}} action_movetosection, block_massaction {{/str}}">
aria-label="{{#str}} action_movetosection, block_massaction {{/str}}">
{{#str}} action_movetosection, block_massaction {{/str}}
</option>
{{#sections}}
<option value="{{number}}" label="{{title}}">{{title}}</option>
<option value="{{number}}">{{title}}</option>
{{/sections}}
</select>&nbsp;
10 changes: 4 additions & 6 deletions templates/section_select.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -19,25 +19,23 @@
Data attributes required for JS:
* none
Context variables required for this template:
* number, name
* number, title
Example context (json):
{
"sections": {
"number": "0",
"name": "Test"
"title": "Test"
}
}
}}
<select id="block-massaction-control-section-list-select"
name="{{#str}} selectallinsection, block_massaction {{/str}}"
aria-label="{{#str}} selectallinsection, block_massaction {{/str}}">
<option value="description" label="{{#str}} selectallinsection, block_massaction {{/str}}">
<option value="description" aria-label="{{#str}} selectallinsection, block_massaction {{/str}}">
{{#str}} selectallinsection, block_massaction {{/str}}
</option>
{{#sections}}
<option id="block-massaction-control-section-list-select-option-{{number}}"
value="{{number}}"
label="{{title}}">
<option id="block-massaction-control-section-list-select-option-{{number}}" value="{{number}}">
{{title}}
</option>
{{/sections}}
Expand Down

0 comments on commit 9a86bcc

Please sign in to comment.