Commit f1b89abd authored by Carsten  Rose's avatar Carsten Rose
Browse files

api: templates for load/save.

BuildFormBootstrap: Save Button prepared.
AbstarcFromBuild: form.id specified
parent 432b6ba4
......@@ -4,4 +4,6 @@
* User: ep
* Date: 12/23/15
* Time: 6:16 PM
*/
\ No newline at end of file
*/
echo 'Hello World';
\ No newline at end of file
......@@ -174,6 +174,9 @@ abstract class AbstractBuildForm {
*/
public function getFormTagAtrributes() {
//TODO: ttconetn id eintragen
// $attribute['id'] = $this->store->getVar(STORE_TYPO3,'1234');
$attribute['id'] = 1234;
$attribute['method'] = 'post';
$attribute['action'] = $this->getActionUrl();
$attribute['target'] = '_top';
......
......@@ -171,14 +171,14 @@ class BuildFormBootstrap extends AbstractBuildForm {
<div class="col-md-2 ">
<div class="btn-toolbar pull-right" role="toolbar">
<div class="btn-group" role="group">
<button type="button" class="btn btn-default navbar-btn"><span class="glyphicon glyphicon-ok"></span></button>
<button type="button" class="btn btn-default navbar-btn"><span class="glyphicon glyphicon-remove"></span></button>
<button id="save-button" type="button" class="btn btn-default navbar-btn"><span class="glyphicon glyphicon-ok"></span></button>
<button id="close-button" type="button" class="btn btn-default navbar-btn"><span class="glyphicon glyphicon-remove"></span></button>
</div>
<div class="btn-group" role="group">
<button type="button" class="btn btn-default navbar-btn"><span class="glyphicon glyphicon-trash"></span></button>
<button id="delete-button" type="button" class="btn btn-default navbar-btn"><span class="glyphicon glyphicon-trash"></span></button>
</div>
<div class="btn-group" role="group">
<button type="button" class="btn btn-default navbar-btn"><span class="glyphicon glyphicon-plus"></span></button>
<button id="new-button" type="button" class="btn btn-default navbar-btn"><span class="glyphicon glyphicon-plus"></span></button>
</div>
</div>
</div>
......@@ -223,6 +223,20 @@ BUTTONS;
var qfqPageState = new QfqNS.PageState();
var qfqPage = new QfqNS.QfqPage({pageState: qfqPageState});
$("#save-button").click(function() {
$.post("typo3conf/ext/qfq/qfq/api/save.php_", $("#1234").serialize())
.done(function() {
alert("success");
})
.fail(function() {
console.log("failure");
});
});
$("#close-button").click(function() {
window.location="http://nzz.ch";
});
$('[data-toggle="tooltip"]').tooltip();
});
</script>
......
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