Started adding a user creation form
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
This commit is contained in:
parent
ae14d0c0bb
commit
8af370da32
@ -37,7 +37,9 @@ module.exports = function(grunt) {
|
|||||||
twigRender: {
|
twigRender: {
|
||||||
compile: {
|
compile: {
|
||||||
files : [{
|
files : [{
|
||||||
data: {},
|
data: {
|
||||||
|
file_root: __dirname + '/public'
|
||||||
|
},
|
||||||
expand: true,
|
expand: true,
|
||||||
cwd: 'assets/twig',
|
cwd: 'assets/twig',
|
||||||
src: ['**/*.twig', '!**/_*.twig'],
|
src: ['**/*.twig', '!**/_*.twig'],
|
||||||
@ -60,7 +62,7 @@ module.exports = function(grunt) {
|
|||||||
|
|
||||||
watch: {
|
watch: {
|
||||||
html: {
|
html: {
|
||||||
files: ['assets/twig/*.twig'],
|
files: ['assets/twig/*.twig', 'assets/twig/**/*.twig'],
|
||||||
tasks: ['twigRender'],
|
tasks: ['twigRender'],
|
||||||
options: {
|
options: {
|
||||||
atBegin: true,
|
atBegin: true,
|
||||||
|
9
assets/coffee/user.coffee
Normal file
9
assets/coffee/user.coffee
Normal file
@ -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
|
@ -17,6 +17,12 @@
|
|||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
<section id="userActions" class="row">
|
||||||
|
<div class="columns twelve">
|
||||||
|
<p><a href="user/create.html">Create new user</a></p>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
<section id="ldapObjectTable" class="row">
|
<section id="ldapObjectTable" class="row">
|
||||||
<table>
|
<table>
|
||||||
<thead>
|
<thead>
|
||||||
|
@ -4,10 +4,10 @@
|
|||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<!-- https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP -->
|
<!-- https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP -->
|
||||||
<meta http-equiv="Content-Security-Policy" content="default-src 'self'; script-src 'self'; style-src 'self' 'unsafe-inline'">
|
<meta http-equiv="Content-Security-Policy" content="default-src 'self'; script-src 'self'; style-src 'self' 'unsafe-inline'">
|
||||||
<link rel="stylesheet" href="./styles/skeleton-2.0.4.min.css">
|
<link rel="stylesheet" href="{{ file_root }}/styles/skeleton-2.0.4.min.css">
|
||||||
<link rel="stylesheet" href="./styles/archon.css">
|
<link rel="stylesheet" href="{{ file_root }}//styles/archon.css">
|
||||||
<title>Hello World!</title>
|
<title>Hello World!</title>
|
||||||
<script src="./js/archon.js" charset="utf-8"></script>
|
<script src="{{ file_root }}/js/archon.js" charset="utf-8"></script>
|
||||||
{% block scripts %}{% endblock %}
|
{% block scripts %}{% endblock %}
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
55
assets/twig/user/create.twig
Normal file
55
assets/twig/user/create.twig
Normal file
@ -0,0 +1,55 @@
|
|||||||
|
{% extends '../layout.twig' %}
|
||||||
|
|
||||||
|
{% block scripts %}
|
||||||
|
<script src="../js/user.js" charset="utf-8"></script>
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block content %}
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="twelve columns">
|
||||||
|
<h1 class="u-text-center">Create new LDAP user</h1>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<section class="row">
|
||||||
|
<form id="createUserForm" class="twelve-columns">
|
||||||
|
<div class="row">
|
||||||
|
<label class="columns six">
|
||||||
|
Username (uid):
|
||||||
|
<input class="u-full-width" type="text" name="user_username" placeholder="myuser">
|
||||||
|
</label>
|
||||||
|
|
||||||
|
<label class="columns six">
|
||||||
|
Email address:
|
||||||
|
<input class="u-full-width" type="text" name="user_email" placeholder="myuser@example.com">
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<label class="columns six">
|
||||||
|
First name:
|
||||||
|
<input class="u-full-width" type="text" name="user_first_name" placeholder="my">
|
||||||
|
</label>
|
||||||
|
|
||||||
|
<label class="columns six">
|
||||||
|
Last name:
|
||||||
|
<input class="u-full-width" type="text" name="user_last_name" placeholder="user">
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="columns twelve u-text-center">
|
||||||
|
<input type="submit" name="user_submit" value="Create user">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="twelve columns">
|
||||||
|
<p><a href="../index.html">Back</a></p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{% endblock %}
|
Loading…
Reference in New Issue
Block a user