Issue #28 - Added hints for the edit outage form.

This commit is contained in:
Daniel Thee Roperto
2016-09-12 18:22:50 +10:00
parent cbbb861fd8
commit b8c08192d1
2 changed files with 11 additions and 1 deletions

View File

@@ -46,10 +46,13 @@ class edit extends \moodleform {
$mform->setType('id', PARAM_INT);
$mform->addElement('duration', 'warningduration', get_string('warningduration', 'auth_outage'));
$mform->addHelpButton('warningduration', 'warningduration', 'auth_outage');
$mform->addElement('date_time_selector', 'starttime', get_string('starttime', 'auth_outage'));
$mform->addHelpButton('starttime', 'starttime', 'auth_outage');
$mform->addElement('duration', 'outageduration', get_string('outageduration', 'auth_outage'));
$mform->addHelpButton('outageduration', 'outageduration', 'auth_outage');
$mform->addElement(
'text',
@@ -58,8 +61,10 @@ class edit extends \moodleform {
'maxlength="' . self::TITLE_MAX_CHARS . '" size="60"'
);
$mform->setType('title', PARAM_TEXT);
$mform->addHelpButton('title', 'title', 'auth_outage');
$mform->addElement('editor', 'description', get_string('description', 'auth_outage'));
$mform->addHelpButton('description', 'description', 'auth_outage');
$mform->addElement('static', 'usagehints', '', get_string('textplaceholdershint', 'auth_outage'));

View File

@@ -38,6 +38,7 @@ $string['defaultwarningdescription'] = 'Description';
$string['defaultwarningdescriptiondescription'] = 'Default warning message for outages. Use {{start}} and {{stop}} placeholders as required.';
$string['defaultwarningdescriptionvalue'] = 'There is an scheduled maintenance from {{start}} to {{stop}} and our system will not be available during that time.';
$string['description'] = 'Public Description';
$string['description_help'] = 'A full description of the outage, publicly visible by all users.';
$string['menudefaults'] = 'Default Settings';
$string['menumanage'] = 'Manage';
$string['messageoutageongoing'] = 'Our system will be under maintenance until {$a->stop}.';
@@ -49,18 +50,22 @@ $string['outagedelete'] = 'Delete Outage';
$string['outagedeletewarning'] = 'You are about to permanently delete the outage below. This cannot be undone.';
$string['outageduration'] = 'Outage Duration';
$string['outagedurationerrorinvalid'] = 'Outage duration must be positive.';
$string['outageduration_help'] = 'How long the outage lasts after it starts.';
$string['outageslistfuture'] = 'Planned outages';
$string['outageslistpast'] = 'Outage history';
$string['pluginname'] = 'Outage manager';
$string['readmore'] = 'Read More';
$string['starttime'] = 'Start date and time';
$string['starttime_help'] = 'At which date and time the outage starts, preventing general access to the system.';
$string['tableheaderstarttime'] = 'Starts on';
$string['tableheaderstopsafter'] = 'Stops after';
$string['tableheaderwarnbefore'] = 'Warns before';
$string['tableheadertitle'] = 'Title';
$string['textplaceholdershint'] = 'You can use {{start}} and {{stop}} as placeholders on the title/description for the actual start/stop time.';
$string['textplaceholdershint'] = 'You can use {{start}}, {{stop}} and {{duration}} as placeholders on the title and description.';
$string['titleerrorinvalid'] = 'Title cannot be left blank.';
$string['titleerrortoolong'] = 'Title cannot have more than {$a} characters.';
$string['title'] = 'Title';
$string['title_help'] = 'A short title to for this outage. It will be displayed on the warning bar and on the calendar.';
$string['warningdurationerrorinvalid'] = 'Warning duration must be positive.';
$string['warningduration'] = 'Warning duration';
$string['warningduration_help'] = 'How long before the start of the outage should the warning be displayed.';