Merge branch 'MDL-86701-501' of https://github.com/junpataleta/moodle into MOODLE_501_STABLE
This commit is contained in:
@@ -89,9 +89,9 @@
|
||||
{{/canmovecategories}}
|
||||
{{{nameeditable}}}
|
||||
{{#canedit}}
|
||||
<a class="icon-size-3" href="#" data-role="deletecategory" data-id="{{id}}">
|
||||
{{#pix}} t/delete, core, {{#str}} delete, moodle {{/str}} {{/pix}}
|
||||
</a>
|
||||
<button type="button" class="btn btn-link btn-icon icon-size-3" data-role="deletecategory" data-id="{{id}}" title="{{#str}} deletecategory, customfield, {{name}} {{/str}}" aria-label="{{#str}} deletecategory, customfield, {{name}} {{/str}}">
|
||||
{{#pix}} t/delete, core {{/pix}}
|
||||
</button>
|
||||
{{/canedit}}
|
||||
</h3>
|
||||
{{#toggle}}
|
||||
@@ -128,10 +128,12 @@
|
||||
<td class="col-2">{{{type}}}</td>
|
||||
<td class="col-2 text-end">
|
||||
{{#canedit}}
|
||||
<a href="#" data-role="editfield" data-name="{{name}}" data-id="{{id}}">{{#pix}}
|
||||
t/edit, core, {{#str}} edit, moodle {{/str}} {{/pix}}</a>
|
||||
<a href="#" data-id="{{id}}" data-role="deletefield">{{#pix}}
|
||||
t/delete, core, {{#str}} delete, moodle {{/str}} {{/pix}}</a>
|
||||
<button type="button" class="btn btn-link btn-icon" data-role="editfield" data-name="{{name}}" data-id="{{id}}" title="{{#str}} editfield, customfield, {{name}} {{/str}}" aria-label="{{#str}} editfield, customfield, {{name}} {{/str}}">
|
||||
{{#pix}} t/edit, core {{/pix}}
|
||||
</button>
|
||||
<button type="button" class="btn btn-link btn-icon" data-id="{{id}}" data-role="deletefield" title="{{#str}} deletefield, customfield, {{name}} {{/str}}" aria-label="{{#str}} deletefield, customfield, {{name}} {{/str}}">
|
||||
{{#pix}} t/delete, core {{/pix}}
|
||||
</button>
|
||||
{{/canedit}}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -35,7 +35,7 @@ Feature: Managers can manage categories for course custom fields
|
||||
| Field 1 | Category for test | text | f1 |
|
||||
And I log in as "admin"
|
||||
And I navigate to "Courses > Default settings > Course custom fields" in site administration
|
||||
And I click on "[data-role='deletecategory']" "css_element"
|
||||
And I press "Delete custom field category: Category for test"
|
||||
And I click on "Yes" "button" in the "Confirm" "dialogue"
|
||||
And I wait until the page is ready
|
||||
And I wait until "Test category" "text" does not exist
|
||||
|
||||
@@ -77,7 +77,7 @@ Feature: Teachers can edit course custom fields
|
||||
Scenario: Use images in the custom field description
|
||||
When I log in as "admin"
|
||||
And I navigate to "Courses > Default settings > Course custom fields" in site administration
|
||||
And I click on "Edit" "link" in the "Field 1" "table_row"
|
||||
And I press "Edit custom field: Field 1"
|
||||
And I click on "Image" "button" in the "Description" "form_row"
|
||||
And I click on "Browse repositories" "button"
|
||||
And I click on "Private files" "link" in the ".fp-repo-area" "css_element"
|
||||
|
||||
@@ -42,8 +42,8 @@ Feature: Create shared categories and fields
|
||||
And I log in as "admin"
|
||||
And I navigate to "Courses > Default settings > Course custom fields" in site administration
|
||||
# Check that the delete category link exists for course categories but not for shared categories.
|
||||
Then "Delete" "link" should exist in the ".//div[contains(@class, 'categoryinstance')][.//span[@data-value='My course category']]" "xpath_element"
|
||||
And "Delete" "link" should not exist in the ".//div[contains(@class,'categoryinstance')]/h3[normalize-space(text())='My shared category']" "xpath_element"
|
||||
Then "Delete custom field category: My course category" "button" should exist
|
||||
And "Delete custom field category: My shared category" "button" should not exist
|
||||
# Check that the inplaceeditable exists for course categories but not for shared categories.
|
||||
And "//div[contains(@class,'categoryinstance') and contains(.,'My course category') and .//span[contains(@class,'inplaceeditable')]]" "xpath_element" should exist
|
||||
And "//div[contains(@class,'categoryinstance') and contains(.,'My shared category') and .//span[contains(@class,'inplaceeditable')]]" "xpath_element" should not exist
|
||||
|
||||
@@ -37,10 +37,13 @@ $string['customfield'] = 'Custom field';
|
||||
$string['customfielddata'] = 'Custom fields data';
|
||||
$string['customfields'] = 'Custom fields';
|
||||
$string['defaultvalue'] = 'Default value';
|
||||
$string['deletecategory'] = 'Delete custom field category: {$a}';
|
||||
$string['deletefield'] = 'Delete custom field: {$a}';
|
||||
$string['description'] = 'Description';
|
||||
$string['description_help'] = 'The description is displayed in the form below the field.';
|
||||
$string['edit'] = 'Edit';
|
||||
$string['editcategoryname'] = 'Edit category name';
|
||||
$string['editfield'] = 'Edit custom field: {$a}';
|
||||
$string['editingfield'] = 'Updating {$a}';
|
||||
$string['errorfieldtypenotfound'] = 'Field type {$a} not found';
|
||||
$string['erroruniquevalues'] = 'This value is already used.';
|
||||
|
||||
Reference in New Issue
Block a user