Jump to content

Topic on Extension talk:Semantic Forms Inputs

104.236.47.218 (talkcontribs)

Because datepicker is moved to Semantic Forms, date time picker (SFI_DateTimePicker.php) can no longer call SFIDatePicker

F.trott (talkcontribs)

Normally this should not be a problem. The class is still available. Did you update SemanticForms?

104.236.47.218 (talkcontribs)

Yes both SemanticForms and SemanticFormInputs are updated via git clone.

However command "grep -r SFIDatePicker ." under both SemanticForms and SemanticFormInputs directories return only calls to the class in SFI_DateTimePicker.php, no class definition.

[root@server1 extensions]# git clone https://git.wikimedia.org/git/mediawiki/extensions/SemanticForms.git

[root@server1 extensions]# git clone https://gerrit.wikimedia.org/r/p/mediawiki/extensions/SemanticFormsInputs.git

[root@server1 extensions]# grep -r SFIDatePicker .

./SemanticFormsInputs/includes/SFI_DateTimePicker.php:          $this->mDatePicker = new SFIDatePicker( $this->mInputNumber . '_dp', $dateString, $this->mInputName, $this->mIsDisabled, $this->mOtherArgs );

./SemanticFormsInputs/includes/SFI_DateTimePicker.php:                  SFIDatePicker::getParameters(),

[root@server1 extensions]#

F.trott (talkcontribs)

You are right. The class was renamed SFDatePicker when it was moved to SF.

F.trott (talkcontribs)

In fact the new name is SFDatePickerInput.

I just fixed it.

104.236.47.218 (talkcontribs)

Thank you.

I thinks it is "SFDatePickerInput".

Also after replacing SFIDatePicker with SFDatePickerInput in SFI_DateTimePicker.php, the form starts to render without any fatal php errors, but now pickers wont work and there is a javascript error, something to do with "window.SFI_DTP_init" (I am not good with javascript). Only 2 text input fields appear on the form.

Also there is a php notice now:

PHP Notice:  Undefined property: SFISettings::$datePickerDisableInputField

F.trott (talkcontribs)

I'll look at it tomorrow.

F.trott (talkcontribs)

I put in a fix that unbroke it for me. Could you give it a try?

104.236.47.218 (talkcontribs)

It works.

Thank you