|
|
@ -117,6 +117,80 @@ class Profile extends Component { |
|
|
|
await setProfile(data); |
|
|
|
await setProfile(data); |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
forcePersian = (txt) => { |
|
|
|
|
|
|
|
let yas = txt; |
|
|
|
|
|
|
|
yas = yas.replace(/`/g, ""); |
|
|
|
|
|
|
|
yas = yas.replace(/0/g, ""); |
|
|
|
|
|
|
|
yas = yas.replace(/1/g, ""); |
|
|
|
|
|
|
|
yas = yas.replace(/2/g, ""); |
|
|
|
|
|
|
|
yas = yas.replace(/3/g, ""); |
|
|
|
|
|
|
|
yas = yas.replace(/4/g, ""); |
|
|
|
|
|
|
|
yas = yas.replace(/5/g, ""); |
|
|
|
|
|
|
|
yas = yas.replace(/6/g, ""); |
|
|
|
|
|
|
|
yas = yas.replace(/7/g, ""); |
|
|
|
|
|
|
|
yas = yas.replace(/8/g, ""); |
|
|
|
|
|
|
|
yas = yas.replace(/9/g, ""); |
|
|
|
|
|
|
|
yas = yas.replace(/0/g, ""); |
|
|
|
|
|
|
|
yas = yas.replace(/q/g, ""); |
|
|
|
|
|
|
|
yas = yas.replace(/w/g, ""); |
|
|
|
|
|
|
|
yas = yas.replace(/e/g, ""); |
|
|
|
|
|
|
|
yas = yas.replace(/r/g, ""); |
|
|
|
|
|
|
|
yas = yas.replace(/t/g, ""); |
|
|
|
|
|
|
|
yas = yas.replace(/y/g, ""); |
|
|
|
|
|
|
|
yas = yas.replace(/u/g, ""); |
|
|
|
|
|
|
|
yas = yas.replace(/i/g, ""); |
|
|
|
|
|
|
|
yas = yas.replace(/o/g, ""); |
|
|
|
|
|
|
|
yas = yas.replace(/p/g, ""); |
|
|
|
|
|
|
|
yas = yas.replace(/\[/g, ""); |
|
|
|
|
|
|
|
yas = yas.replace(/\]/g, ""); |
|
|
|
|
|
|
|
yas = yas.replace(/a/g, ""); |
|
|
|
|
|
|
|
yas = yas.replace(/s/g, ""); |
|
|
|
|
|
|
|
yas = yas.replace(/d/g, ""); |
|
|
|
|
|
|
|
yas = yas.replace(/f/g, ""); |
|
|
|
|
|
|
|
yas = yas.replace(/g/g, ""); |
|
|
|
|
|
|
|
yas = yas.replace(/h/g, ""); |
|
|
|
|
|
|
|
yas = yas.replace(/j/g, ""); |
|
|
|
|
|
|
|
yas = yas.replace(/k/g, ""); |
|
|
|
|
|
|
|
yas = yas.replace(/l/g, ""); |
|
|
|
|
|
|
|
yas = yas.replace(/\;/g, ""); |
|
|
|
|
|
|
|
yas = yas.replace(/\'/g, ""); |
|
|
|
|
|
|
|
yas = yas.replace(/z/g, ""); |
|
|
|
|
|
|
|
yas = yas.replace(/x/g, ""); |
|
|
|
|
|
|
|
yas = yas.replace(/c/g, ""); |
|
|
|
|
|
|
|
yas = yas.replace(/v/g, ""); |
|
|
|
|
|
|
|
yas = yas.replace(/b/g, ""); |
|
|
|
|
|
|
|
yas = yas.replace(/n/g, ""); |
|
|
|
|
|
|
|
yas = yas.replace(/m/g, ""); |
|
|
|
|
|
|
|
yas = yas.replace(/\,/g, ""); |
|
|
|
|
|
|
|
yas = yas.replace(/\./g, ""); |
|
|
|
|
|
|
|
yas = yas.replace(/\//g, ""); |
|
|
|
|
|
|
|
yas = yas.replace(/~/g, " "); |
|
|
|
|
|
|
|
yas = yas.replace(/Q/g, ""); |
|
|
|
|
|
|
|
yas = yas.replace(/W/g, ""); |
|
|
|
|
|
|
|
yas = yas.replace(/E/g, ""); |
|
|
|
|
|
|
|
yas = yas.replace(/R/g, ""); |
|
|
|
|
|
|
|
yas = yas.replace(/T/g, ""); |
|
|
|
|
|
|
|
yas = yas.replace(/Y/g, ""); |
|
|
|
|
|
|
|
yas = yas.replace(/U/g, ""); |
|
|
|
|
|
|
|
yas = yas.replace(/I/g, ""); |
|
|
|
|
|
|
|
yas = yas.replace(/O/g, ""); |
|
|
|
|
|
|
|
yas = yas.replace(/P/g, ""); |
|
|
|
|
|
|
|
yas = yas.replace(/A/g, ""); |
|
|
|
|
|
|
|
yas = yas.replace(/S/g, ""); |
|
|
|
|
|
|
|
yas = yas.replace(/G/g, ""); |
|
|
|
|
|
|
|
yas = yas.replace(/H/g, ""); |
|
|
|
|
|
|
|
yas = yas.replace(/J/g, ""); |
|
|
|
|
|
|
|
yas = yas.replace(/K/g, ""); |
|
|
|
|
|
|
|
yas = yas.replace(/L/g, ""); |
|
|
|
|
|
|
|
yas = yas.replace(/Z/g, ""); |
|
|
|
|
|
|
|
yas = yas.replace(/X/g, ""); |
|
|
|
|
|
|
|
yas = yas.replace(/B/g, ""); |
|
|
|
|
|
|
|
yas = yas.replace(/N/g, ""); |
|
|
|
|
|
|
|
yas = yas.replace(/M/g, ""); |
|
|
|
|
|
|
|
yas = yas.replace(/\?/g, ""); |
|
|
|
|
|
|
|
return yas; |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
render() { |
|
|
|
render() { |
|
|
|
const { user, profile } = this.props; |
|
|
|
const { user, profile } = this.props; |
|
|
|
return ( |
|
|
|
return ( |
|
|
@ -342,6 +416,7 @@ class Profile extends Component { |
|
|
|
label="نام" |
|
|
|
label="نام" |
|
|
|
parent={this} |
|
|
|
parent={this} |
|
|
|
defaultValue={profile} |
|
|
|
defaultValue={profile} |
|
|
|
|
|
|
|
onInput={this.forcePersian} |
|
|
|
/> |
|
|
|
/> |
|
|
|
<Input |
|
|
|
<Input |
|
|
|
name="lastName" |
|
|
|
name="lastName" |
|
|
|