mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-01-09 17:00:27 +00:00
120 lines
2.7 KiB
Plaintext
120 lines
2.7 KiB
Plaintext
title: $:/plugins/tiddlywiki/multiwikiserver/templates/add-user-form
|
|
|
|
<h1>Add New User</h1>
|
|
<form id="addUserForm" method="POST" action="/admin/post-user">
|
|
<$vars username={{{ [[$:/temp/mws/queryParams]get[username]] }}} email={{{ [[$:/temp/mws/queryParams]get[email]] }}}>
|
|
<div class="form-group">
|
|
<label for="username">Username:</label>
|
|
<input type="text" id="username" name="username" class="form-input" required value=<<username>> autocomplete="new-password" readonly>
|
|
</div>
|
|
<div class="form-group">
|
|
<label for="email">Email:</label>
|
|
<input type="email" id="email" name="email" class="form-input" required value=<<email>> autocomplete="new-password" readonly>
|
|
</div>
|
|
</$vars>
|
|
<div class="form-group">
|
|
<label for="password">Password:</label>
|
|
<input type="password" id="password" name="password" class="form-input" required autocomplete="new-password" readonly>
|
|
</div>
|
|
<div class="form-group">
|
|
<label for="confirmPassword">Confirm Password:</label>
|
|
<input type="password" id="confirmPassword" name="confirmPassword" class="form-input" required autocomplete="new-password" readonly>
|
|
</div>
|
|
|
|
<$list filter="[[$:/temp/mws/post-user/error]!is[missing]]" variable="errorTiddler">
|
|
<div class="tc-error-message">
|
|
<$text text={{{[<errorTiddler>get[text]]}}}/>
|
|
</div>
|
|
</$list>
|
|
|
|
<$list filter="[[$:/temp/mws/post-user/success]!is[missing]]" variable="successTiddler">
|
|
<div class="tc-success-message">
|
|
<$text text={{{[<successTiddler>get[text]]}}}/>
|
|
</div>
|
|
</$list>
|
|
|
|
<div class="form-actions">
|
|
<$button class="btn btn-primary">
|
|
Add User
|
|
<<add-user-actions>>
|
|
<$action-sendmessage $message="tm-close-tiddler"/>
|
|
</$button>
|
|
</div>
|
|
</form>
|
|
|
|
<style>
|
|
.add-user-form {
|
|
background-color: #f8f9fa;
|
|
border-radius: 8px;
|
|
padding: 20px;
|
|
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
|
|
}
|
|
|
|
.add-user-form h1 {
|
|
margin-top: 0;
|
|
margin-bottom: 20px;
|
|
color: #333;
|
|
font-size: 1.5em;
|
|
}
|
|
|
|
.form-group {
|
|
margin-bottom: 15px;
|
|
}
|
|
|
|
.form-group label {
|
|
display: block;
|
|
margin-bottom: 5px;
|
|
font-weight: bold;
|
|
color: #555;
|
|
}
|
|
|
|
.form-input {
|
|
width: 100%;
|
|
padding: 8px;
|
|
border: 1px solid #ddd;
|
|
border-radius: 4px;
|
|
font-size: 14px;
|
|
}
|
|
|
|
.form-actions {
|
|
margin-top: 20px;
|
|
display: flex;
|
|
gap: 1rem;
|
|
flex-direction: row;
|
|
justify-content: center;
|
|
align-items: center;
|
|
}
|
|
|
|
.btn {
|
|
width: 100%;
|
|
margin: auto;
|
|
padding: 10px 15px;
|
|
border: none;
|
|
border-radius: 4px;
|
|
cursor: pointer;
|
|
font-size: 14px;
|
|
transition: background-color 0.3s ease;
|
|
}
|
|
|
|
.btn-primary {
|
|
background-color: #007bff;
|
|
color: white;
|
|
}
|
|
|
|
.btn-primary:hover {
|
|
background-color: #0056b3;
|
|
}
|
|
|
|
.tc-error-message {
|
|
color: red;
|
|
font-weight: bold;
|
|
margin-top: 1rem;
|
|
}
|
|
|
|
.tc-success-message {
|
|
color: green;
|
|
font-weight: bold;
|
|
margin-top: 1rem;
|
|
}
|
|
</style>
|