3 . "$_EXEC/cgilite/cgilite.sh"
7 _(){ printf %s\\n "$*"; }
8 [ "${LANGUAGE}" -a -r "${_EXEC}/l10n/${LANGUAGE}.sh" ] && . "${_EXEC}/l10n/${LANGUAGE}.sh"
14 while [ $# -gt 0 ]; do case $1 in
15 template=*) template="${1#*=}"; shift 1;;
16 --template) template="$2"; shift 2;;
17 label=*) label="${1#*=}"; shift 1;;
18 --label) label="$2"; shift 2;;
19 *) pattern="$1"; shift 1;;
22 if acl_write "$(page_abs "$pattern")"; then
24 <form class="macro newpage" method=POST action="[newpage]">
25 <input type=hidden name=pattern value="$(HTML "$pattern")">
26 <input type=hidden name=template value="$(HTML "$template")">
27 $([ ! "${pattern##*%%s*}" ] \
28 && printf '<input autocomplete=off name=page placeholder="%s">' "$(_ "page name")"
29 )<button type=submit name=action value=newpage>$(HTML "$label")</button>