diff --git a/Gruntfile.js b/Gruntfile.js index 4f044b1..1b49811 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -37,7 +37,9 @@ module.exports = function(grunt) { twigRender: { compile: { files : [{ - data: {}, + data: { + file_root: __dirname + '/public' + }, expand: true, cwd: 'assets/twig', src: ['**/*.twig', '!**/_*.twig'], @@ -60,7 +62,7 @@ module.exports = function(grunt) { watch: { html: { - files: ['assets/twig/*.twig'], + files: ['assets/twig/*.twig', 'assets/twig/**/*.twig'], tasks: ['twigRender'], options: { atBegin: true, diff --git a/assets/coffee/user.coffee b/assets/coffee/user.coffee new file mode 100644 index 0000000..cd867cf --- /dev/null +++ b/assets/coffee/user.coffee @@ -0,0 +1,9 @@ +userCreateFormSubmit = (e) -> + e.preventDefault() + + user_uid = document.forms.createUserForm.user_username.value + console.log(user_uid) + +window.onload = -> + document.getElementById('createUserForm').addEventListener('submit', userCreateFormSubmit) + return diff --git a/assets/twig/index.twig b/assets/twig/index.twig index 430379b..f290dd8 100644 --- a/assets/twig/index.twig +++ b/assets/twig/index.twig @@ -17,6 +17,12 @@ +
+
+

Create new user

+
+
+
diff --git a/assets/twig/layout.twig b/assets/twig/layout.twig index d1cd131..a5ab5d2 100644 --- a/assets/twig/layout.twig +++ b/assets/twig/layout.twig @@ -4,10 +4,10 @@ - - + + Hello World! - + {% block scripts %}{% endblock %} diff --git a/assets/twig/user/create.twig b/assets/twig/user/create.twig new file mode 100644 index 0000000..3524564 --- /dev/null +++ b/assets/twig/user/create.twig @@ -0,0 +1,55 @@ +{% extends '../layout.twig' %} + +{% block scripts %} + +{% endblock %} + +{% block content %} + +
+
+

Create new LDAP user

+
+
+ +
+
+
+ + + +
+ +
+ + + +
+ +
+
+ +
+
+ +
+ +
+
+

Back

+
+
+ +{% endblock %}