Page MenuHomePhabricator

Configure ContactPage and IPBE contact form on zhwiki
Closed, ResolvedPublic

Description

discussion link

The Chinese Wikipedia community would like to install Extension:ContactPage.

We would also like to add this contact form:

$wgContactConfig['ipbe'] = [
	'RecipientUser' => 'IPBE-zh',
	'SenderName' => '中文維基百科聯絡表單',
	'RequireDetails' => true,
	'IncludeIP' => true, // 自動讀取申請人IP
	'MustBeLoggedIn' => false,
	'NameReadonly' => false,
	'EmailReadonly' => false,
	'SubjectReadonly' => true, // use [[MediaWiki:Contactpage-subject-ipbe]] and do not allow customize subject
	'MustHaveEmail' => false,
	'AdditionalFields' => [
		'blockid' => [
			'label-message' => 'contactpage-ipbe-blockid', // 封鎖ID
			'type' => 'text',
			'required' => true,
		],
		'gfw' => [
			'class' => 'HTMLMultiSelectField',
			'label-message' => 'contactpage-ipbe-gfw', // 因身處中國大陸,需要使用代理才能瀏覽維基百科
			'options-messages' => [
				'contactpage-ipbe-gfwyes' => 'ipbe-gfw' // 是
			]
		],
		'accountname' => [
			'label-message' => 'contactpage-ipbe-accountname', // 如果未有帳號,請填寫希望申請的帳號名稱
			'type' => 'text',
		],
		'reason' => [
			'label-message' => 'contactpage-ipbe-reason', // 請說明申請IPBE的原因
			'type' => 'textarea',
			'required' => true,
			'rows' => 7,
			// 'hide-if' => [ '!==', 'gfw', '' ] // 我不曉得怎麽寫這個(check if ipbe-gfw is selected)
		],
		'page' => [
			'label-message' => 'contactpage-ipbe-page', // 您在哪個頁面遇到IP封鎖通知?
			'type' => 'text'
		],
		'editdesire' => [
			'label-message' => 'contactpage-ipbe-editdesire', // 您希望對該頁面作出什麼編輯?
			'type' => 'textarea',
		],
	],
	'DisplayFormat' => 'table',
	'RLModules' => [], 
	'RLStyleModules' => []
];

The hide-if statement of reason field is commented out as we can't figure out how to hide it if gfw is empty. We would like assistance to set up that parameter.

Additionally, while the form has IncludeIP set to true, we would like to ask if it is against policies to use a script to force enable IncludeIP for registered users, with a statement by the lines of "By submitting this request, you agree to send your IP address to (NDA-signed team)"?

Event Timeline

The hide-if statement of reason field is commented out as we can't figure out how to hide it if gfw is empty. We would like assistance to set up that parameter.

hide-if logic does not currently support multi-value fields, so it cannot be used with gfw field

The hide-if statement of reason field is commented out as we can't figure out how to hide it if gfw is empty. We would like assistance to set up that parameter.

hide-if logic does not currently support multi-value fields, so it cannot be used with gfw field

I see, that will just be left out then. Or another thought, can these rules be externally enforced with JS scripts? (including this and using script to force submit IP address in our use case)

@Ammarpad any updates on this task? We are waiting for the setup for this task before changing our IPBE application procedure platform.

matmarex subscribed.

I don't think this has to wait for @Ammarpad if he's not around, anyone can make the patches with the config changes and schedule them for deployment.

Yes, sorry I am busy IRL and forgot about this. Anyone should feel free to pick it up.

Hamishcn changed the task status from Open to In Progress.Sep 15 2024, 2:33 AM
Hamishcn claimed this task.
Hamishcn moved this task from Backlog to Working on on the Wikimedia-Extension-setup board.
Hamishcn moved this task from Backlog to Working on on the Wikimedia-Site-requests board.
Hamishcn renamed this task from Install ContactPage on zhwiki and add contact form to Configure ContactPage and IPBE contact form on zhwiki.Sep 15 2024, 2:35 AM

Change #1072876 had a related patch set uploaded (by Hamish; author: Hamish):

[operations/mediawiki-config@master] Configure ContactPage and IPBE contact form on zhwiki

https://gerrit.wikimedia.org/r/1072876

Change #1072876 merged by jenkins-bot:

[operations/mediawiki-config@master] Configure ContactPage and IPBE contact form on zhwiki

https://gerrit.wikimedia.org/r/1072876

Mentioned in SAL (#wikimedia-operations) [2024-09-17T13:26:00Z] <hashar@deploy1003> Started scap sync-world: Backport for [[gerrit:1072876|Configure ContactPage and IPBE contact form on zhwiki (T359998)]]

Mentioned in SAL (#wikimedia-operations) [2024-09-17T13:28:10Z] <hashar@deploy1003> hashar, hamishz: Backport for [[gerrit:1072876|Configure ContactPage and IPBE contact form on zhwiki (T359998)]] synced to the testservers (https://wikitech.wikimedia.org/wiki/Mwdebug)

Change #1073454 had a related patch set uploaded (by Hashar; author: Hashar):

[operations/mediawiki-config@master] Enable ContactPage extension on zhwiki

https://gerrit.wikimedia.org/r/1073454

Mentioned in SAL (#wikimedia-operations) [2024-09-17T13:36:00Z] <hashar@deploy1003> Finished scap sync-world: Backport for [[gerrit:1072876|Configure ContactPage and IPBE contact form on zhwiki (T359998)]] (duration: 10m 00s)

Change #1073454 merged by jenkins-bot:

[operations/mediawiki-config@master] Enable ContactPage extension on zhwiki

https://gerrit.wikimedia.org/r/1073454

Mentioned in SAL (#wikimedia-operations) [2024-09-17T13:37:51Z] <hashar@deploy1003> Started scap sync-world: Backport for [[gerrit:1073454|Enable ContactPage extension on zhwiki (T359998)]]

Mentioned in SAL (#wikimedia-operations) [2024-09-17T13:39:59Z] <hashar@deploy1003> hashar: Backport for [[gerrit:1073454|Enable ContactPage extension on zhwiki (T359998)]] synced to the testservers (https://wikitech.wikimedia.org/wiki/Mwdebug)

Mentioned in SAL (#wikimedia-operations) [2024-09-17T13:46:00Z] <hashar@deploy1003> Finished scap sync-world: Backport for [[gerrit:1073454|Enable ContactPage extension on zhwiki (T359998)]] (duration: 08m 09s)

Hamishcn moved this task from Site configuration to Closed on the Chinese-Sites board.
Hamishcn moved this task from Working on to Done on the Wikimedia-Extension-setup board.