Commit cea038d5 authored by Florian Bogner's avatar Florian Bogner

feat: Add backend effect to the demo data checkbox. #775

parent 79e6bfe5
...@@ -32,7 +32,7 @@ QUI::$Ajax->registerFunction( ...@@ -32,7 +32,7 @@ QUI::$Ajax->registerFunction(
$Config->save(); $Config->save();
} }
if ($params['demoData']) { if (isset($params['demodata']) && $params['demodata']) {
\QUI\Utils\Project::applyDemoDataToProject($Project, $template); \QUI\Utils\Project::applyDemoDataToProject($Project, $template);
} }
......
...@@ -65,7 +65,7 @@ ...@@ -65,7 +65,7 @@
</label> </label>
</td> </td>
<td> <td>
<input type="checkbox" name="demoData"></input> <input type="checkbox" name="demodata" />
</td> </td>
</tr> </tr>
</tbody> </tbody>
......
...@@ -155,9 +155,10 @@ define('classes/projects/Manager', [ ...@@ -155,9 +155,10 @@ define('classes/projects/Manager', [
* @param {String} project * @param {String} project
* @param {String} lang * @param {String} lang
* @param {String} template * @param {String} template
* @param demodata
* @param {Function} [onfinish] * @param {Function} [onfinish]
*/ */
createNewProject: function (project, lang, template, onfinish) { createNewProject: function (project, lang, template, demodata, onfinish) {
var self = this; var self = this;
this.$getList = null; this.$getList = null;
...@@ -173,7 +174,8 @@ define('classes/projects/Manager', [ ...@@ -173,7 +174,8 @@ define('classes/projects/Manager', [
params: JSON.encode({ params: JSON.encode({
project : project, project : project,
lang : lang, lang : lang,
template: template template: template,
demodata: demodata
}) })
}); });
}, },
......
...@@ -270,6 +270,7 @@ define('controls/projects/Manager', [ ...@@ -270,6 +270,7 @@ define('controls/projects/Manager', [
Form.elements.project.value, Form.elements.project.value,
Form.elements.lang.value, Form.elements.lang.value,
Form.elements.template.value, Form.elements.template.value,
Form.elements.demodata.value,
function (result) { function (result) {
self.Loader.hide(); self.Loader.hide();
......
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