|
|
@ -210,7 +210,7 @@ function Profile({ |
|
|
|
name="file" |
|
|
|
name="file" |
|
|
|
value={formData.file} |
|
|
|
value={formData.file} |
|
|
|
onChange={onChange} |
|
|
|
onChange={onChange} |
|
|
|
label="فایل" |
|
|
|
label={window.t("فایل")} |
|
|
|
/> |
|
|
|
/> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</header> |
|
|
|
</header> |
|
|
@ -221,13 +221,13 @@ function Profile({ |
|
|
|
name="file" |
|
|
|
name="file" |
|
|
|
value={formData.file} |
|
|
|
value={formData.file} |
|
|
|
onChange={onChange} |
|
|
|
onChange={onChange} |
|
|
|
label="فایل" |
|
|
|
label={window.t("فایل")} |
|
|
|
/> |
|
|
|
/> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div className="mb-2"> |
|
|
|
<div className="mb-2"> |
|
|
|
<Input |
|
|
|
<Input |
|
|
|
name="firstName" |
|
|
|
name="firstName" |
|
|
|
label="نام" |
|
|
|
label={window.t("نام")} |
|
|
|
align="right" |
|
|
|
align="right" |
|
|
|
onInput={onInput.persianOnly} |
|
|
|
onInput={onInput.persianOnly} |
|
|
|
defaultValue={formData} |
|
|
|
defaultValue={formData} |
|
|
@ -238,7 +238,7 @@ function Profile({ |
|
|
|
<div className="mb-2"> |
|
|
|
<div className="mb-2"> |
|
|
|
<Input |
|
|
|
<Input |
|
|
|
name="lastName" |
|
|
|
name="lastName" |
|
|
|
label="نام خانوادگی" |
|
|
|
label={window.t("نام نام خانوادگی")} |
|
|
|
align="right" |
|
|
|
align="right" |
|
|
|
defaultValue={formData} |
|
|
|
defaultValue={formData} |
|
|
|
onChange={onChange} |
|
|
|
onChange={onChange} |
|
|
@ -248,7 +248,7 @@ function Profile({ |
|
|
|
<div className="mb-2"> |
|
|
|
<div className="mb-2"> |
|
|
|
<Input |
|
|
|
<Input |
|
|
|
name="username" |
|
|
|
name="username" |
|
|
|
label="نام کاربری" |
|
|
|
label={window.t("نام کاربری")} |
|
|
|
defaultValue={formData} |
|
|
|
defaultValue={formData} |
|
|
|
onChange={onChange} |
|
|
|
onChange={onChange} |
|
|
|
align="left" |
|
|
|
align="left" |
|
|
@ -258,7 +258,7 @@ function Profile({ |
|
|
|
|
|
|
|
|
|
|
|
<div className="mb-2"> |
|
|
|
<div className="mb-2"> |
|
|
|
<Gender |
|
|
|
<Gender |
|
|
|
options={["دختر", "پسر"]} |
|
|
|
options={[window.t("دختر"), window.t("دانش پسر")]} |
|
|
|
name="gender" |
|
|
|
name="gender" |
|
|
|
selectedOption={formData.gender} |
|
|
|
selectedOption={formData.gender} |
|
|
|
onChange={onChange} |
|
|
|
onChange={onChange} |
|
|
@ -268,7 +268,7 @@ function Profile({ |
|
|
|
<div className="mb-2"> |
|
|
|
<div className="mb-2"> |
|
|
|
<Input |
|
|
|
<Input |
|
|
|
name="nationalId" |
|
|
|
name="nationalId" |
|
|
|
label="کد ملی/اتباع" |
|
|
|
label={window.t("کد ملی/اتباع")} |
|
|
|
align="left" |
|
|
|
align="left" |
|
|
|
maxLength={13} |
|
|
|
maxLength={13} |
|
|
|
defaultValue={formData} |
|
|
|
defaultValue={formData} |
|
|
@ -286,7 +286,7 @@ function Profile({ |
|
|
|
<div className="mb-2"> |
|
|
|
<div className="mb-2"> |
|
|
|
<Input |
|
|
|
<Input |
|
|
|
name="password" |
|
|
|
name="password" |
|
|
|
label="رمز عبور" |
|
|
|
label={window.t("رمز عبور")} |
|
|
|
onChange={onChange} |
|
|
|
onChange={onChange} |
|
|
|
align="left" |
|
|
|
align="left" |
|
|
|
onInput={onInput.englishAndNumberWithoutSpace} |
|
|
|
onInput={onInput.englishAndNumberWithoutSpace} |
|
|
@ -296,9 +296,9 @@ function Profile({ |
|
|
|
<div className="profile__box--section"> |
|
|
|
<div className="profile__box--section"> |
|
|
|
<div className="mb-2" style={{ minWidth: "100%" }}> |
|
|
|
<div className="mb-2" style={{ minWidth: "100%" }}> |
|
|
|
<Gender |
|
|
|
<Gender |
|
|
|
options={["معلم", "دانش آموز"]} |
|
|
|
options={[window.t("معلم"), window.t("دانش آموز")]} |
|
|
|
name="status" |
|
|
|
name="status" |
|
|
|
label={"عنوان"} |
|
|
|
label={window.t("عنوان")} |
|
|
|
selectedOption={formData.status} |
|
|
|
selectedOption={formData.status} |
|
|
|
onChange={onChange} |
|
|
|
onChange={onChange} |
|
|
|
/> |
|
|
|
/> |
|
|
@ -308,7 +308,7 @@ function Profile({ |
|
|
|
<Select |
|
|
|
<Select |
|
|
|
options={grades} |
|
|
|
options={grades} |
|
|
|
name="gradeIds" |
|
|
|
name="gradeIds" |
|
|
|
label={"پایه تحصیلی"} |
|
|
|
label={window.t("پایه تحصیلی")} |
|
|
|
selectedOptions={formData.gradeIds} |
|
|
|
selectedOptions={formData.gradeIds} |
|
|
|
onChange={onChange} |
|
|
|
onChange={onChange} |
|
|
|
/> |
|
|
|
/> |
|
|
@ -319,7 +319,7 @@ function Profile({ |
|
|
|
<MultipleSelector |
|
|
|
<MultipleSelector |
|
|
|
options={grades} |
|
|
|
options={grades} |
|
|
|
name="gradeIds" |
|
|
|
name="gradeIds" |
|
|
|
label={"پایه تحصیلی"} |
|
|
|
label={window.t("پایه تحصیلی")} |
|
|
|
selectedOptions={formData.gradeIds} |
|
|
|
selectedOptions={formData.gradeIds} |
|
|
|
onChange={onChange} |
|
|
|
onChange={onChange} |
|
|
|
align="right" |
|
|
|
align="right" |
|
|
@ -328,19 +328,20 @@ function Profile({ |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
) : null} |
|
|
|
) : null} |
|
|
|
|
|
|
|
|
|
|
|
{formData.status === "دانش آموز" && formData.gradeIds > 9 ? ( |
|
|
|
{formData.status === window.t("دانش آموز") && |
|
|
|
|
|
|
|
formData.gradeIds > 9 ? ( |
|
|
|
<div className="mb-2"> |
|
|
|
<div className="mb-2"> |
|
|
|
<Select |
|
|
|
<Select |
|
|
|
options={[ |
|
|
|
options={[ |
|
|
|
"ریاضی", |
|
|
|
window.t("ریاضی"), |
|
|
|
"تجربی", |
|
|
|
window.t("تجربی"), |
|
|
|
"انسانی", |
|
|
|
window.t("انسانی"), |
|
|
|
"فنی حرفهای", |
|
|
|
window.t("فنی حرفهای"), |
|
|
|
"کاردانش", |
|
|
|
window.t("کاردانش"), |
|
|
|
"معارف", |
|
|
|
window.t("معارف"), |
|
|
|
]} |
|
|
|
]} |
|
|
|
name="field" |
|
|
|
name="field" |
|
|
|
label={"رشته تحصیلی"} |
|
|
|
label={window.t("رشته تحصیلی")} |
|
|
|
selectedOptions={formData.gradeIds} |
|
|
|
selectedOptions={formData.gradeIds} |
|
|
|
onChange={onChange} |
|
|
|
onChange={onChange} |
|
|
|
/> |
|
|
|
/> |
|
|
@ -350,7 +351,7 @@ function Profile({ |
|
|
|
<Select |
|
|
|
<Select |
|
|
|
options={provinceList} |
|
|
|
options={provinceList} |
|
|
|
name="provinceId" |
|
|
|
name="provinceId" |
|
|
|
label={"استان"} |
|
|
|
label={window.t("استان")} |
|
|
|
selectedOptions={formData.provinceId} |
|
|
|
selectedOptions={formData.provinceId} |
|
|
|
onChange={onChange} |
|
|
|
onChange={onChange} |
|
|
|
/> |
|
|
|
/> |
|
|
@ -359,24 +360,16 @@ function Profile({ |
|
|
|
<Select |
|
|
|
<Select |
|
|
|
options={cityList} |
|
|
|
options={cityList} |
|
|
|
name="cityId" |
|
|
|
name="cityId" |
|
|
|
label={"شهرستان"} |
|
|
|
label={window.t("شهرستان")} |
|
|
|
selectedOptions={formData.cityId} |
|
|
|
selectedOptions={formData.cityId} |
|
|
|
onChange={onChange} |
|
|
|
onChange={onChange} |
|
|
|
/> |
|
|
|
/> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
{/* <div className="mb-2"> |
|
|
|
|
|
|
|
<Select |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
options={["chaharbagh", "mahalat"]} |
|
|
|
|
|
|
|
name="zoneId" |
|
|
|
|
|
|
|
label={"شهر/روستا"} |
|
|
|
|
|
|
|
/> |
|
|
|
|
|
|
|
</div> */} |
|
|
|
|
|
|
|
{formData.status == 1 ? ( |
|
|
|
{formData.status == 1 ? ( |
|
|
|
<div className="mb-2"> |
|
|
|
<div className="mb-2"> |
|
|
|
<Input |
|
|
|
<Input |
|
|
|
name="schools" |
|
|
|
name="schools" |
|
|
|
label={"نام مدرسه"} |
|
|
|
label={window.t("نام مدرسه")} |
|
|
|
defaultValue={formData} |
|
|
|
defaultValue={formData} |
|
|
|
onInput={onInput.persianOnly} |
|
|
|
onInput={onInput.persianOnly} |
|
|
|
onChange={onChange} |
|
|
|
onChange={onChange} |
|
|
@ -387,7 +380,7 @@ function Profile({ |
|
|
|
<div className="mb-2"> |
|
|
|
<div className="mb-2"> |
|
|
|
<Input |
|
|
|
<Input |
|
|
|
name="schools" |
|
|
|
name="schools" |
|
|
|
label={"محل تدریس"} |
|
|
|
label={window.t("محل تدریس")} |
|
|
|
defaultValue={formData} |
|
|
|
defaultValue={formData} |
|
|
|
onInput={onInput.persianOnly} |
|
|
|
onInput={onInput.persianOnly} |
|
|
|
onChange={onChange} |
|
|
|
onChange={onChange} |
|
|
@ -404,7 +397,7 @@ function Profile({ |
|
|
|
<div className="mb-2"> |
|
|
|
<div className="mb-2"> |
|
|
|
<Input |
|
|
|
<Input |
|
|
|
name="postalCode" |
|
|
|
name="postalCode" |
|
|
|
label={"کد پستی"} |
|
|
|
placeholder={window.t("کد پستی")} |
|
|
|
align="left" |
|
|
|
align="left" |
|
|
|
onChange={onChange} |
|
|
|
onChange={onChange} |
|
|
|
maxLength={10} |
|
|
|
maxLength={10} |
|
|
@ -415,14 +408,14 @@ function Profile({ |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div className="mb-2"> |
|
|
|
<div className="mb-2"> |
|
|
|
<TextArea |
|
|
|
<TextArea |
|
|
|
placeholder={"آدرس محل سکونت"} |
|
|
|
placeholder={window.t("آدرس محل سکونت")} |
|
|
|
name="address" |
|
|
|
name="address" |
|
|
|
defaultValue={formData} |
|
|
|
defaultValue={formData} |
|
|
|
onChange={onChange} |
|
|
|
onChange={onChange} |
|
|
|
/> |
|
|
|
/> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div className="profile__box--form__footer d-flex justify-content-center"> |
|
|
|
<div className="profile__box--form__footer d-flex justify-content-center"> |
|
|
|
<button onClick={() => onSubmit()}>ذخیره</button> |
|
|
|
<button onClick={() => onSubmit()}>{window.t("ذخیره")}</button> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
@ -432,8 +425,12 @@ function Profile({ |
|
|
|
<ul className="flex flex-col flex-1"> |
|
|
|
<ul className="flex flex-col flex-1"> |
|
|
|
<li className="flex flex-row gap-5"> |
|
|
|
<li className="flex flex-row gap-5"> |
|
|
|
<div className="flex flex-col w-4/12"> |
|
|
|
<div className="flex flex-col w-4/12"> |
|
|
|
<strong>اطلاعات هویتی</strong> |
|
|
|
<strong>{window.t(" اطلاعات هویتی")}</strong> |
|
|
|
<p>لطفا نام و نام خانوادگی خود را به طور کامل وارد نمایید</p> |
|
|
|
<p> |
|
|
|
|
|
|
|
{window.t( |
|
|
|
|
|
|
|
" لطفا نام و نام خانوادگی خود را به طور کامل وارد نمایید" |
|
|
|
|
|
|
|
)} |
|
|
|
|
|
|
|
</p> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div className="flex flex-row w-8/12"></div> |
|
|
|
<div className="flex flex-row w-8/12"></div> |
|
|
|
</li> |
|
|
|
</li> |
|
|
@ -464,7 +461,7 @@ export default connect( |
|
|
|
|
|
|
|
|
|
|
|
Profile.defaultProps = { |
|
|
|
Profile.defaultProps = { |
|
|
|
user: { |
|
|
|
user: { |
|
|
|
name: "اکبر", |
|
|
|
name: window.t("اکبر"), |
|
|
|
icon: "", |
|
|
|
icon: "", |
|
|
|
description: "", |
|
|
|
description: "", |
|
|
|
}, |
|
|
|
}, |
|
|
|