2018-12-07 12:05:01 +01:00
|
|
|
@use plume_models::instance::Instance;
|
|
|
|
@use validator::ValidationErrors;
|
2024-08-16 08:02:28 +02:00
|
|
|
@use crate::templates::{base, instance::admin_header};
|
2020-01-21 07:02:03 +01:00
|
|
|
@use crate::template_utils::*;
|
|
|
|
@use crate::routes::instance::InstanceSettingsForm;
|
|
|
|
@use crate::routes::*;
|
2018-12-06 18:54:16 +01:00
|
|
|
|
|
|
|
@(ctx: BaseContext, instance: Instance, form: InstanceSettingsForm, errors: ValidationErrors)
|
|
|
|
|
2019-02-02 15:23:50 +01:00
|
|
|
@:base(ctx, i18n!(ctx.1, "Administration of {0}"; instance.name.clone()), {}, {}, {
|
2024-08-16 08:02:28 +02:00
|
|
|
@:admin_header(ctx, "Administration", 1)
|
2018-12-07 12:05:01 +01:00
|
|
|
<form method="post" action="@uri!(instance::update_settings)">
|
2019-08-27 16:50:24 +02:00
|
|
|
@(Input::new("name", i18n!(ctx.1, "Name"))
|
|
|
|
.default(&form.name)
|
|
|
|
.error(&errors)
|
|
|
|
.set_prop("minlength", 1)
|
|
|
|
.html(ctx.1))
|
2018-12-06 18:54:16 +01:00
|
|
|
|
|
|
|
<label for="open_registrations">
|
2019-08-21 00:42:04 +02:00
|
|
|
<input type="checkbox" name="open_registrations" id="open_registrations" @if instance.open_registrations { checked }>
|
2018-12-29 17:40:11 +01:00
|
|
|
@i18n!(ctx.1, "Allow anyone to register here")
|
2019-08-21 00:42:04 +02:00
|
|
|
</label>
|
2018-12-06 18:54:16 +01:00
|
|
|
|
2019-04-04 21:06:37 +02:00
|
|
|
<label for="short_description">@i18n!(ctx.1, "Short description")<small>@i18n!(ctx.1, "Markdown syntax is supported")</small></label>
|
2018-12-06 18:54:16 +01:00
|
|
|
<textarea id="short_description" name="short_description">@Html(form.short_description)</textarea>
|
|
|
|
|
2018-12-25 15:59:54 +01:00
|
|
|
<label for="long_description">@i18n!(ctx.1, "Long description")<small>@i18n!(ctx.1, "Markdown syntax is supported")</small></label>
|
2018-12-06 18:54:16 +01:00
|
|
|
<textarea id="long_description" name="long_description">@Html(form.long_description)</textarea>
|
|
|
|
|
2019-08-27 16:50:24 +02:00
|
|
|
@(Input::new("default_license", i18n!(ctx.1, "Default article license"))
|
|
|
|
.default(&form.default_license)
|
|
|
|
.error(&errors)
|
|
|
|
.set_prop("minlength", 1)
|
|
|
|
.html(ctx.1))
|
2018-12-06 18:54:16 +01:00
|
|
|
|
2018-12-29 17:40:11 +01:00
|
|
|
<input type="submit" value="@i18n!(ctx.1, "Save these settings")"/>
|
2018-12-06 18:54:16 +01:00
|
|
|
</form>
|
|
|
|
})
|