JI-857 Make metadata semantics describe the actual data structure

HFP-2095-Fix-table-styling
Paal Joergensen 2018-09-17 08:45:18 +02:00
parent 8067277e63
commit 74f9a84034
1 changed files with 153 additions and 166 deletions

View File

@ -4284,12 +4284,7 @@ class H5PContentValidator {
)
);
$semantics = (object) array(
(object) array(
'name' => 'copyright',
'type' => 'group',
'label' => $this->h5pF->t('Copyright information'),
'fields' => array(
$semantics = array(
(object) array(
'name' => 'title',
'type' => 'text',
@ -4372,7 +4367,7 @@ class H5PContentValidator {
'name' => 'licenseVersion',
'type' => 'select',
'label' => $this->h5pF->t('License Version'),
'options' => array(),
'options' => $cc_versions,
'optional' => TRUE
),
(object) array(
@ -4399,18 +4394,19 @@ class H5PContentValidator {
'label' => $this->h5pF->t('Source'),
'placeholder' => 'https://',
'optional' => TRUE
)
)
),
(object) array(
'name' => 'authorWidget',
'name' => 'authors',
'type' => 'list',
'field' => (object) array (
'name' => 'author',
'type' => 'group',
'fields'=> array(
(object) array(
'label' => $this->h5pF->t("Author's name"),
'name' => "name",
'name' => 'name',
'optional' => TRUE,
'type' => "text"
'type' => 'text'
),
(object) array(
'name' => 'role',
@ -4437,25 +4433,23 @@ class H5PContentValidator {
)
)
)
)
),
(object) array(
'name' => 'licenseExtras',
'type' => 'textarea',
'type' => 'text',
'widget' => 'textarea',
'label' => $this->h5pF->t('License Extras'),
'optional' => TRUE,
'description' => $this->h5pF->t('Any additional information about the license')
),
(object) array(
'name' => 'changeLog',
'name' => 'changes',
'type' => 'list',
'field' => (object) array(
'name' => 'change',
'type' => 'group',
'expanded' => FALSE,
'label' => $this->h5pF->t('Change Log'),
'fields' => array(
(object) array (
'name' => 'changeLogForm',
'type' => 'group',
'label' => $this->h5pF->t('Question'),
'expanded' => TRUE,
'fields' => array(
(object) array(
'name' => 'date',
@ -4471,30 +4465,23 @@ class H5PContentValidator {
),
(object) array(
'name' => 'log',
'type' => 'textarea',
'type' => 'text',
'widget' => 'textarea',
'label' => $this->h5pF->t('Description of change'),
'placeholder' => $this->h5pF->t('Photo cropped, text changed, etc.'),
'optional' => TRUE
)
)
)
)
),
(object) array (
'name' => 'authorComments',
'label' => $this->h5pF->t('Additional Information'),
'type' => 'group',
'expanded' => FALSE,
'fields' => array(
(object) array (
'name' => 'authorComments',
'type' => 'textarea',
'type' => 'text',
'widget' => 'textarea',
'label' => $this->h5pF->t('Author comments'),
'description' => $this->h5pF->t('Comments for the editor of the content (This text will not be published as a part of copyright info)'),
'optional' => TRUE
)
)
)
);
return $semantics;