aboutsummaryrefslogtreecommitdiff
path: root/app/view/templates
diff options
context:
space:
mode:
authorvincent-peugnet <v.peugnet@free.fr>2020-05-25 19:48:15 +0200
committervincent-peugnet <v.peugnet@free.fr>2020-05-25 19:48:15 +0200
commit19d16efebc3fb5c0b2aede29aa91d31000ffd124 (patch)
tree48e55d1dc335efe5ce306c0a984300de9d4998b4 /app/view/templates
parent55fc826f9827dd86427534c11594c0d9c4f0b8d1 (diff)
downloadwcms-19d16efebc3fb5c0b2aede29aa91d31000ffd124.tar.gz
wcms-19d16efebc3fb5c0b2aede29aa91d31000ffd124.zip
add page specific password protection close #118
Diffstat (limited to 'app/view/templates')
-rw-r--r--app/view/templates/editleftbar.php3
-rw-r--r--app/view/templates/pagepassword.php39
2 files changed, 42 insertions, 0 deletions
diff --git a/app/view/templates/editleftbar.php b/app/view/templates/editleftbar.php
index 812c30d..0c77337 100644
--- a/app/view/templates/editleftbar.php
+++ b/app/view/templates/editleftbar.php
@@ -192,6 +192,9 @@
<label for="refresh" title="Time before redirection (in seconds)">Refresh time</label>
<input type="number" name="refresh" value="<?= $page->refresh() ?>" id="refresh" min="0" max="180">
+ <label for="password" title="specific page password protection">Password</label>
+ <input type="text" name="password" value="<?= $page->password() ?>" id="password" min="0" max="64">
+
</fieldset>
</details>
diff --git a/app/view/templates/pagepassword.php b/app/view/templates/pagepassword.php
new file mode 100644
index 0000000..509c7ee
--- /dev/null
+++ b/app/view/templates/pagepassword.php
@@ -0,0 +1,39 @@
+<?php
+
+$this->layout('readerlayout') ?>
+
+<?php
+$this->start('head');
+?>
+
+<head>
+ <?= Wcms\Config::alertcss() ? '<link href="' . Wcms\Model::dirtopath(Wcms\Model::ASSETS_CSS_DIR) . 'global.css" rel="stylesheet" />' : '' ?>
+</head>
+
+
+<?php
+$this->stop();
+?>
+
+
+
+<?php $this->start('page') ?>
+
+<body class="alert">
+
+<main class="alert">
+
+
+<h1>This page is password protected</h1>
+
+<form action="<?= $this->url('pageread/post', ['page' => $pageid]) ?>" method="post">
+<label for="pagepassword">Page password</label>
+<input type="password" name="pagepassword" id="pagepassword" autofocus required>
+</form>
+
+</main>
+
+
+</body>
+
+<?php $this->stop() ?> \ No newline at end of file