HFP-1905 Fix property naming and validation defaults
Fix property naming for more harmony (and peace in the world) Fix validation on uploading content by adding Author as a rolepull/52/head
parent
0fbc6ef5a8
commit
ea722126ff
|
@ -624,7 +624,7 @@ class H5PValidator {
|
||||||
'author' => '/^.{1,255}$/',
|
'author' => '/^.{1,255}$/',
|
||||||
'authors' => array(
|
'authors' => array(
|
||||||
'name' => '/^.{1,255}$/',
|
'name' => '/^.{1,255}$/',
|
||||||
'role' => '/^(Illustrator|Designer|Photographer)$/',
|
'role' => '/^(Author|Illustrator|Designer|Photographer)$/',
|
||||||
),
|
),
|
||||||
'license' => '/^(CC BY|CC BY-SA|CC BY-ND|CC BY-NC|CC BY-NC-SA|CC BY-NC-ND|GNU GPL|PD|ODC PDDL|CC PDM|U|C|cc-by|cc-by-sa|cc-by-nd|cc-by-nc|cc-by-nc-sa|cc-by-nc-nd|pd|cr|MIT|GPL1|GPL2|GPL3|MPL|MPL2)$/',
|
'license' => '/^(CC BY|CC BY-SA|CC BY-ND|CC BY-NC|CC BY-NC-SA|CC BY-NC-ND|GNU GPL|PD|ODC PDDL|CC PDM|U|C|cc-by|cc-by-sa|cc-by-nd|cc-by-nc|cc-by-nc-sa|cc-by-nc-nd|pd|cr|MIT|GPL1|GPL2|GPL3|MPL|MPL2)$/',
|
||||||
'licenseVersion' => '/^(1.0|2.0|2.5|3.0|4.0)$/',
|
'licenseVersion' => '/^(1.0|2.0|2.5|3.0|4.0)$/',
|
||||||
|
@ -4255,12 +4255,12 @@ class H5PContentValidator {
|
||||||
'fields'=> array(
|
'fields'=> array(
|
||||||
(object) array(
|
(object) array(
|
||||||
'label' => "Author's name",
|
'label' => "Author's name",
|
||||||
'name' => "authorName",
|
'name' => "name",
|
||||||
'optional' => TRUE,
|
'optional' => TRUE,
|
||||||
'type' => "text"
|
'type' => "text"
|
||||||
),
|
),
|
||||||
(object) array(
|
(object) array(
|
||||||
'name' => 'authorRole',
|
'name' => 'role',
|
||||||
'type' => 'select',
|
'type' => 'select',
|
||||||
'label' => $this->h5pF->t("Author's role"),
|
'label' => $this->h5pF->t("Author's role"),
|
||||||
'default' => 'Author',
|
'default' => 'Author',
|
||||||
|
|
Loading…
Reference in New Issue