2022-11-16 18:04:50 +00:00
|
|
|
<!--
|
2024-01-01 10:31:45 +00:00
|
|
|
Copyright (C) 2019 Nicola Murino
|
2022-11-16 18:04:50 +00:00
|
|
|
|
|
|
|
This program is free software: you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU Affero General Public License as published
|
|
|
|
by the Free Software Foundation, version 3.
|
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU Affero General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU Affero General Public License
|
2023-01-03 09:18:30 +00:00
|
|
|
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
2022-11-16 18:04:50 +00:00
|
|
|
-->
|
|
|
|
{{template "base" .}}
|
|
|
|
|
|
|
|
{{define "title"}}{{.Title}}{{end}}
|
|
|
|
|
|
|
|
{{define "page_body"}}
|
|
|
|
<!-- Page Heading -->
|
|
|
|
<div class="card shadow mb-4">
|
|
|
|
<div class="card-header py-3">
|
|
|
|
<h6 class="m-0 font-weight-bold text-primary">{{.Title}}</h6>
|
|
|
|
</div>
|
|
|
|
<div class="card-body">
|
|
|
|
{{if .Error}}
|
2023-02-10 17:07:23 +00:00
|
|
|
<div class="alert alert-warning alert-dismissible fade show" role="alert">
|
|
|
|
{{.Error}}
|
|
|
|
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
|
|
|
|
<span aria-hidden="true">×</span>
|
|
|
|
</button>
|
2022-11-16 18:04:50 +00:00
|
|
|
</div>
|
|
|
|
{{end}}
|
|
|
|
<form id="role_form" action="{{.CurrentURL}}" method="POST" autocomplete="off">
|
|
|
|
<div class="form-group row">
|
|
|
|
<label for="idRoleName" class="col-sm-2 col-form-label">Name</label>
|
|
|
|
<div class="col-sm-10">
|
|
|
|
<input type="text" class="form-control" id="idRoleName" name="name" placeholder=""
|
|
|
|
value="{{.Role.Name}}" maxlength="255" autocomplete="nope" required {{if eq .Mode 2}}readonly{{end}}>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="form-group row">
|
|
|
|
<label for="idDescription" class="col-sm-2 col-form-label">Description</label>
|
|
|
|
<div class="col-sm-10">
|
|
|
|
<input type="text" class="form-control" id="idDescription" name="description" placeholder=""
|
|
|
|
value="{{.Role.Description}}" maxlength="255" aria-describedby="descriptionHelpBlock">
|
|
|
|
<small id="descriptionHelpBlock" class="form-text text-muted">
|
|
|
|
Optional description
|
|
|
|
</small>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<input type="hidden" name="_form_token" value="{{.CSRFToken}}">
|
|
|
|
<div class="col-sm-12 text-right px-0">
|
|
|
|
<button type="submit" class="btn btn-primary mt-3 ml-3 px-5" name="form_action" value="submit">Submit</button>
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{{end}}
|