diff --git a/h5p.module b/h5p.module index 351c988..1b8173f 100644 --- a/h5p.module +++ b/h5p.module @@ -270,10 +270,10 @@ function h5p_form(&$node, $form_state) { $form['#validate'][] = 'h5p_form_validate'; $form['title'] = array( - '#type' => 'hidden', - '#required' => FALSE, // Does not get set when using Legacy upload - '#default_value' => $source_node->title, - '#attributes' => array('id' => 'h5p-plugin-form-title', 'style' => 'display: none;') + '#type' => 'textfield', + '#title' => check_plain($type->title_label), + '#required' => TRUE, + '#default_value' => $node->title, ); $form['#attributes'] = array('enctype' => "multipart/form-data"); diff --git a/modules/h5peditor/h5peditor/scripts/h5peditor-form.js b/modules/h5peditor/h5peditor/scripts/h5peditor-form.js index 37175c8..6acc058 100644 --- a/modules/h5peditor/h5peditor/scripts/h5peditor-form.js +++ b/modules/h5peditor/h5peditor/scripts/h5peditor-form.js @@ -88,7 +88,7 @@ ns.Form.prototype.processSemantics = function (semantics, defaultParams, metadat this.metadata = (metadata ? metadata : defaultParams.metadata || {}); if (ns.enableMetadata(this.currentLibrary)) { - this.metadataForm = new ns.MetadataForm(this, this.metadata, this.$form.children('.tree'), true); + this.metadataForm = new ns.MetadataForm(this, this.metadata, this.$form.children('.tree'), false); } else { this.metadataForm = H5PEditor.MetadataForm.createLegacyForm(this.metadata, this.$form.children('.tree')); diff --git a/modules/h5peditor/h5peditor/scripts/h5peditor-init.js b/modules/h5peditor/h5peditor/scripts/h5peditor-init.js index 82be515..9de8b65 100644 --- a/modules/h5peditor/h5peditor/scripts/h5peditor-init.js +++ b/modules/h5peditor/h5peditor/scripts/h5peditor-init.js @@ -51,12 +51,12 @@ var params = h5peditor.getParams(); if (params !== undefined && params.params !== undefined) { - // Validate mandatory main title. Prevent submitting if that's not set. - // Deliberatly doing it after getParams(), so that any other validation - // problems are also revealed - if (!h5peditor.isMainTitleSet()) { - return event.preventDefault(); - } + // // Validate mandatory main title. Prevent submitting if that's not set. + // // Deliberatly doing it after getParams(), so that any other validation + // // problems are also revealed + // if (!h5peditor.isMainTitleSet()) { + // return event.preventDefault(); + // } // Set the title field to the metadata title if the field exists if ($title && $title.length !== 0) { diff --git a/modules/h5peditor/scripts/application.js b/modules/h5peditor/scripts/application.js index a4c8352..32663ef 100644 --- a/modules/h5peditor/scripts/application.js +++ b/modules/h5peditor/scripts/application.js @@ -59,9 +59,9 @@ var ns = H5PEditor; // Validate mandatory main title. Prevent submitting if that's not set. // Deliberatly doing it after getParams(), so that any other validation // problems are also revealed - if (!h5peditor.isMainTitleSet()) { - return event.preventDefault(); - } + //if (!h5peditor.isMainTitleSet()) { + // return event.preventDefault(); + //} // Set main library $library.val(h5peditor.getLibrary());