Permalink
Browse files

MDL-57338 mustache: fix admin_setting_tabs

* Add example context
* Fix validation issue (need role="tablist" to contain the tabs)
  • Loading branch information...
danpoltawski committed Dec 8, 2016
1 parent a09a987 commit a3c1bd86ed5d88d27b41c43b0deee07a044d8a09
@@ -14,7 +14,29 @@
You should have received a copy of the GNU General Public License
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
}}
<ul class="nav nav-tabs">
{{!
@template theme_boost/admin_setting_tabs
Example context (json):
{
"tabs": [
{
"name": "tab1",
"active": 0,
"displayname": "Inactive tab1",
"html": "<p>Tab 1 content</p>"
},
{
"name": "tab2",
"active": 1,
"displayname": "Active tab2",
"html": "<p>Tab 2 content</p>"
}
]
}
}}
<ul class="nav nav-tabs" role="tablist">
{{#tabs}}
<li class="nav-item">
<a href="#{{name}}" class="nav-link {{#active}}active{{/active}}" data-toggle="tab" role="tab">{{displayname}}</a>
@@ -14,7 +14,29 @@
You should have received a copy of the GNU General Public License
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
}}
<ul class="nav nav-tabs">
{{!
@template theme_boost/admin_setting_tabs
Example context (json):
{
"tabs": [
{
"name": "tab1",
"active": 0,
"displayname": "Inactive tab1",
"html": "<p>Tab 1 content</p>"
},
{
"name": "tab2",
"active": 1,
"displayname": "Active tab2",
"html": "<p>Tab 2 content</p>"
}
]
}
}}
<ul class="nav nav-tabs" role="tablist">
{{#tabs}}
<li class="{{#active}}active{{/active}}">
<a href="#{{name}}" data-toggle="tab" role="tab">{{displayname}}</a>

0 comments on commit a3c1bd8

Please sign in to comment.