Browse Source
- Update correctly the Avatar and Vcard4 and force the refresh if they're not present
- Update correctly the Avatar and Vcard4 and force the refresh if they're not present
- Fix some warnings and old linespull/16/head
17 changed files with 357 additions and 290 deletions
-
20app/models/contact/Contact.php
-
4app/models/subscription/Subscription.php
-
9app/models/subscription/SubscriptionDAO.php
-
36app/widgets/Avatar/Avatar.php
-
47app/widgets/Avatar/_avatar_form.tpl
-
53app/widgets/Avatar/avatar.tpl
-
1app/widgets/Bookmark/Bookmark.php
-
3app/widgets/Chat/_chat_contact.tpl
-
9app/widgets/Explore/Explore.php
-
2app/widgets/Location/Location.php
-
4app/widgets/Node/Node.php
-
5app/widgets/Node/_node_content.tpl
-
36app/widgets/Roster/Roster.php
-
66app/widgets/Vcard4/Vcard4.php
-
172app/widgets/Vcard4/_vcard4_form.tpl
-
178app/widgets/Vcard4/vcard4.tpl
-
2lib/XMPPtoForm.php
@ -0,0 +1,47 @@ |
|||
<form name="avatarform" id="avatarform"> |
|||
<fieldset> |
|||
<legend>{$c->t('Avatar')}</legend> |
|||
<div class="element"> |
|||
<label for="avatar">{$c->t('Avatar')}</label> |
|||
<img id="vCardPhotoPreview" src="data:'.$me->phototype.';base64,{$me->photobin}"> |
|||
<br /><span id="picturesize" class="clean"></span><br /><br /> |
|||
|
|||
<input type="file" onchange="vCardImageLoad(this.files);"> |
|||
|
|||
<input type="hidden" name="phototype" value="{$me->phototype}"/> |
|||
<input type="hidden" name="photobin" value="{$me->photobin}"/> |
|||
</div> |
|||
|
|||
<div class="element" id="camdiv"> |
|||
<label for="url">{$c->t('Webcam')}</label> |
|||
<video id="runningcam" class="squares" autoplay></video> |
|||
<canvas style="display:none;"></canvas> |
|||
|
|||
<a |
|||
id="shoot" |
|||
class="button icon preview color green" |
|||
onclick="return false;"> |
|||
{$c->t("Cheese !")} |
|||
</a> |
|||
<a |
|||
id="capture" |
|||
class="button icon image color purple" |
|||
onclick=" |
|||
showVideo(); |
|||
return false;"> |
|||
{$c->t("Take a webcam snapshot")} |
|||
</a> |
|||
</div> |
|||
</fieldset> |
|||
|
|||
<a |
|||
onclick=" |
|||
{$submit} |
|||
movim_button_save('#avatarvalidate'); |
|||
this.value = '{$c->t('Submitting')}'; |
|||
this.className='button color orange icon loading inactive';" |
|||
class="button icon color green yes" |
|||
id="avatarvalidate" |
|||
style="float: right;" |
|||
>{$c->t('Submit')}</a> |
|||
</form> |
|||
@ -1,50 +1,9 @@ |
|||
<div class="tabelem padded" title="{$c->t('Avatar')}" id="avatar" > |
|||
<div class="protect orange"></div> |
|||
<form name="avatarform" id="avatarform"> |
|||
<fieldset> |
|||
<legend>{$c->t('Avatar')}</legend> |
|||
<div class="element"> |
|||
<label for="avatar">{$c->t('Avatar')}</label> |
|||
<img id="vCardPhotoPreview" src="data:'.$me->phototype.';base64,{$me->photobin}"> |
|||
<br /><span id="picturesize" class="clean"></span><br /><br /> |
|||
|
|||
<input type="file" onchange="vCardImageLoad(this.files);"> |
|||
|
|||
<input type="hidden" name="phototype" value="{$me->phototype}"/> |
|||
<input type="hidden" name="photobin" value="{$me->photobin}"/> |
|||
</div> |
|||
|
|||
<div class="element" id="camdiv"> |
|||
<label for="url">{$c->t('Webcam')}</label> |
|||
<video id="runningcam" class="squares" autoplay></video> |
|||
<canvas style="display:none;"></canvas> |
|||
|
|||
<a |
|||
id="shoot" |
|||
class="button icon preview color green" |
|||
onclick="return false;"> |
|||
{$c->t("Cheese !")} |
|||
</a> |
|||
<a |
|||
id="capture" |
|||
class="button icon image color purple" |
|||
onclick=" |
|||
showVideo(); |
|||
return false;"> |
|||
{$c->t("Take a webcam snapshot")} |
|||
</a> |
|||
</div> |
|||
</fieldset> |
|||
|
|||
<a |
|||
onclick=" |
|||
{$submit} |
|||
movim_button_save('#avatarvalidate'); |
|||
this.value = '{$c->t('Submitting')}'; |
|||
this.className='button color orange icon loading inactive';" |
|||
class="button icon color green yes" |
|||
id="avatarvalidate" |
|||
style="float: right;" |
|||
>{$c->t('Submit')}</a> |
|||
</form> |
|||
{if="$getavatar != null"} |
|||
<script type="text/javascript">setTimeout('{$getavatar}', 1000);</script> |
|||
{/if} |
|||
<div id="avatar_form"> |
|||
{$form} |
|||
</div> |
|||
</div> |
|||
@ -0,0 +1,172 @@ |
|||
<form name="vcard4" id="vcard4form"> |
|||
<fieldset> |
|||
<legend>{$c->t('General Informations')}</legend> |
|||
<div class="element"> |
|||
<label for="fn">{$c->t('Name')}</label> |
|||
<input type="text" name="fn" class="content" value="{$me->fn}"> |
|||
</div> |
|||
<div class="element"> |
|||
<label for="fn">{$c->t('Nickname')}</label> |
|||
<input type="text" name="name" class="content" value="{$me->name}"> |
|||
</div> |
|||
<div class="element"> |
|||
<label for="fn">{$c->t('Email')}</label> |
|||
<input type="email" name="email" class="content" value="{$me->email}"> |
|||
</div> |
|||
|
|||
<!-- The date picker --> |
|||
|
|||
<div class="element "> |
|||
<label for="day">{$c->t('Date of Birth')}</label> |
|||
<div class="select" style="width: 33%; float: left;"> |
|||
<select name="day" class="datepicker"> |
|||
<option value="-1">{$c->t('Day')}</option> |
|||
{loop="$days"} |
|||
<option value="{$value}" |
|||
{if="$key == substr($me->date, 8)"} |
|||
selected |
|||
{/if} |
|||
>{$value}</option> |
|||
{/loop} |
|||
</select> |
|||
</div> |
|||
|
|||
<div class="select" style="width: 34%; float: left;"> |
|||
<select name="month" class="datepicker"> |
|||
<option value="-1">{$c->t('Month')}</option> |
|||
{loop="$months"} |
|||
<option value="{$key}" |
|||
{if="$key == substr($me->date,5,2)"} |
|||
selected |
|||
{/if} |
|||
>{$value}</option> |
|||
{/loop} |
|||
</select> |
|||
</div> |
|||
|
|||
<div class="select" style="width: 33%; float: left;"> |
|||
<select name="year" class="datepicker"> |
|||
<option value="-1">{$c->t('Year')}</option> |
|||
{loop="$years"} |
|||
<option value="{$value}" |
|||
{if="$value == substr($me->date,0,4)"} |
|||
selected |
|||
{/if} |
|||
>{$value}</option> |
|||
{/loop} |
|||
</select> |
|||
</div> |
|||
</div> |
|||
|
|||
<div class="element"> |
|||
<label for="gender">{$c->t('Gender')}</label> |
|||
<div class="select"> |
|||
<select name="gender"> |
|||
{loop="$gender"} |
|||
<option |
|||
{if="$key == $me->gender"} |
|||
selected |
|||
{/if} |
|||
value="{$key}">{$value}</option> |
|||
{/loop} |
|||
</select> |
|||
</div> |
|||
</div> |
|||
|
|||
<div class="element"> |
|||
<label for="marital">{$c->t('Marital Status')}</label> |
|||
<div class="select"> |
|||
<select name="marital"> |
|||
{loop="$marital"} |
|||
<option |
|||
{if="$key == $me->marital"} |
|||
selected |
|||
{/if} |
|||
value="{$key}">{$value}</option> |
|||
{/loop} |
|||
</select> |
|||
</div> |
|||
</div> |
|||
|
|||
<div class="element large"> |
|||
<label for="url">{$c->t('Website')}</label> |
|||
<input type="url" name ="url" class="content" value="{$me->url}"> |
|||
</div> |
|||
|
|||
<div class="element large"> |
|||
<label for="desc">{$c->t('About Me')}</label> |
|||
<textarea name="desc" id="desctext" class="content" onkeyup="movim_textarea_autoheight(this);">{$desc}</textarea> |
|||
</div> |
|||
</fieldset> |
|||
|
|||
<fieldset> |
|||
<legend>{$c->t('Geographic Position')}</legend> |
|||
|
|||
<div class="element"> |
|||
<label for="url">{$c->t('Locality')}</label> |
|||
<input type="text" type="locality" name ="locality" class="content" value="{$me->adrlocality}"> |
|||
</div> |
|||
|
|||
<div class="element"> |
|||
<label for="country">{$c->t('Country')}</label> |
|||
<div class="select"> |
|||
<select name="country"> |
|||
<option value=""></option> |
|||
{loop="$countries"} |
|||
<option |
|||
{if="$value == $me->adrcountry"} |
|||
selected |
|||
{/if} |
|||
value="{$value}">{$value}</option> |
|||
{/loop} |
|||
</select> |
|||
</div> |
|||
</div> |
|||
|
|||
</fieldset> |
|||
|
|||
<fieldset> |
|||
<a |
|||
onclick=" |
|||
{$submit} |
|||
movim_button_save('#vcard4validate'); |
|||
this.value = '{$c->t('Submitting')}'; |
|||
this.className='button color orange icon loading merged right inactive';" |
|||
class="button icon merged right color green yes" |
|||
style="float: right;" |
|||
id="vcard4validate" |
|||
>{$c->t('Submit')}</a> |
|||
<a |
|||
onclick="document.querySelector('#vcard4form').reset();" |
|||
class="button icon no merged left color orange" |
|||
style="float: right;">{$c->t('Reset')}</a> |
|||
</fieldset> |
|||
|
|||
<fieldset> |
|||
<legend>{$c->t('Privacy Level')}</legend> |
|||
<div class="element"> |
|||
<label>{$c->t('Is this profile public ?')}</label> |
|||
<div class="checkbox"> |
|||
<input |
|||
type="checkbox" |
|||
id="privacy" |
|||
name="privacy" |
|||
{if="$me->privacy"} |
|||
checked |
|||
{/if} |
|||
onchange="{$privacy}"/> |
|||
<label for="privacy"></label> |
|||
</div> |
|||
</div> |
|||
<div class="element"> |
|||
<div class="message info"> |
|||
{$c->t('Please pay attention ! By making your profile public, all the information listed above will be available for all the Movim users and on the whole Internet.')} |
|||
</div> |
|||
</div> |
|||
<!--<div class="element"> |
|||
|
|||
|
|||
|
|||
</div>--> |
|||
</fieldset> |
|||
</form> |
|||
@ -1,174 +1,8 @@ |
|||
<div class="tabelem padded" title="{$c->t('Data')}" id="vcard4" > |
|||
<form name="vcard4" id="vcard4form"> |
|||
<fieldset> |
|||
<legend>{$c->t('General Informations')}</legend> |
|||
<div class="element"> |
|||
<label for="fn">{$c->t('Name')}</label> |
|||
<input type="text" name="fn" class="content" value="{$me->fn}"> |
|||
</div> |
|||
<div class="element"> |
|||
<label for="fn">{$c->t('Nickname')}</label> |
|||
<input type="text" name="name" class="content" value="{$me->name}"> |
|||
</div> |
|||
<div class="element"> |
|||
<label for="fn">{$c->t('Email')}</label> |
|||
<input type="email" name="email" class="content" value="{$me->email}"> |
|||
</div> |
|||
|
|||
<!-- The date picker --> |
|||
|
|||
<div class="element "> |
|||
<label for="day">{$c->t('Date of Birth')}</label> |
|||
<div class="select" style="width: 33%; float: left;"> |
|||
<select name="day" class="datepicker"> |
|||
<option value="-1">{$c->t('Day')}</option> |
|||
{loop="$days"} |
|||
<option value="{$value}" |
|||
{if="$key == substr($me->date, 8)"} |
|||
selected |
|||
{/if} |
|||
>{$value}</option> |
|||
{/loop} |
|||
</select> |
|||
</div> |
|||
|
|||
<div class="select" style="width: 34%; float: left;"> |
|||
<select name="month" class="datepicker"> |
|||
<option value="-1">{$c->t('Month')}</option> |
|||
{loop="$months"} |
|||
<option value="{$key}" |
|||
{if="$key == substr($me->date,5,2)"} |
|||
selected |
|||
{/if} |
|||
>{$value}</option> |
|||
{/loop} |
|||
</select> |
|||
</div> |
|||
|
|||
<div class="select" style="width: 33%; float: left;"> |
|||
<select name="year" class="datepicker"> |
|||
<option value="-1">{$c->t('Year')}</option> |
|||
{loop="$years"} |
|||
<option value="{$value}" |
|||
{if="$value == substr($me->date,0,4)"} |
|||
selected |
|||
{/if} |
|||
>{$value}</option> |
|||
{/loop} |
|||
</select> |
|||
</div> |
|||
</div> |
|||
|
|||
<div class="element"> |
|||
<label for="gender">{$c->t('Gender')}</label> |
|||
<div class="select"> |
|||
<select name="gender"> |
|||
{loop="$gender"} |
|||
<option |
|||
{if="$key == $me->gender"} |
|||
selected |
|||
{/if} |
|||
value="{$key}">{$value}</option> |
|||
{/loop} |
|||
</select> |
|||
</div> |
|||
</div> |
|||
|
|||
<div class="element"> |
|||
<label for="marital">{$c->t('Marital Status')}</label> |
|||
<div class="select"> |
|||
<select name="marital"> |
|||
{loop="$marital"} |
|||
<option |
|||
{if="$key == $me->marital"} |
|||
selected |
|||
{/if} |
|||
value="{$key}">{$value}</option> |
|||
{/loop} |
|||
</select> |
|||
</div> |
|||
</div> |
|||
|
|||
<div class="element large"> |
|||
<label for="url">{$c->t('Website')}</label> |
|||
<input type="url" name ="url" class="content" value="{$me->url}"> |
|||
</div> |
|||
|
|||
<div class="element large"> |
|||
<label for="desc">{$c->t('About Me')}</label> |
|||
<textarea name="desc" id="desctext" class="content" onkeyup="movim_textarea_autoheight(this);">{$desc}</textarea> |
|||
</div> |
|||
</fieldset> |
|||
|
|||
<fieldset> |
|||
<legend>{$c->t('Geographic Position')}</legend> |
|||
|
|||
<div class="element"> |
|||
<label for="url">{$c->t('Locality')}</label> |
|||
<input type="text" type="locality" name ="locality" class="content" value="{$me->adrlocality}"> |
|||
</div> |
|||
|
|||
<div class="element"> |
|||
<label for="country">{$c->t('Country')}</label> |
|||
<div class="select"> |
|||
<select name="country"> |
|||
<option value=""></option> |
|||
{loop="$countries"} |
|||
<option |
|||
{if="$value == $me->adrcountry"} |
|||
selected |
|||
{/if} |
|||
value="{$value}">{$value}</option> |
|||
{/loop} |
|||
</select> |
|||
</div> |
|||
</div> |
|||
|
|||
</fieldset> |
|||
|
|||
<fieldset> |
|||
<a |
|||
onclick=" |
|||
{$submit} |
|||
movim_button_save('#vcard4validate'); |
|||
this.value = '{$c->t('Submitting')}'; |
|||
this.className='button color orange icon loading merged right inactive';" |
|||
class="button icon merged right color green yes" |
|||
style="float: right;" |
|||
id="vcard4validate" |
|||
>{$c->t('Submit')}</a> |
|||
<a |
|||
onclick="document.querySelector('#vcard4form').reset();" |
|||
class="button icon no merged left color orange" |
|||
style="float: right;">{$c->t('Reset')}</a> |
|||
</fieldset> |
|||
|
|||
<fieldset> |
|||
<legend>{$c->t('Privacy Level')}</legend> |
|||
<div class="element"> |
|||
<label>{$c->t('Is this profile public ?')}</label> |
|||
<div class="checkbox"> |
|||
<input |
|||
type="checkbox" |
|||
id="privacy" |
|||
name="privacy" |
|||
{if="$me->privacy"} |
|||
checked |
|||
{/if} |
|||
onchange="{$privacy}"/> |
|||
<label for="privacy"></label> |
|||
</div> |
|||
</div> |
|||
<div class="element"> |
|||
<div class="message info"> |
|||
{$c->t('Please pay attention ! By making your profile public, all the information listed above will be available for all the Movim users and on the whole Internet.')} |
|||
</div> |
|||
</div> |
|||
<!--<div class="element"> |
|||
|
|||
|
|||
|
|||
</div>--> |
|||
</fieldset> |
|||
</form> |
|||
{if="$me == null"} |
|||
<script type="text/javascript">setTimeout('{$getvcard}', 500);</script> |
|||
{/if} |
|||
<div id="vcard_form"> |
|||
{$form} |
|||
</div> |
|||
</div> |
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue