Skip to content

Commit

Permalink
MAJB303 : UCP : Amis, ignorés, préférences et profil (fin de l'ucp_*)
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexandre-T committed Dec 26, 2013
1 parent 8185219 commit 6304488
Show file tree
Hide file tree
Showing 9 changed files with 607 additions and 567 deletions.
20 changes: 13 additions & 7 deletions phpBBBootstrap/template/custom_profile_fields.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@
<!-- END text -->

<!-- BEGIN string -->
<span class="input-group-addon"><i class="icon-list"></i></span>
<input class="form-control" type="text" name="{string.FIELD_IDENT}" id="{string.FIELD_IDENT}" maxlength="{string.FIELD_MAXLEN}" value="{string.FIELD_VALUE}" />
<div class="input-group">
<div class="input-group-addon"><i class="icon-align-justify"></i></div>
<input class="form-control" type="text" name="{string.FIELD_IDENT}" id="{string.FIELD_IDENT}" maxlength="{string.FIELD_MAXLEN}" value="{string.FIELD_VALUE}" />
</div>
<!-- END string -->

<!-- BEGIN bool -->
Expand All @@ -22,12 +24,16 @@
<!-- END bool -->

<!-- BEGIN int -->
<span class="input-group-addon"><i class="icon-list-ol"></i></span>
<input class="form-control" type="text" name="{int.FIELD_IDENT}" id="{int.FIELD_IDENT}" value="{int.FIELD_VALUE}" />
<div class="input-group">
<div class="input-group-addon"><i class="icon-list-ol"></i></div>
<input class="form-control" type="text" name="{int.FIELD_IDENT}" id="{int.FIELD_IDENT}" value="{int.FIELD_VALUE}" />
</div>
<!-- END int -->

<!-- BEGIN date -->
<label for="{date.FIELD_IDENT}_day">{L_DAY}: <select class="form-control" name="{date.FIELD_IDENT}_day" id="{date.FIELD_IDENT}_day">{date.S_DAY_OPTIONS}</select></label>
<label for="{date.FIELD_IDENT}_month">{L_MONTH}: <select class="form-control" name="{date.FIELD_IDENT}_month" id="{date.FIELD_IDENT}_month">{date.S_MONTH_OPTIONS}</select></label>
<label for="{date.FIELD_IDENT}_year">{L_YEAR}: <select class="form-control" name="{date.FIELD_IDENT}_year" id="{date.FIELD_IDENT}_year">{date.S_YEAR_OPTIONS}</select></label>
<div class="form-inline">
<label for="{date.FIELD_IDENT}_day">{L_DAY}&nbsp;: <select class="form-control" name="{date.FIELD_IDENT}_day" id="{date.FIELD_IDENT}_day">{date.S_DAY_OPTIONS}</select></label>
&nbsp;<label for="{date.FIELD_IDENT}_month">{L_MONTH}&nbsp;: <select class="form-control" name="{date.FIELD_IDENT}_month" id="{date.FIELD_IDENT}_month">{date.S_MONTH_OPTIONS}</select></label>
&nbsp;<label for="{date.FIELD_IDENT}_year">{L_YEAR}&nbsp;: <select class="form-control" name="{date.FIELD_IDENT}_year" id="{date.FIELD_IDENT}_year">{date.S_YEAR_OPTIONS}</select></label>
</div>
<!-- END date -->
276 changes: 136 additions & 140 deletions phpBBBootstrap/template/ucp_prefs_personal.html
Original file line number Diff line number Diff line change
@@ -1,129 +1,142 @@
<!-- INCLUDE ucp_header.html -->

<form id="ucp" method="post" action="{S_UCP_ACTION}"{S_FORM_ENCTYPE} class="form form-horizontal form-large">
<form id="ucp" method="post" action="{S_UCP_ACTION}"{S_FORM_ENCTYPE} class="form-horizontal">
<div class="panel panel-default">
<div class="panel-heading"><h2 class="panel-title"><i class="icon-cogs"></i> {L_TITLE}</h2></div>
<div class="panel-body">
<fieldset>
<!-- IF ERROR --><p class="alert alert-danger alert-block">{ERROR}</p><!-- ENDIF -->

<h3><i class="icon-cogs"></i> {L_TITLE}</h3>

<fieldset>
<!-- IF ERROR --><p class="alert alert-danger alert-block">{ERROR}</p><!-- ENDIF -->
<div class="form-group">
<span class="control-label">{L_SHOW_EMAIL}</span>
<div class="controls">
<label for="viewemail1" class="radio-inline">
<input type="radio" name="viewemail" id="viewemail1" value="1" <!-- IF S_VIEW_EMAIL --> checked="checked"<!-- ENDIF --> />
{L_YES}
</label>
<label for="viewemail0" class="radio-inline">
<input type="radio" name="viewemail" id="viewemail0" value="0"<!-- IF not S_VIEW_EMAIL --> checked="checked"<!-- ENDIF --> />
{L_NO}
</label>
</div>
</div>

<div class="form-group">
<span class="control-label">{L_ADMIN_EMAIL}</span>
<div class="controls">
<label for="massemail1" class="radio-inline">
<input type="radio" name="massemail" id="massemail1" value="1"<!-- IF S_MASS_EMAIL --> checked="checked"<!-- ENDIF --> />
{L_YES}
</label>
<label for="massemail0" class="radio-inline">
<input type="radio" name="massemail" id="massemail0" value="0"<!-- IF not S_MASS_EMAIL --> checked="checked"<!-- ENDIF --> />
{L_NO}
</label>
</div>
</div>
<div class="form-group">
<span class="control-label">{L_ALLOW_PM}</span>
<div class="controls">
<label for="allowpm1" class="radio-inline"><input type="radio" name="allowpm" id="allowpm1" value="1"<!-- IF S_ALLOW_PM --> checked="checked"<!-- ENDIF --> /> {L_YES}</label>
<label for="allowpm0" class="radio-inline"><input type="radio" name="allowpm" id="allowpm0" value="0"<!-- IF not S_ALLOW_PM --> checked="checked"<!-- ENDIF --> /> {L_NO}</label>
<span class="help-block"><em>{L_ALLOW_PM_EXPLAIN}</em></span>
</div>
</div>
<!-- IF S_CAN_HIDE_ONLINE -->
<div class="form-group">
<span class="control-label">{L_HIDE_ONLINE}</span>
<div class="controls">
<label for="hideonline1" class="radio-inline"><input type="radio" name="hideonline" id="hideonline1" value="1"<!-- IF S_HIDE_ONLINE --> checked="checked"<!-- ENDIF --> /> {L_YES}</label>
<label for="hideonline0" class="radio-inline"><input type="radio" name="hideonline" id="hideonline0" value="0"<!-- IF not S_HIDE_ONLINE --> checked="checked"<!-- ENDIF --> /> {L_NO}</label>
<span class="help-inline"><em>{L_HIDE_ONLINE_EXPLAIN}</em></span>
<div class="form-group">
<label class="control-label col-sm-6">{L_SHOW_EMAIL}</label>
<div class="col-sm-6">
<div class="input-group">
<label for="viewemail1" class="radio-inline">
<input type="radio" name="viewemail" id="viewemail1" value="1" <!-- IF S_VIEW_EMAIL --> checked="checked"<!-- ENDIF --> />
{L_YES}
</label>
<label for="viewemail0" class="radio-inline">
<input type="radio" name="viewemail" id="viewemail0" value="0"<!-- IF not S_VIEW_EMAIL --> checked="checked"<!-- ENDIF --> />
{L_NO}
</label>
</div>
</div>
</div>
</div>
<!-- ENDIF -->
<!-- IF S_SELECT_NOTIFY -->
<div class="form-group">
<span class="control-label">{L_NOTIFY_METHOD}</span>
<div class="controls">
<label for="notifymethod0" class="radio-inline"><input type="radio" name="notifymethod" id="notifymethod0" value="0"<!-- IF S_NOTIFY_EMAIL --> checked="checked"<!-- ENDIF --> /> {L_NOTIFY_METHOD_EMAIL}</label>
<label for="notifymethod1" class="radio-inline"><input type="radio" name="notifymethod" id="notifymethod1" value="1"<!-- IF S_NOTIFY_IM --> checked="checked"<!-- ENDIF --> /> {L_NOTIFY_METHOD_IM}</label>
<label for="notifymethod2" class="radio-inline"><input type="radio" name="notifymethod" id="notifymethod2" value="2"<!-- IF S_NOTIFY_BOTH --> checked="checked"<!-- ENDIF --> /> {L_NOTIFY_METHOD_BOTH}</label>

<div class="form-group">
<label class="control-label col-sm-6">{L_ADMIN_EMAIL}</label>
<div class="col-sm-6">
<label for="massemail1" class="radio-inline">
<input type="radio" name="massemail" id="massemail1" value="1"<!-- IF S_MASS_EMAIL --> checked="checked"<!-- ENDIF --> />
{L_YES}
</label>
<label for="massemail0" class="radio-inline">
<input type="radio" name="massemail" id="massemail0" value="0"<!-- IF not S_MASS_EMAIL --> checked="checked"<!-- ENDIF --> />
{L_NO}
</label>
</div>
</div>
</div>
<!-- ENDIF -->
<div class="form-group">
<span class="control-label">{L_NOTIFY_ON_PM}</span>
<div class="controls">
<label for="notifypm1" class="radio-inline"><input type="radio" name="notifypm" id="notifypm1" value="1"<!-- IF S_NOTIFY_PM --> checked="checked"<!-- ENDIF --> /> {L_YES}</label>
<label for="notifypm0" class="radio-inline"><input type="radio" name="notifypm" id="notifypm0" value="0"<!-- IF not S_NOTIFY_PM --> checked="checked"<!-- ENDIF --> /> {L_NO}</label>
</div>
</div>
<div class="form-group">
<span class="control-label">{L_POPUP_ON_PM}</span>
<div class="controls">
<label for="popuppm1" class="radio-inline"><input type="radio" name="popuppm" id="popuppm1" value="1"<!-- IF S_POPUP_PM --> checked="checked"<!-- ENDIF --> /> {L_YES}</label>
<label for="popuppm0" class="radio-inline"><input type="radio" name="popuppm" id="popuppm0" value="0"<!-- IF not S_POPUP_PM --> checked="checked"<!-- ENDIF --> /> {L_NO}</label>
</div>
</div>
<!-- IF S_MORE_LANGUAGES -->
<div class="form-group">
<label class="control-label" for="lang">{L_BOARD_LANGUAGE}</label>
<div class="controls">
<select name="lang" id="lang">{S_LANG_OPTIONS}</select>
</div>
</div>
<!-- ENDIF -->
<!-- IF S_STYLE_OPTIONS and S_MORE_STYLES -->
<div class="form-group">
<label class="control-label" for="style">{L_BOARD_STYLE}</label>
<div class="controls">
<select name="style" id="style">{S_STYLE_OPTIONS}</select>
</div>
</div>
<!-- ENDIF -->
<div class="form-group">
<label class="control-label" for="timezone">{L_BOARD_TIMEZONE}</label>
<div class="controls">
<select name="tz" id="timezone" class="autowidth">{S_TZ_OPTIONS}</select>
</div>
</div>
<div class="form-group">
<span class="control-label" for="dst1">{L_BOARD_DST}</span>
<div class="controls">
<label class="radio-inline" for="dst1"><input type="radio" name="dst" id="dst1" value="1"<!-- IF S_DST --> checked="checked"<!-- ENDIF --> /> {L_YES}</label>
<label class="radio-inline" for="dst0"><input type="radio" name="dst" id="dst0" value="0"<!-- IF not S_DST --> checked="checked"<!-- ENDIF --> /> {L_NO}</label>
</div>
</div>
<div class="form-group">
<label class="control-label" for="dateformat">{L_BOARD_DATE_FORMAT}</label>
<div class="controls">
<select name="dateoptions" id="dateoptions" onchange="if(this.value=='custom'){dE('custom_date',1);}else{dE('custom_date',-1);} if (this.value == 'custom') { document.getElementById('dateformat').value = default_dateformat; } else { document.getElementById('dateformat').value = this.value; }">
{S_DATEFORMAT_OPTIONS}
</select>
<span id="custom_date" style="display:none;"><input type="text" name="dateformat" id="dateformat" value="{DATE_FORMAT}" maxlength="30" class="inputbox narrow" style="margin-top: 3px;" /></span>
<span class="help-block">
<em>{L_BOARD_DATE_FORMAT_EXPLAIN}</em><br/>
</span>
</div>
<div class="form-group">
<label class="control-label col-sm-6">{L_ALLOW_PM}</label>
<div class="col-sm-6">
<label for="allowpm1" class="radio-inline"><input type="radio" name="allowpm" id="allowpm1" value="1"<!-- IF S_ALLOW_PM --> checked="checked"<!-- ENDIF --> /> {L_YES}</label>
<label for="allowpm0" class="radio-inline"><input type="radio" name="allowpm" id="allowpm0" value="0"<!-- IF not S_ALLOW_PM --> checked="checked"<!-- ENDIF --> /> {L_NO}</label>
<span class="help-block"><em>{L_ALLOW_PM_EXPLAIN}</em></span>
</div>
</div>
<!-- IF S_CAN_HIDE_ONLINE -->
<div class="form-group">
<label class="control-label col-sm-6">{L_HIDE_ONLINE}</label>
<div class="col-sm-6">
<label for="hideonline1" class="radio-inline"><input type="radio" name="hideonline" id="hideonline1" value="1"<!-- IF S_HIDE_ONLINE --> checked="checked"<!-- ENDIF --> /> {L_YES}</label>
<label for="hideonline0" class="radio-inline"><input type="radio" name="hideonline" id="hideonline0" value="0"<!-- IF not S_HIDE_ONLINE --> checked="checked"<!-- ENDIF --> /> {L_NO}</label>
<span class="help-block"><em>{L_HIDE_ONLINE_EXPLAIN}</em></span>
</div>
</div>
<!-- ENDIF -->
<!-- IF S_SELECT_NOTIFY -->
<div class="form-group">
<label class="control-label col-sm-6">{L_NOTIFY_METHOD}</label>
<div class="col-sm-6">
<label for="notifymethod0" class="radio-inline"><input type="radio" name="notifymethod" id="notifymethod0" value="0"<!-- IF S_NOTIFY_EMAIL --> checked="checked"<!-- ENDIF --> /> {L_NOTIFY_METHOD_EMAIL}</label>
<label for="notifymethod1" class="radio-inline"><input type="radio" name="notifymethod" id="notifymethod1" value="1"<!-- IF S_NOTIFY_IM --> checked="checked"<!-- ENDIF --> /> {L_NOTIFY_METHOD_IM}</label>
<label for="notifymethod2" class="radio-inline"><input type="radio" name="notifymethod" id="notifymethod2" value="2"<!-- IF S_NOTIFY_BOTH --> checked="checked"<!-- ENDIF --> /> {L_NOTIFY_METHOD_BOTH}</label>
</div>
</div>
<!-- ENDIF -->
<div class="form-group">
<label class="control-label col-sm-6">{L_NOTIFY_ON_PM}</label>
<div class="col-sm-6">
<label for="notifypm1" class="radio-inline"><input type="radio" name="notifypm" id="notifypm1" value="1"<!-- IF S_NOTIFY_PM --> checked="checked"<!-- ENDIF --> /> {L_YES}</label>
<label for="notifypm0" class="radio-inline"><input type="radio" name="notifypm" id="notifypm0" value="0"<!-- IF not S_NOTIFY_PM --> checked="checked"<!-- ENDIF --> /> {L_NO}</label>
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-6">{L_POPUP_ON_PM}</label>
<div class="col-sm-6">
<label for="popuppm1" class="radio-inline"><input type="radio" name="popuppm" id="popuppm1" value="1"<!-- IF S_POPUP_PM --> checked="checked"<!-- ENDIF --> /> {L_YES}</label>
<label for="popuppm0" class="radio-inline"><input type="radio" name="popuppm" id="popuppm0" value="0"<!-- IF not S_POPUP_PM --> checked="checked"<!-- ENDIF --> /> {L_NO}</label>
</div>
</div>
<!-- IF S_MORE_LANGUAGES -->
<div class="form-group">
<label class="control-label col-sm-6" for="lang">{L_BOARD_LANGUAGE}</label>
<div class="col-sm-6">
<select name="lang" class="form-control" id="lang">{S_LANG_OPTIONS}</select>
</div>
</div>
<!-- ENDIF -->
<!-- IF S_STYLE_OPTIONS and S_MORE_STYLES -->
<div class="form-group">
<label class="control-label col-sm-6" for="style">{L_BOARD_STYLE}</label>
<div class="col-sm-6">
<select name="style" class="form-control" id="style">{S_STYLE_OPTIONS}</select>
</div>
</div>
<!-- ENDIF -->
<div class="form-group">
<label class="control-label col-sm-6" for="timezone">{L_BOARD_TIMEZONE}</label>
<div class="col-sm-6">
<select name="tz" class="form-control" id="timezone" >{S_TZ_OPTIONS}</select>
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-6" for="dst1">{L_BOARD_DST}</label>
<div class="col-sm-6">
<label class="radio-inline" for="dst1"><input type="radio" name="dst" id="dst1" value="1"<!-- IF S_DST --> checked="checked"<!-- ENDIF --> /> {L_YES}</label>
<label class="radio-inline" for="dst0"><input type="radio" name="dst" id="dst0" value="0"<!-- IF not S_DST --> checked="checked"<!-- ENDIF --> /> {L_NO}</label>
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-6" for="dateformat">{L_BOARD_DATE_FORMAT}</label>
<div class="col-sm-3">
<select name="dateoptions" id="dateoptions" class="form-control" onchange="if(this.value=='custom'){$('#custom_date').show();}else{$('#custom_date').hide();} if (this.value == 'custom') { $('#dateformat').val(default_dateformat); } else { $('#dateformat').val(this.value); }">
{S_DATEFORMAT_OPTIONS}
</select>
</div>
<div class="col-sm-3">
<span id="custom_date" style="display:none;"><input type="text" name="dateformat" id="dateformat" value="{DATE_FORMAT}" maxlength="30" class="form-control" /></span>
</div>
<div class="col-sm-offset-6 col-sm-6">
<span class="help-block">
<em>{L_BOARD_DATE_FORMAT_EXPLAIN}</em><br/>
</span>
</div>
</div>
</fieldset>
</div>
</fieldset>

<fieldset class="form-actions">
<div class="panel-footer">
{S_HIDDEN_FIELDS}
<input type="reset" value="{L_RESET}" name="reset" class="btn btn-default" />&nbsp;
<input type="submit" name="submit" value="{L_SUBMIT}" class="btn btn-primary" />
<fieldset class="btn-group">
<input type="reset" value="{L_RESET}" name="reset" class="btn btn-default" />
<input type="submit" name="submit" value="{L_SUBMIT}" class="btn btn-primary" />
</fieldset>
{S_FORM_TOKEN}
</fieldset>
</div>
</div>



</form>

<script type="text/javascript">
Expand All @@ -133,28 +146,11 @@ <h3><i class="icon-cogs"></i> {L_TITLE}</h3>

function customDates()
{
var e = document.getElementById('dateoptions');

e.selectedIndex = e.length - 1;

// Loop and match date_format in menu
for (var i = 0; i < e.length; i++)
{
if (e.options[i].value == date_format)
{
e.selectedIndex = i;
break;
}
}

// Show/hide custom field
if (e.selectedIndex == e.length - 1)
{
dE('custom_date',1);
}
else
{
dE('custom_date',-1);

if ($('#dateoptions option:selected').val() == 'custom'){
$('#custom_date').show();
}else{
$('#custom_date').hide();
}
}

Expand Down
Loading

0 comments on commit 6304488

Please sign in to comment.