Skip to content
Snippets Groups Projects
Commit 666647f0 authored by Luca Bösch's avatar Luca Bösch
Browse files

Adding help icons near to form labels.

parent 7ec771d4
No related branches found
No related tags found
No related merge requests found
......@@ -108,10 +108,12 @@ class form_step_instance extends \moodleform {
$elementname = 'instancename';
$mform->addElement('text', $elementname, get_string('step_instancename', 'tool_lifecycle'));
$mform->addHelpButton($elementname, 'step_instancename', 'tool_lifecycle');
$mform->setType($elementname, PARAM_TEXT);
$elementname = 'subpluginnamestatic';
$mform->addElement('static', $elementname, get_string('step_subpluginname', 'tool_lifecycle'));
$mform->addHelpButton($elementname, 'step_subpluginname', 'tool_lifecycle');
$mform->setType($elementname, PARAM_TEXT);
$elementname = 'subpluginname';
$mform->addElement('hidden', $elementname);
......
......@@ -113,6 +113,7 @@ class form_trigger_instance extends \moodleform {
$elementname = 'instancename';
$mform->addElement('text', $elementname, get_string('trigger_instancename', 'tool_lifecycle'));
$mform->addHelpButton($elementname, 'trigger_instancename', 'tool_lifecycle');
$mform->setType($elementname, PARAM_TEXT);
$elementname = 'subpluginnamestatic';
......
......@@ -69,6 +69,7 @@ class form_workflow_instance extends \moodleform {
$elementname = 'title';
$mform->addElement('text', $elementname, get_string('workflow_title', 'tool_lifecycle'));
$mform->addHelpButton($elementname, 'workflow_title', 'tool_lifecycle');
$mform->setType($elementname, PARAM_TEXT);
if (isset($this->workflow)) {
$mform->setDefault($elementname, $this->workflow->title);
......
......@@ -59,13 +59,16 @@ $string['error_wrong_trigger_selected'] = 'You tried to request a non-manual tri
$string['lifecycle_task'] = 'Run the life cycle processes';
$string['trigger_subpluginname'] = 'Subplugin Name';
$string['trigger_subpluginname_help'] = 'Subplugin Name';
$string['trigger_instancename'] = 'Instance Name';
$string['trigger_instancename_help'] = 'Instance Name';
$string['trigger_enabled'] = 'Enabled';
$string['trigger_sortindex'] = 'Up/Down';
$string['trigger_workflow'] = 'Workflow';
$string['add_workflow'] = 'Add Workflow';
$string['workflow_title'] = 'Title';
$string['workflow_title_help'] = 'Title';
$string['workflow_displaytitle'] = 'Displayed workflow title';
$string['workflow_displaytitle_help'] = 'This title is displayed to users when managing their courses.';
$string['workflow_active'] = 'Active';
......@@ -82,7 +85,9 @@ $string['workflow_duplicate_title'] = '{$a} (Copy)';
$string['step_type'] = 'Type';
$string['step_subpluginname'] = 'Subplugin Name';
$string['step_subpluginname_help'] = 'Subplugin Name';
$string['step_instancename'] = 'Instance Name';
$string['step_instancename_help'] = 'Instance Name';
$string['step_sortindex'] = 'Up/Down';
$string['step_edit'] = 'Edit';
$string['step_show'] = 'Show';
......
......@@ -74,10 +74,12 @@ class form_duplicate extends \moodleform {
$elementname = 'shortname';
$mform->addElement('text', $elementname, get_string('shortnamecourse'));
$mform->addHelpButton($elementname, 'shortnamecourse');
$mform->setType($elementname, PARAM_TEXT);
$elementname = 'fullname';
$mform->addElement('text', $elementname, get_string('fullnamecourse'));
$mform->addHelpButton($elementname, 'fullnamecourse');
$mform->setType($elementname, PARAM_TEXT);
$this->add_action_buttons();
......
......@@ -27,8 +27,11 @@ $string['pluginname'] = 'Email Step';
$string['email_responsetimeout'] = 'Time the user has for the response';
$string['email_subject'] = 'Subject Template';
$string['email_subject_help'] = 'Subject Template';
$string['email_content'] = 'Content Template';
$string['email_content_help'] = 'Content Template';
$string['email_content_html'] = 'Content HTML Template';
$string['email_content_html_help'] = 'Content HTML Template';
$string['email:preventdeletion'] = 'Prevent Deletion';
$string['keep_course'] = 'Keep Course';
......
......@@ -215,14 +215,17 @@ class email extends libbase {
$mform->setType($elementname, PARAM_INT);
$elementname = 'subject';
$mform->addElement('text', $elementname, get_string('email_subject', 'lifecyclestep_email'));
$mform->addHelpButton($elementname, 'email_subject', 'lifecyclestep_email');
$mform->setType($elementname, PARAM_TEXT);
$elementname = 'content';
$mform->addElement('textarea', $elementname, get_string('email_content', 'lifecyclestep_email'));
$mform->addHelpButton($elementname, 'email_content', 'lifecyclestep_email');
$mform->setType($elementname, PARAM_TEXT);
$elementname = 'contenthtml';
$mform->addElement('editor', $elementname, get_string('email_content_html', 'lifecyclestep_email'));
$mform->addHelpButton($elementname, 'email_content_html', 'lifecyclestep_email');
$mform->setType($elementname, PARAM_RAW);
}
......
......@@ -25,5 +25,8 @@
$string['pluginname'] = 'Manual trigger';
$string['setting_capability'] = 'Capability';
$string['setting_capability_help'] = 'Capability';
$string['setting_icon'] = 'Icon';
$string['setting_icon_help'] = 'Icon';
$string['setting_displayname'] = 'Action name';
$string['setting_displayname_help'] = 'Action name';
\ No newline at end of file
......@@ -58,18 +58,21 @@ class manual extends base_manual {
$mform->addElement(
'text', $elementname, get_string('setting_icon', 'lifecycletrigger_manual')
);
$mform->addHelpButton($elementname, 'setting_icon', 'lifecycletrigger_manual');
$mform->setType($elementname, PARAM_SAFEPATH);
$elementname = 'displayname';
$mform->addElement(
'text', $elementname, get_string('setting_displayname', 'lifecycletrigger_manual')
);
$mform->addHelpButton($elementname, 'setting_displayname', 'lifecycletrigger_manual');
$mform->setType($elementname, PARAM_TEXT);
$elementname = 'capability';
$mform->addElement(
'text', $elementname, get_string('setting_capability', 'lifecycletrigger_manual')
);
$mform->addHelpButton($elementname, 'setting_capability', 'lifecycletrigger_manual');
$mform->setType($elementname, PARAM_CAPABILITY);
}
......
......@@ -26,3 +26,4 @@
$string['pluginname'] = 'Start date delay trigger';
$string['delay'] = 'Delay from start of course til starting a process';
$string['delay_help'] = 'Delay from start of course til starting a process';
......@@ -66,6 +66,7 @@ class startdatedelay extends base_automatic {
public function extend_add_instance_form_definition($mform) {
$mform->addElement('duration', 'delay', get_string('delay', 'lifecycletrigger_startdatedelay'));
$mform->addHelpButton('delay', 'delay', 'lifecycletrigger_startdatedelay');
}
public function extend_add_instance_form_definition_after_data($mform, $settings) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment