Поле "copy"

This commit is contained in:
Artem Vasilev 2024-03-11 00:15:51 +03:00
parent 6ed72e5eb6
commit b429dd3451
2 changed files with 76 additions and 69 deletions

View File

@ -1,70 +1,72 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<form> <form>
<config> <config>
<inlinehelp button="show"/> <inlinehelp button="show"/>
</config> </config>
<fieldset name="global"> <fieldset name="global">
<field <field
name="id" name="id"
type="number" type="number"
label="JGLOBAL_FIELD_ID_LABEL" label="JGLOBAL_FIELD_ID_LABEL"
default="0" default="0"
readonly="true" readonly="true"
class="readonly" class="readonly"
/> />
<field name="name" <field name="name"
type="text" type="text"
label="COM_OAUTHSERVER_CLIENT_NAME_LABEL" label="COM_OAUTHSERVER_CLIENT_NAME_LABEL"
required="1" required="1"
/> />
<field name="public" <field name="public"
type="radio" type="radio"
layout="joomla.form.field.radio.switcher" layout="joomla.form.field.radio.switcher"
label="COM_OAUTHSERVER_CLIENT_PUBLIC_LABEL" label="COM_OAUTHSERVER_CLIENT_PUBLIC_LABEL"
description="COM_OAUTHSERVER_CLIENT_PUBLIC_DESCRIPTION" description="COM_OAUTHSERVER_CLIENT_PUBLIC_DESCRIPTION"
filter="integer" filter="integer"
default="0"> default="0">
<option value="1">JYES</option> <option value="1">JYES</option>
<option value="0">JNO</option> <option value="0">JNO</option>
</field> </field>
<field <field
name="redirect_uris" name="redirect_uris"
type="subform" type="subform"
label="COM_OAUTHSERVER_CLIENT_REDIRECT_URI_LABEL" label="COM_OAUTHSERVER_CLIENT_REDIRECT_URI_LABEL"
description="COM_OAUTHSERVER_CLIENT_REDIRECT_URI_DESCRIPTION" description="COM_OAUTHSERVER_CLIENT_REDIRECT_URI_DESCRIPTION"
multiple="true" multiple="true"
required="true" required="true"
hiddenLabel="true" hiddenLabel="true"
layout="joomla.form.field.subform.repeatable-table" layout="joomla.form.field.subform.repeatable-table"
> >
<form> <form>
<field <field
label="COM_OAUTHSERVER_CLIENT_REDIRECT_URI_LABEL" label="COM_OAUTHSERVER_CLIENT_REDIRECT_URI_LABEL"
name="uri" name="uri"
type="url" type="url"
filter="url" filter="url"
validate="url" validate="url"
class="w-100" class="w-100"
/> />
</form> </form>
</field> </field>
<field name="allow_plain_text_pkce" <field name="allow_plain_text_pkce"
type="radio" type="radio"
layout="joomla.form.field.radio.switcher" layout="joomla.form.field.radio.switcher"
label="COM_OAUTHSERVER_CLIENT_ALLOW_PLAIN_TEXT_PKCE_LABEL" label="COM_OAUTHSERVER_CLIENT_ALLOW_PLAIN_TEXT_PKCE_LABEL"
description="COM_OAUTHSERVER_CLIENT_ALLOW_PLAIN_TEXT_PKCE_DESCRIPTION" description="COM_OAUTHSERVER_CLIENT_ALLOW_PLAIN_TEXT_PKCE_DESCRIPTION"
filter="integer" filter="integer"
default="1"> default="1">
<option value="1">JYES</option> <option value="1">JYES</option>
<option value="0">JNO</option> <option value="0">JNO</option>
</field> </field>
<field name="identifier" <field name="identifier"
type="text" type="text"
readonly="1" layout="components.oauthserver.field.copy.text"
label="COM_OAUTHSERVER_CLIENT_IDENTIFIER_LABEL"/> readonly="1"
<field name="secret" label="COM_OAUTHSERVER_CLIENT_IDENTIFIER_LABEL"/>
type="text" <field name="secret"
readonly="1" type="text"
label="COM_OAUTHSERVER_CLIENT_SECRET_LABEL"/> layout="components.oauthserver.field.copy.text"
</fieldset> readonly="1"
label="COM_OAUTHSERVER_CLIENT_SECRET_LABEL"/>
</fieldset>
</form> </form>

View File

@ -35,3 +35,8 @@ COM_OAUTHSERVER_CLIENTS_HEADING_PUBLIC = "Публичный"
COM_OAUTHSERVER_SAVE_AND_RESET = "Сохранить и сбросить" COM_OAUTHSERVER_SAVE_AND_RESET = "Сохранить и сбросить"
COM_OAUTHSERVER_CLIENTS = "Клиенты" COM_OAUTHSERVER_CLIENTS = "Клиенты"
COM_OAUTHSERVER_FIELD_COPY = "Копировать"
COM_OAUTHSERVER_FIELD_COPY_DESC = "Копировать значение в буфер обмена"
COM_OAUTHSERVER_FIELD_COPY_SUCCESS = "Значение скопировано в буфер обмена"
COM_OAUTHSERVER_FIELD_COPY_FAIL = "Не удалось скопировать значение в буфер обмена"