Skip to content

Commit

Permalink
[MDL-22112]
Browse files Browse the repository at this point in the history
Marc's patch

Adding some help buttons to create/update wiki instances form
  • Loading branch information
Jordi Piguillem committed Jun 9, 2010
1 parent 139978e commit 4f6be24
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions mod/wiki/lang/en/wiki.php
Expand Up @@ -31,6 +31,7 @@
$string['createddate'] = 'Created: {$a->date} by {$a->username}';
$string['creole'] = 'Creole';
$string['defaultformat'] = 'Default format';
$string['defaultformat_help'] = 'TODO: defaultformat help';
$string['deletecomment'] = 'Deleting comment';
$string['deleteupload'] = 'Delete';
$string['deletedbegins'] = 'Deleted begins';
Expand All @@ -45,7 +46,9 @@
$string['filenotuploadederror'] = 'File \'{$a}\' could not be uploaded correctly.';
$string['filtername'] = 'Wiki Auto-linking';
$string['firstpagetitle'] = 'First page name';
$string['firstpagetitle_help'] = 'TODO: firstpagetitle help';
$string['forceformat'] = 'Force format';
$string['forceformat_help'] = 'TODO: forceformat help';
$string['formathtml'] = 'HTML Format';
$string['formatcreole'] = 'Creole Format';
$string['formatnwiki'] = 'NWIKI Format';
Expand Down Expand Up @@ -159,6 +162,7 @@
$string['wikiitalictext'] = 'Italic Text';
$string['wikilockingsettings'] = 'Locking and reparsing timeouts';
$string['wikimode'] = 'Wiki Mode';
$string['wikimode_help'] = 'TODO: wikimode help';
$string['wikimodecollaborative'] = 'Collaborative Wiki';
$string['wikimodeindividual'] = 'Individual Wiki';
$string['wikiname'] = 'Wiki name';
Expand Down
4 changes: 4 additions & 0 deletions mod/wiki/mod_form.php
Expand Up @@ -75,6 +75,7 @@ function definition() {
}

$mform->addElement('text', 'firstpagetitle', get_string('firstpagetitle', 'wiki'), $attr);
$mform->addHelpButton('firstpagetitle', 'firstpagetitle', 'wiki');

if (empty($this->_instance)) {
$mform->addRule('firstpagetitle', null, 'required', null, 'client');
Expand All @@ -87,14 +88,17 @@ function definition() {
$wikitype_attr['disabled'] = 'disabled';
}
$mform->addElement('select', 'wikimode', get_string('wikimode', 'wiki'), $wikimodeoptions, $wikitype_attr);
$mform->addHelpButton('wikimode', 'wikimode', 'wiki');

$formats = wiki_get_formats();
$editoroptions = array();
foreach ($formats as $format) {
$editoroptions[$format] = get_string($format, 'wiki');
}
$mform->addElement('select', 'defaultformat', get_string('defaultformat', 'wiki'), $editoroptions);
$mform->addHelpButton('defaultformat', 'defaultformat', 'wiki');
$mform->addElement('checkbox', 'forceformat', get_string('forceformat', 'wiki'));
$mform->addHelpButton('forceformat', 'forceformat', 'wiki');

//-------------------------------------------------------------------------------
// add standard elements, common to all modules
Expand Down

0 comments on commit 4f6be24

Please sign in to comment.