Completely refactored the code for editing a custom certificate

The elements for each page are listed in a table below the other page settings, meaning each page has a separate table for listing their elements. Each element is now edited in a pop-up, rather than having all the element settings displayed at once on the form causing it to look overcrowded. There is also no longer any need for the function add_element to add default values for the elements when they are added, as a a form is shown when you click to add an element where you can enter the values before it is created.

Note: I did not create a db/upgrade.php script to add the new database columns as this module should not be currently used by anyone.
This commit is contained in:
Mark Nelson 2013-06-06 18:59:08 +08:00
parent f7029178ad
commit fa5d45eef3
19 changed files with 521 additions and 384 deletions

View file

@ -28,11 +28,13 @@ $string['addelement'] = 'Add element';
$string['awardedto'] = 'Awarded to';
$string['code'] = 'Code';
$string['copy'] = 'Copy';
$string['configure'] = 'Configure';
$string['coursetimereq'] = 'Required minutes in course';
$string['coursetimereq_help'] = 'Enter here the minimum amount of time, in minutes, that a student must be logged into the course before they will be able to receive the certificate.';
$string['customcert:addinstance'] = 'Add a new custom certificate instance';
$string['customcert:manage'] = 'Manage a custom certificate';
$string['customcert:view'] = 'View a custom certificate';
$string['delete'] = 'Delete';
$string['deletecertpage'] = 'Delete certificate page';
$string['deleteconfirm'] = 'Delete confirmation';
$string['deleteelement'] = 'Delete element';
@ -40,6 +42,10 @@ $string['deleteelementconfirm'] = 'Are you sure you want to delete this element?
$string['deletepageconfirm'] = 'Are you sure you want to delete this certificate page?';
$string['description'] = 'Description';
$string['editcustomcert'] = 'Edit custom certificate';
$string['elementname'] = 'Element name';
$string['elementname_help'] = 'This will be the name used to identify this element when editing a custom certificate. For example, you may have multiple images on a page and will want to distinguish between them quickly when editing the certificate. Note: this will not displayed on the PDF.';
$string['elements'] = 'Elements';
$string['elements_help'] = 'These are the list of elements that will be displayed on this PDF page.';
$string['errorloadingelement'] = 'Error loading the element "{$a}"';
$string['errorsavingelement'] = 'Error saving the element "{$a}"';
$string['font'] = 'Font';
@ -87,6 +93,7 @@ $string['setprotection_help'] = 'Choose the actions you wish to prevent users fr
$string['summaryofissue'] = 'Summary of issue';
$string['templatename'] = 'Template name';
$string['templatenameexists'] = 'That template name is currently in use, please choose another.';
$string['type'] = 'Type';
$string['uploadimage'] = 'Upload image';
$string['viewcustomcertissues'] = 'View {$a} issued custom certificates';
$string['width'] = 'Width';