fn(language$990, project$0, branch$1, module$2, response$3) =>
let description$4 = @html-ui.json-text(value: $3.json, key: "description");
let visibility$5 = @html-ui.json-text(value: $3.json, key: "visibility");
@core.string-join(
items: [
@html-ui.text(
language: $990,
en: "<h2>Module settings</h2><p>Renaming does not rewrite the references from other parts, so if parts of this module are referenced, the type check fails and it cannot be saved.</p>",
ja: "<h2>モジュールの設定</h2><p>名前を変えても他のパーツからの参照は書き換えないので, このモジュールのパーツが参照されていると型検査の誤りになって保存できません。</p>",
eo: "<h2>Agordoj de la modulo</h2><p>Renomado ne reskribas la referencojn el aliaj partoj, do se partoj de ĉi tiu modulo estas referencataj, la tipkontrolo malsukcesas kaj ĝi ne povas esti konservita.</p>"
),
@html-ui.tool-form(
tool: "definy_commit_parts",
then: @core.string-join(items: ["/p/", $0, "/", $1, "/{modules.0.rename}"], separator: ""),
confirm: "",
fields: @core.string-join(
items: [
@html-ui.hidden(name: "project", value: $0),
@html-ui.hidden(name: "branch", value: $1),
@html-ui.hidden(name: "message", value: @core.string-concat(left: "Change module ", right: $2)),
@html-ui.hidden(name: "modules.0.module", value: $2),
@html-ui.text(
language: $990,
en: "<label>Name<input name=\"modules.0.rename\" required value=\"",
ja: "<label>名前<input name=\"modules.0.rename\" required value=\"",
eo: "<label>Nomo<input name=\"modules.0.rename\" required value=\""
),
@html-ui.escape(text: $2),
@html-ui.text(
language: $990,
en: "\"></label><label>Description (English)<input name=\"modules.0.description\" data-keep-empty value=\"",
ja: "\"></label><label>説明 (英語)<input name=\"modules.0.description\" data-keep-empty value=\"",
eo: "\"></label><label>Priskribo (angla)<input name=\"modules.0.description\" data-keep-empty value=\""
),
@html-ui.escape(text: $4),
@html-ui.text(
language: $990,
en: "\"></label><label>Visibility <select name=\"modules.0.visibility\"><option value=\"public\"",
ja: "\"></label><label>公開範囲 <select name=\"modules.0.visibility\"><option value=\"public\"",
eo: "\"></label><label>Videbleco <select name=\"modules.0.visibility\"><option value=\"public\""
),
match @core.equal(left: $5, right: "public") {
true =>
" selected",
false =>
""
},
@html-ui.text(
language: $990,
en: ">Public</option><option value=\"private\"",
ja: ">公開</option><option value=\"private\"",
eo: ">Publika</option><option value=\"private\""
),
match @core.equal(left: $5, right: "private") {
true =>
" selected",
false =>
""
},
@html-ui.text(
language: $990,
en: ">Private</option></select></label>",
ja: ">非公開</option></select></label>",
eo: ">Privata</option></select></label>"
)
],
separator: ""
),
button: @html-ui.text(language: $990, en: "Save", ja: "保存", eo: "Konservi")
),
@html-ui.text(
language: $990,
en: "<h2>Delete the module</h2>",
ja: "<h2>モジュールを消す</h2>",
eo: "<h2>Forigi la modulon</h2>"
),
@html-ui.tool-form(
tool: "definy_commit_parts",
then: @core.string-join(items: ["/p/", $0, "/", $1], separator: ""),
confirm: @core.string-join(
items: [
@html-ui.text(language: $990, en: "Delete the module ", ja: "モジュール ", eo: "Ĉu forigi la modulon "),
$2,
@html-ui.text(
language: $990,
en: " and all its parts?",
ja: " と全てのパーツを消しますか?",
eo: " kaj ĉiujn ĝiajn partojn?"
)
],
separator: ""
),
fields: @core.string-join(
items: [
@html-ui.hidden(name: "project", value: $0),
@html-ui.hidden(name: "branch", value: $1),
@html-ui.hidden(name: "message", value: @core.string-concat(left: "Delete module ", right: $2)),
"<input type=\"hidden\" name=\"modules\" data-json value=\"",
@html-ui.escape(
text: @core.string-join(
items: ["[{\"module\":", @definy.json-string-literal(value: $2), ",\"delete\":true}]"],
separator: ""
)
),
"\">"
],
separator: ""
),
button: @html-ui.text(language: $990, en: "Delete", ja: "消す", eo: "Forigi")
)
],
separator: ""
)