Page MenuHomePhabricator

Install ContactPage on zhwiki and add contact form
Open, Needs TriagePublic

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.