Commit 7ee7c9d0 authored by Kristina Hoeppner's avatar Kristina Hoeppner
Browse files

File artefact: Change to switchboxes (Bug 1431569)



Change from checkboxes to switchboxes. Changes affect
the blocktype and artefact type in the plugin
administration.

Change-Id: I9a3c69bd63350fb49267290d029531a1c1b5bdba
Signed-off-by: Kristina Hoeppner's avatarKristina D.C. Hoeppner <kristina@catalyst.net.nz>
parent 586fdcd6
......@@ -94,9 +94,9 @@ class PluginBlocktypeFolder extends PluginBlocktype {
'legend' => get_string('zipdownloadheading', 'artefact.file'),
'elements' => array(
'folderdownloadzip' => array(
'type' => 'checkbox',
'type' => 'switchbox',
'title' => get_string('downloadfolderzip', 'artefact.file'),
'description' => get_string('downloadfolderzipdescription1', 'artefact.file'),
'description' => get_string('downloadfolderzipdescription2', 'artefact.file'),
'defaultvalue' => get_config_plugin('blocktype', 'folder', 'folderdownloadzip'),
),
),
......
......@@ -32,10 +32,10 @@ $string['showdescriptionsdescription'] = 'Select to caption each image with its
$string['cannotdisplayslideshow'] = 'Cannot display slideshow.';
$string['gallerysettings'] = 'Gallery settings';
$string['useslimbox2'] = 'Use Slimbox 2?';
$string['useslimbox2desc'] = 'Slimbox 2 (visual clone of Lightbox 2) is a simple, unobtrusive script used to overlay images on the current page.';
$string['photoframe'] = 'Use photo frame?';
$string['photoframedesc'] = 'If enabled, a frame will be rendered around the thumbnail of each photo in the gallery.';
$string['useslimbox2'] = 'Use Slimbox 2';
$string['useslimbox2desc1'] = 'If set to "On", Slimbox 2 will be used in your gallery. When you click on images in your gallery, they will open in an overlay on the current page.';
$string['photoframe'] = 'Use photo frame';
$string['photoframedesc1'] = 'If set to "On", a frame will be rendered around the thumbnail of each photo in the gallery.';
$string['previewwidth'] = 'Maximum photo width';
$string['previewwidthdesc'] = 'Set the maximum width to which the photos will be resized when viewed with Slimbox 2.';
......
......@@ -448,15 +448,15 @@ class PluginBlocktypeGallery extends PluginBlocktype {
'collapsible' => true,
'elements' => array(
'useslimbox2' => array(
'type' => 'checkbox',
'type' => 'switchbox',
'title' => get_string('useslimbox2', 'blocktype.file/gallery'),
'description' => get_string('useslimbox2desc', 'blocktype.file/gallery'),
'description' => get_string('useslimbox2desc1', 'blocktype.file/gallery'),
'defaultvalue' => get_config_plugin('blocktype', 'gallery', 'useslimbox2'),
),
'photoframe' => array(
'type' => 'checkbox',
'type' => 'switchbox',
'title' => get_string('photoframe', 'blocktype.file/gallery'),
'description' => get_string('photoframedesc', 'blocktype.file/gallery'),
'description' => get_string('photoframedesc1', 'blocktype.file/gallery'),
'defaultvalue' => get_config_plugin('blocktype', 'gallery', 'photoframe'),
),
'previewwidth' => array(
......
......@@ -18,4 +18,4 @@ $string['media'] = 'Media';
$string['flashanimation'] = 'Flash animation';
$string['typeremoved'] = 'This block points to a media type that has been disallowed by the administrator';
$string['configdesc'] = 'Configure which file types users can embed into this block. If you disable a filetype that has already been used in a block, it will not be rendered any more';
$string['configdesc1'] = 'Configure which file types users can embed into this block. If you turn off a filetype that has already been used in a block, it will not be rendered any more';
......@@ -162,7 +162,7 @@ class PluginBlocktypeInternalmedia extends PluginBlocktype {
foreach (self::get_all_filetypes() as $filetype) {
$filetypes[$filetype] = array(
'type' => 'checkbox',
'type' => 'switchbox',
'title' => get_string($filetype, 'artefact.file'),
'defaultvalue' => in_array($filetype, $currenttypes),
);
......@@ -171,7 +171,7 @@ class PluginBlocktypeInternalmedia extends PluginBlocktype {
$options = array_merge(
array(
'description' => array(
'value' => get_string('configdesc', 'blocktype.file/internalmedia'),
'value' => get_string('configdesc1', 'blocktype.file/internalmedia'),
),
),
$filetypes
......
......@@ -42,20 +42,20 @@ $string['Date'] = 'Date';
$string['resizeonupload'] = 'Resize images on upload';
$string['resizeonuploaddescription'] = 'Automatically resize large images on upload';
$string['resizeonuploaduseroption1'] = 'User option';
$string['resizeonuploaduseroptiondescription1'] = 'If checked, show users the option to enable or disable automatic resizing of large images when uploading.';
$string['resizeonuploaduseroptiondescription2'] = 'If set to "On", show users the option to enable or disable automatic resizing of large images when uploading.';
$string['resizeonuploadenable1'] = 'Resize large images automatically';
$string['resizeonuploadenablefilebrowser1'] = 'Automatic resizing of images larger than %sx%s px (recommended)';
$string['resizeonuploadmaxwidth'] = 'Maximum width';
$string['resizeonuploadmaxheight'] = 'Maximum height';
$string['resizeonuploadenabledescription1'] = 'If checked, large images will be resized on upload if they exceed the maximum width and height settings.';
$string['resizeonuploadenabledescription2'] = 'If set to "On", large images will be resized on upload if they exceed the maximum width and height settings.';
$string['defaultagreement'] = 'Default agreement';
$string['defaultquota'] = 'Default quota';
$string['defaultquotadescription'] = 'You can set the amount of disk space that new users will have as their quota here.';
$string['defaultuserquota'] = 'Default user quota';
$string['updateuserquotas'] = 'Update user quotas';
$string['updateuserquotasdesc'] = 'If checked, the default quota you choose above will be applied to all existing users.';
$string['updateuserquotasdesc1'] = 'If set to "On", the default quota you choose above will be applied to all existing users.';
$string['institutionoverride1'] = 'Institutional override';
$string['institutionoverridedescription'] = 'You can allow institution administrators to set user file quotas and have default quotas for each institution.';
$string['institutionoverridedescription1'] = 'If set to "On", you allow institution administrators to set user file quotas and have default quotas for each institution.';
$string['maxquotaenabled'] = 'Enforce a sitewide maximum quota';
$string['maxquota'] = 'Maximum quota';
$string['maxquotatoolow'] = 'The maximum quota cannot be lower than the default quota.';
......@@ -65,7 +65,7 @@ $string['maxquotadescription'] = 'You can set the maximum quota that an administ
$string['defaultgroupquota'] = 'Default group quota';
$string['defaultgroupquotadescription'] = 'You can set the amount of disk space that new groups can use in their files area.';
$string['updategroupquotas'] = 'Update group quotas';
$string['updategroupquotasdesc'] = 'If checked, the default quota you choose above will be applied to all existing groups.';
$string['updategroupquotasdesc1'] = 'If set to "On", the default quota you choose above will be applied to all existing groups.';
$string['deletingfailed'] = 'Deleting failed: the file or folder does not exist any more';
$string['deletefile?'] = 'Are you sure you want to delete this file?';
$string['deletefolder?'] = 'Are you sure you want to delete this folder?';
......@@ -192,7 +192,7 @@ $string['textlinktouser'] = 'Edit profile of %s';
$string['quotanotifylimittitle1'] = 'Quota notification threshold';
$string['quotanotifylimitdescr1'] = 'When a user\'s file upload quota is filled to this percentage, they (and the site administrators) will be sent a notification to let them know they are nearing their upload limit. They can then either delete files to free up space or contact their administrator to have their quota increased.';
$string['quotanotifyadmin1'] = 'Site administrator notification';
$string['quotanotifyadmindescr1'] = 'If checked, site administrators are notified when users reach the notification threshold.';
$string['quotanotifyadmindescr2'] = 'If set to "On", site administrators are notified when users reach the notification threshold.';
$string['useroverquotathreshold'] = 'User %s has arrived at %s%% percent of their %s quota. ';
// File types
......@@ -319,7 +319,7 @@ $string['filepermission.republish'] = 'Publish';
$string['zipdownloadheading'] = 'Folder downloads';
$string['downloadfolderzip'] = 'Download folders as a zip file';
$string['downloadfolderzipblock'] = 'Show download link';
$string['downloadfolderzipdescription1'] = 'If checked, users can download a folder displayed via the "Folder" block as a zip file.';
$string['downloadfolderzipdescription2'] = 'If set to "On", users can download a folder displayed via the "Folder" block as a zip file.';
$string['downloadfolderzipdescriptionblock'] = 'If checked, users can download the folder as a zip file.';
$string['downloadfolderziplink'] = 'Download folder content as a zip file';
$string['folderdownloadnofolderfound'] = 'Unable to find the folder with ID %d';
......
......@@ -1465,8 +1465,8 @@ class ArtefactTypeFile extends ArtefactTypeFileBase {
),
'updateuserquotas' => array(
'title' => get_string('updateuserquotas', 'artefact.file'),
'description' => get_string('updateuserquotasdesc', 'artefact.file'),
'type' => 'checkbox',
'description' => get_string('updateuserquotasdesc1', 'artefact.file'),
'type' => 'switchbox',
)
),
'collapsible' => true,
......@@ -1479,7 +1479,7 @@ class ArtefactTypeFile extends ArtefactTypeFileBase {
$maxquota = 1024 * 1024 * 1024;
}
$elements['userquotafieldset']['elements']['maxquotaenabled'] = array(
'type' => 'checkbox',
'type' => 'switchbox',
'title' => get_string('maxquotaenabled', 'artefact.file'),
'description' => get_string('maxquotadescription', 'artefact.file'),
'defaultvalue' => $maxquotaenabled,
......@@ -1502,18 +1502,18 @@ class ArtefactTypeFile extends ArtefactTypeFileBase {
)
);
$elements['userquotafieldset']['elements']['quotanotifyadmin'] = array(
'type' => 'checkbox',
'type' => 'switchbox',
'title' => get_string('quotanotifyadmin1', 'artefact.file'),
'description' => get_string('quotanotifyadmindescr1', 'artefact.file'),
'description' => get_string('quotanotifyadmindescr2', 'artefact.file'),
'defaultvalue' => get_config_plugin('artefact', 'file', 'quotanotifyadmin'),
);
$override = get_config_plugin('artefact', 'file', 'institutionaloverride');
$elements['userquotafieldset']['elements']['institutionaloverride'] = array(
'type' => 'checkbox',
'type' => 'switchbox',
'title' => get_string('institutionoverride1', 'artefact.file'),
'defaultvalue' => $override,
'description' => get_string('institutionoverridedescription', 'artefact.file')
'description' => get_string('institutionoverridedescription1', 'artefact.file')
);
$defaultgroupquota = get_config_plugin('artefact', 'file', 'defaultgroupquota');
......@@ -1534,8 +1534,8 @@ class ArtefactTypeFile extends ArtefactTypeFileBase {
),
'updategroupquotas' => array(
'title' => get_string('updategroupquotas', 'artefact.file'),
'description' => get_string('updategroupquotasdesc', 'artefact.file'),
'type' => 'checkbox',
'description' => get_string('updategroupquotasdesc1', 'artefact.file'),
'type' => 'switchbox',
)
),
'collapsible' => true,
......@@ -1555,7 +1555,7 @@ class ArtefactTypeFile extends ArtefactTypeFileBase {
),
'uploadagreement' => array(
'title' => get_string('requireagreement', 'artefact.file'),
'type' => 'checkbox',
'type' => 'switchbox',
'defaultvalue' => $uploadagreement,
),
'defaultagreement' => array(
......@@ -1565,7 +1565,7 @@ class ArtefactTypeFile extends ArtefactTypeFileBase {
),
'usecustomagreement' => array(
'title' => get_string('usecustomagreement', 'artefact.file'),
'type' => 'checkbox',
'type' => 'switchbox',
'defaultvalue' => $usecustomagreement,
),
'customagreement' => array(
......@@ -1603,16 +1603,16 @@ class ArtefactTypeFile extends ArtefactTypeFileBase {
'value' => get_string('resizeonuploaddescription', 'artefact.file'),
),
'resizeonuploadenable' => array(
'type' => 'checkbox',
'type' => 'switchbox',
'title' => get_string('resizeonuploadenable1', 'artefact.file'),
'defaultvalue' => $resizeonuploadenable,
'description' => get_string('resizeonuploadenabledescription1', 'artefact.file'),
'description' => get_string('resizeonuploadenabledescription2', 'artefact.file'),
),
'resizeonuploaduseroption' => array(
'title' => get_string('resizeonuploaduseroption1', 'artefact.file'),
'type' => 'checkbox',
'title' => get_string('resizeonuploaduseroption2', 'artefact.file'),
'type' => 'switchbox',
'defaultvalue' => $resizeonuploaduseroption,
'description' => get_string('resizeonuploaduseroptiondescription1', 'artefact.file'),
'description' => get_string('resizeonuploaduseroptiondescription2', 'artefact.file'),
),
'resizeonuploadmaxwidth' => array(
'type' => 'text',
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment