mirror of
https://github.com/cuigh/swirl
synced 2025-01-03 17:42:29 +00:00
83 lines
3.2 KiB
Go
83 lines
3.2 KiB
Go
{{ extends "_base" }}
|
|
{{ import "../../_modules/form" }}
|
|
|
|
{{ block body_content() }}
|
|
<section class="section">
|
|
<div class="container">
|
|
<h2 class="title">Create user</h2>
|
|
<hr>
|
|
<form method="post" data-form="ajax-json" data-url="/system/user/">
|
|
<div class="columns is-bottom-marginless">
|
|
<div class="column is-6">
|
|
<div class="field">
|
|
<label class="label">{{ i18n("field.name") }}</label>
|
|
<div class="control has-icons-left">
|
|
<input name="name" class="input" placeholder="Name" data-v-rule="native" required>
|
|
<span class="icon is-small is-left">
|
|
<i class="fas fa-user"></i>
|
|
</span>
|
|
</div>
|
|
</div>
|
|
<div class="field">
|
|
<label class="label">{{ i18n("field.login-name") }}</label>
|
|
<div class="control has-icons-left">
|
|
<input name="login_name" class="input" placeholder="Login name" data-v-rule="native" required>
|
|
<span class="icon is-small is-left">
|
|
<i class="fas fa-user"></i>
|
|
</span>
|
|
</div>
|
|
</div>
|
|
<div class="field">
|
|
<label class="label">{{ i18n("field.email") }}</label>
|
|
<div class="control has-icons-left">
|
|
<input name="email" class="input" placeholder="Email" data-v-rule="native" required>
|
|
<span class="icon is-small is-left">
|
|
<i class="fas fa-envelope"></i>
|
|
</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="column is-6">
|
|
<div class="field">
|
|
<label class="label">{{ i18n("field.password") }}</label>
|
|
<div class="control has-icons-left">
|
|
<input id="txt-password" name="password" type="password" class="input" placeholder="Password" data-v-rule="native" required>
|
|
<span class="icon is-small is-left">
|
|
<i class="fas fa-lock"></i>
|
|
</span>
|
|
</div>
|
|
</div>
|
|
<div class="field">
|
|
<label class="label">Password confirmation</label>
|
|
<div class="control has-icons-left">
|
|
<input type="password" class="input" placeholder="Password confirmation" data-v-rule="match" data-v-arg-match="txt-password">
|
|
<span class="icon is-small is-left">
|
|
<i class="fas fa-lock"></i>
|
|
</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="field">
|
|
{{ yield switch(id="cb-admin", name="admin", label="Administrator") }}
|
|
</div>
|
|
<div class="field">
|
|
<label class="label">{{ i18n("field.type") }}</label>
|
|
<div class="control">
|
|
{{ yield radio(name="type", value="internal", label="Internal", checked="internal") }}
|
|
{{ yield radio(name="type", value="ldap", label="LDAP") }}
|
|
</div>
|
|
</div>
|
|
<div class="field">
|
|
<label class="label">Roles</label>
|
|
<div class="control">
|
|
{{range .Roles}}
|
|
{{ yield checkbox(name="roles", value=.ID, label=.Name) }}
|
|
{{end}}
|
|
</div>
|
|
</div>
|
|
{{ yield form_submit(url="/system/user/") }}
|
|
</form>
|
|
</div>
|
|
</section>
|
|
{{ end }} |