Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
LQDN Adminsys
don
Commits
5acaa592
Commit
5acaa592
authored
Apr 04, 2019
by
Okhin
Browse files
Function merge is working
parent
4b6a8a0c
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
app/controller/admin.php
View file @
5acaa592
...
@@ -881,6 +881,75 @@ class Admin extends Controller
...
@@ -881,6 +881,75 @@ class Admin extends Controller
$f3
->
reroute
(
"/admin/users/
$user_id
"
);
$f3
->
reroute
(
"/admin/users/
$user_id
"
);
}
}
public
function
user_merge
(
$f3
,
$args
)
{
$id
=
array_key_exists
(
'id'
,
$args
)
?
\
Utils
::
asl
(
$args
[
'id'
])
:
''
;
$f3
->
set
(
'id'
,
$id
);
if
(
$f3
->
get
(
'VERB'
)
==
'GET'
)
{
$merger
=
$f3
->
get
(
'container'
)[
'user_finder'
]
->
findById
(
$id
);
$email_merged
=
\
Utils
::
asl
(
$f3
->
get
(
'GET.merged'
));
$user
=
$f3
->
get
(
'container'
)[
'user_finder'
]
->
findById
(
$id
);
$merged
=
$f3
->
get
(
'container'
)[
'user_finder'
]
->
findByEmail
(
$email_merged
);
// Now, we're going to list all pledges and counterparts of merged user
// to display them to the admin.
$counterparts
=
$f3
->
get
(
'container'
)[
'counterpart_finder'
]
->
findByUserId
(
$merged
[
'id'
]);
$donations
=
$f3
->
get
(
'container'
)[
'donation_finder'
]
->
findByUserId
(
$merged
[
'id'
]);
// Augment the context
$f3
->
set
(
'merger'
,
$merger
);
$f3
->
set
(
'merged'
,
$merged
);
$f3
->
set
(
'total'
,
(
int
)
$merged
[
'total'
]
+
(
int
)
$merger
[
'total'
]);
$f3
->
set
(
'cumul'
,
(
int
)
$merged
[
'cumul'
]
+
(
int
)
$merger
[
'cumul'
]);
$f3
->
set
(
'counterparts'
,
$counterparts
);
$f3
->
set
(
'donations'
,
$donations
);
$f3
->
set
(
'block_content'
,
'backend/fusion_user.html'
);
}
else
if
(
$f3
->
get
(
'VERB'
)
==
'POST'
)
{
$merger_id
=
\
Utils
::
asl
(
$f3
->
get
(
'POST.merger_id'
));
$merged_id
=
\
Utils
::
asl
(
$f3
->
get
(
'POST.merged_id'
));
// Retrieving the associated users
$merger
=
$f3
->
get
(
'container'
)[
'user_finder'
]
->
findById
(
$merger_id
);
$merged
=
$f3
->
get
(
'container'
)[
'user_finder'
]
->
findById
(
$merged_id
);
// Update total and cumul values
$f3
->
get
(
'container'
)[
'command_handler'
]
->
handle
(
new
UserUpdateByAdminCommand
(
$merger_id
,
$merger
[
'pseudo'
],
$merger
[
'email'
],
$merger
[
'commentaire'
]
+
$merged
[
'commentaire'
],
(
int
)
$merger
[
'total'
]
+
(
int
)
$merged
[
'total'
],
(
int
)
$merger
[
'cumul'
]
+
(
int
)
$merged
[
'cumul'
]));
$db
=
$f3
->
get
(
'DB'
);
// Now, let's change all counterparts of merged
$db
->
query
(
"UPDATE contreparties
SET user_id = '"
.
$merger_id
.
"'
WHERE user_id = '"
.
$merged_id
.
"'"
);
// The donations
$db
->
query
(
"UPDATE dons
SET user_id = '"
.
$merger_id
.
"'
WHERE user_id = '"
.
$merged_id
.
"'"
);
// The identifiers
$db
->
query
(
"UPDATE identifiers
SET user_id = '"
.
$merger_id
.
"'
WHERE user_id = '"
.
$merged_id
.
"'"
);
// The adresses
$db
->
query
(
"UPDATE adresses
SET user_id = '"
.
$merger_id
.
"'
WHERE user_id = '"
.
$merged_id
.
"'"
);
// Remove the merged user
$db
->
query
(
"DELETE FROM users WHERE id = '"
.
$merged_id
.
"'"
);
// Reroute to the merger
$f3
->
reroute
(
'/admin/users/'
.
$merger_id
);
};
}
public
function
user
(
$f3
,
$args
)
public
function
user
(
$f3
,
$args
)
{
{
$id
=
array_key_exists
(
'id'
,
$args
)
?
\
Utils
::
asl
(
$args
[
'id'
])
:
''
;
$id
=
array_key_exists
(
'id'
,
$args
)
?
\
Utils
::
asl
(
$args
[
'id'
])
:
''
;
...
...
app/routes.ini
View file @
5acaa592
...
@@ -45,6 +45,7 @@ GET|POST @users:/admin/users=Controller\Admin->users
...
@@ -45,6 +45,7 @@ GET|POST @users:/admin/users=Controller\Admin->users
POST
@add_user:/admin/users/
add
=
Controller
\A
dmin->user
POST
@add_user:/admin/users/
add
=
Controller
\A
dmin->user
GET
@user_info:/admin/users/@
id
=
Controller
\A
dmin->user
GET
@user_info:/admin/users/@
id
=
Controller
\A
dmin->user
POST
@modify_user:/admin/users/@
id
=
Controller
\A
dmin->user
POST
@modify_user:/admin/users/@
id
=
Controller
\A
dmin->user
GET|POST
@fusion_user:/admin/users/fusion/@
id
=
Controller
\A
dmin->user_merge
POST
@adresse:/admin/
adresses
=
Controller
\A
dmin->adresse
POST
@adresse:/admin/
adresses
=
Controller
\A
dmin->adresse
...
...
app/view/backend/fusion_user.html
0 → 100644
View file @
5acaa592
<section
id=
"fusion"
>
<h2>
Fusion de deux utilisateurs
</h2>
<p>
Fusionner l'utilisateur #{{ @merged.id }} avec l'utilisateur #{{ @merger.id }}
</p>
<h3>
Utilisateur {{ @merger.pseudo }} après fusion
:
</h3>
<dl>
<dt>
Pseudo
</dt>
<dd>
{{ @merger.pseudo }}
</dd>
<dt>
Email
</dt>
<dd>
{{ @merger.email }}
</dd>
<dt>
Total
</dt>
<dd>
{{ @total }}
</dd>
<dt>
Cumul
</dt>
<dd>
{{ @cumul }}
</dd>
</dl>
</section>
<section
id=
"counterparts"
>
<h2>
Les contreparties suivantes seront ajoutées à {{ @merger.pseudo }}
</h2>
<table>
<thead>
<tr>
<th>
Id
</th>
<th>
Id du parent
</th>
<th>
Date
</th>
<th>
Quoi
</th>
<th>
Taille/Piplome
</th>
<th>
Statut
</th>
<th>
Commentaire
</th>
</tr>
</thead>
<tbody>
<repeat
group=
"{{ @counterparts }}"
value=
"{{ @row }}"
>
<tr>
<td>
{{ @row.id }}
</td>
<td>
{{ @row.parent }}
</td>
<td>
{{ @row.datec }}
</td>
<td>
{{ @row.quoi }}
</td>
<td>
<check
if=
"{{ @row.quoi=='piplome' }}"
>
<true>
<a
href=
"{{ @PIPLOME_URL }}{{ @row.pdf_url }}.pdf"
>
{{ @row.pdf_url }}
</a>
({{ @row.pdf_nom }})
</true>
<false>
<check
if=
"{{ @row.quoi=='pibag' }}"
>
<true>
</true>
<false>
{{ @atailles[@row.taille] }}
</false>
</check>
</false>
</check>
</td>
<td>
{{ @row.status }}
</td>
<td>
{{ @row.commentaire }}
</td>
</repeat>
</tr>
</tbody>
</table>
</section>
<section
id=
"donations"
>
<h2>
Les dons suivants seront ajoutés à {{ @merger.pseudo }}
</h2>
<table>
<thead>
<th>
Id
</th>
<th>
Date
</th>
<th>
Don
</th>
<th>
Adresse
</th>
<th>
PDF
</th>
<th>
Statut
</th>
</thead>
<tbody>
<repeat
group=
"{{ @donations }}"
value=
"{{ @row }}"
>
<tr>
<td>
{{ @row.id }}
</td>
<td
class=
"inline"
>
{{ @row.datec }}
</td>
<td>
{{ @row.somme }}
</td>
<td>
{{ @row.pdf }}
</td>
<td
class=
"inline"
>
{{ @row.status }}
</td>
</tr>
</repeat>
</tbody>
</table>
</section>
<section
id=
"form"
>
<h2>
Fusionner les utilisateurs #{{ @merger.id }} et #{{ @merged.id }}
</h2>
<form
name=
"merge"
method=
"POST"
action=
"{{ 'fusion_user' | alias }}"
>
<input
type=
"hidden"
id=
"csrf"
name=
"csrf"
value=
"{{ @CSRF }}"
/>
<input
type=
"hidden"
id=
"merger_id"
name=
"merger_id"
value=
"{{ @merger.id }}"
/>
<input
type=
"hidden"
id=
"merged_id"
name=
"merged_id"
value=
"{{ @merged.id }}"
/>
<input
type=
"submit"
value=
"Fusionner les utilisateurs"
/>
</form>
</section>
app/view/backend/user.html
View file @
5acaa592
<section
id=
"ajout"
>
<section
id=
"ajout"
>
<check
if=
"{{ @id>0 }}"
>
<check
if=
"{{ @id>0 }}"
>
<true>
<true>
<h2>
Modification d'un utilisateur
</h2>
<h2>
Modification d'un utilisateur
</h2>
</true>
</true>
<false>
<false>
<h2>
Ajout d'un utilisateur
</h2>
<h2>
Ajout d'un utilisateur
</h2>
</false>
</false>
</check>
</check>
<form
name=
"f"
method=
"POST"
action=
"{{ 'modify_user' | alias }}"
>
<form
name=
"f"
method=
"POST"
action=
"{{ 'modify_user' | alias }}"
>
<input
type=
"hidden"
name=
"id"
id=
"id"
value=
"{{ @id }}"
/>
<input
type=
"hidden"
name=
"id"
id=
"id"
value=
"{{ @id }}"
/>
<input
type=
"hidden"
id=
"csrf"
name=
"csrf"
value=
"{{ @CSRF }}"
/>
<input
type=
"hidden"
id=
"csrf"
name=
"csrf"
value=
"{{ @CSRF }}"
/>
<label
for=
"pseudo"
>
Pseudo
</label>
<label
for=
"pseudo"
>
Pseudo
</label>
<input
type=
"text"
id=
"pseudo"
name=
"pseudo"
size=
"30"
value=
"{{ @user.pseudo }}"
/>
<input
type=
"text"
id=
"pseudo"
name=
"pseudo"
size=
"30"
value=
"{{ @user.pseudo }}"
/>
<br
/>
<br
/>
<label
for=
"email"
>
Email
</label>
<label
for=
"email"
>
Email
</label>
<input
type=
"text"
id=
"email"
name=
"email"
size=
"30"
value=
"{{ @user.email }}"
/>
<input
type=
"text"
id=
"email"
name=
"email"
size=
"30"
value=
"{{ @user.email }}"
/>
<br
/>
<br
/>
<label
for=
"commentaire"
>
Commentaire
</label>
<label
for=
"commentaire"
>
Commentaire
</label>
<textarea
type=
"textarea"
id=
"commentaire"
name=
"commentaire"
cols=
"30"
rows=
"2"
>
{{ @user.commentaire }}
</textarea>
<textarea
type=
"textarea"
id=
"commentaire"
name=
"commentaire"
cols=
"30"
rows=
"2"
>
{{ @user.commentaire }}
</textarea>
<br
/>
<br
/>
<check
if=
"{{ @id>0 }}"
>
<check
if=
"{{ @id>0 }}"
>
<true>
<true>
<label
for=
"total"
>
Total de dons cumulés
</label>
<label
for=
"total"
>
Total de dons cumulés
</label>
<input
type=
"text"
id=
"total"
name=
"total"
size=
"30"
value=
"{{ @user.total }}"
/>
<input
type=
"text"
id=
"total"
name=
"total"
size=
"30"
value=
"{{ @user.total }}"
/>
<br
/>
<br
/>
<label
for=
"cumul"
>
Cumul disponible pour les contreparties
</label>
<label
for=
"cumul"
>
Cumul disponible pour les contreparties
</label>
<input
type=
"text"
id=
"cumul"
name=
"cumul"
size=
"30"
value=
"{{ @user.cumul }}"
/>
<input
type=
"text"
id=
"cumul"
name=
"cumul"
size=
"30"
value=
"{{ @user.cumul }}"
/>
<br
/>
<br
/>
<input
type=
"submit"
value=
"Modifier cet utilisateur"
/>
</true>
<false>
<input
type=
"submit"
value=
"Ajouter cet utilisateur"
/>
</false>
</check>
</form>
<br
/>
</section>
<section
id=
"fusion"
>
<h2>
Fusionner cet utilisateur avec un autre
</h2>
<form
name=
"merge_{{@id}}"
method=
"GET"
action=
"{{ 'fusion_user' | alias }}"
>
<input
type=
"hidden"
id=
"csrf"
name=
"csrf"
value=
"{{ @CSRF }}"
/>
<input
type=
"hidden"
name=
"id"
id=
"id"
value=
"{{ @@user.id }}"
/>
<label
for=
"merge_adresse"
>
Adresse mail du compte à fusionner avec celui-ci
</label>
<input
type=
"text"
id=
"merged"
name=
"merged"
size=
"30"
/>
<input
type=
"submit"
value=
"Modifier cet utilisateur"
/>
<input
type=
"submit"
value=
"Prévisualiser les changements avant fusion."
/>
</true>
</form>
<false>
<input
type=
"submit"
value=
"Ajouter cet utilisateur"
/>
</false>
</check>
</form>
<br
/>
</section>
</section>
<section
id=
"adresses"
>
<section
id=
"adresses"
>
<h2>
Adresse postale de cet utilisateur
</h2>
<h2>
Adresse postale de cet utilisateur
</h2>
<check
if=
"@@user.adresse"
>
<check
if=
"@@user.adresse"
>
<form
name=
"addr_{{@id }}"
method=
"POST"
action=
"{{ 'adresse' |alias }}"
>
<form
name=
"addr_{{@id }}"
method=
"POST"
action=
"{{ 'adresse' |alias }}"
>
<input
type=
"hidden"
id=
"csrf"
name=
"csrf"
value=
"{{ @CSRF }}"
/>
<input
type=
"hidden"
id=
"csrf"
name=
"csrf"
value=
"{{ @CSRF }}"
/>
...
@@ -81,7 +93,7 @@
...
@@ -81,7 +93,7 @@
<input
type=
"submit"
value=
"Modifier l'adresse"
/>
<input
type=
"submit"
value=
"Modifier l'adresse"
/>
</form>
</form>
<form
name=
"del_addr_{{@id}}"
method=
"POST"
action=
"{{ 'adresse' | alias }}"
>
<form
name=
"del_addr_{{@id}}"
method=
"POST"
action=
"{{ 'adresse' | alias }}"
>
<input
type=
"hidden"
id=
"csrf"
name=
"csrf"
value=
"{{ @CSRF }}"
/>
<input
type=
"hidden"
id=
"csrf"
name=
"csrf"
value=
"{{ @CSRF }}"
/>
<input
type=
"hidden"
name=
"id"
id=
"id"
value=
"{{ @@user.adresse.id }}"
/>
<input
type=
"hidden"
name=
"id"
id=
"id"
value=
"{{ @@user.adresse.id }}"
/>
<input
type=
"hidden"
name=
"action"
id=
"action"
value=
"delete"
/>
<input
type=
"hidden"
name=
"action"
id=
"action"
value=
"delete"
/>
<input
type=
"submit"
value=
"Effacer l'adresse"
/>
<input
type=
"submit"
value=
"Effacer l'adresse"
/>
...
@@ -89,168 +101,168 @@
...
@@ -89,168 +101,168 @@
</check>
</check>
</section>
</section>
<section
id=
"contreparties"
>
<section
id=
"contreparties"
>
<check
if=
"{{ count(@user.contreparties) > 0}}"
>
<check
if=
"{{ count(@user.contreparties) > 0}}"
>
<true>
<true>
<h2>
Contreparties de cet utilisateur
</h2>
<h2>
Contreparties de cet utilisateur
</h2>
<table
cellspacing=
"0"
cellpadding=
"0"
>
<table
cellspacing=
"0"
cellpadding=
"0"
>
<theader>
<theader>
<th>
Id
</th>
<th>
Id
</th>
<th>
Id du parent
</th>
<th>
Id du parent
</th>
<th>
Date
</th>
<th>
Date
</th>
<th>
Quoi
</th>
<th>
Quoi
</th>
<th>
Taille/Piplome
</th>
<th>
Taille/Piplome
</th>
<th>
Adresse
</th>
<th>
Adresse
</th>
<th>
Statut
</th>
<th>
Statut
</th>
<th>
Actions
</th>
<th>
Actions
</th>
</theader>
</theader>
<tbody>
<tbody>
<repeat
group=
"{{ @user.contreparties }}"
value=
"{{ @row }}"
>
<repeat
group=
"{{ @user.contreparties }}"
value=
"{{ @row }}"
>
<tr>
<tr>
<td>
{{ @row.id }}
</td>
<td>
{{ @row.id }}
</td>
<td>
{{ @row.parent }}
</td>
<td>
{{ @row.parent }}
</td>
<td>
{{ @row.datec }}
</td>
<td>
{{ @row.datec }}
</td>
<td>
{{ @row.quoi }}
</td>
<td>
{{ @row.quoi }}
</td>
<td>
<td>
<check
if=
"{{ @row.quoi=='piplome' }}"
>
<check
if=
"{{ @row.quoi=='piplome' }}"
>
<true>
<true>
<a
href=
"{{ @PIPLOME_URL }}{{ @row.pdf_url }}.pdf"
>
{{ @row.pdf_url }}
</a>
<a
href=
"{{ @PIPLOME_URL }}{{ @row.pdf_url }}.pdf"
>
{{ @row.pdf_url }}
</a>
({{ @row.pdf_nom }})
({{ @row.pdf_nom }})
</true>
</true>
<false>
<false>
<check
if=
"{{ @row.quoi=='pibag' }}"
>
<check
if=
"{{ @row.quoi=='pibag' }}"
>
<true>
<true>
</true>
</true>
<false>
<false>
{{ @TAILLES[@row.taille] }}
{{ @TAILLES[@row.taille] }}
</false>
</false>
</check>
</check>
</false>
</false>
</check>
</check>
</td>
</td>
<td>
<td>
<check
if=
"{{ @row.adresse_id != null }}"
>
<check
if=
"{{ @row.adresse_id != null }}"
>
<true>
<true>
{{ @@user.adresses[@row.adresse_id].nom }}
{{ @@user.adresses[@row.adresse_id].nom }}
</true>
</true>
<false>
<false>
-
-
</false>
</false>
</check>
</check>
</td>
</td>
<td
class=
"inline"
>
{{ @CT_STATUTS[@row.status] }}
</td>
<td
class=
"inline"
>
{{ @CT_STATUTS[@row.status] }}
</td>
<td>
<td>
<a
href=
"{{ 'edit_counterpart', 'id='.@row.id | alias }}"
>
Editer
</a>
<a
href=
"{{ 'edit_counterpart', 'id='.@row.id | alias }}"
>
Editer
</a>
<check
if=
"{{ @row.status!=1 }}"
>
<check
if=
"{{ @row.status!=1 }}"
>
-
-
<span
class=
"lien"
onclick=
"asked({{ @row.id }})"
>
Demandé
</span>
<span
class=
"lien"
onclick=
"asked({{ @row.id }})"
>
Demandé
</span>
</check>
</check>
<check
if=
"{{ @row.status!=2 }}"
>
<check
if=
"{{ @row.status!=2 }}"
>
-
-
<span
class=
"lien"
onclick=
"sent({{ @row.id }})"
>
Envoyé
</span>
<span
class=
"lien"
onclick=
"sent({{ @row.id }})"
>
Envoyé
</span>
</check>
</check>
<check
if=
"{{ @row.status!=3 }}"
>
<check
if=
"{{ @row.status!=3 }}"
>
-
-
<span
class=
"lien"
onclick=
"npai({{ @row.id }})"
>
NPAI
</span>
<span
class=
"lien"
onclick=
"npai({{ @row.id }})"
>
NPAI
</span>
</check>
</check>
<check
if=
"{{ @row.status!=99 }}"
>
<check
if=
"{{ @row.status!=99 }}"
>
-
-
<span
class=
"lien"
onclick=
"canceled({{ @row.id }})"
>
Annulé
</span>
<span
class=
"lien"
onclick=
"canceled({{ @row.id }})"
>
Annulé
</span>
</check>
</check>
<check
if=
"{{ @row.quoi=='piplome' }}"
>
<check
if=
"{{ @row.quoi=='piplome' }}"
>
-
-
<span
class=
"lien"
onclick=
"pdf({{ @row.pdf_id }})"
>
PDF
</span>
<span
class=
"lien"
onclick=
"pdf({{ @row.pdf_id }})"
>
PDF
</span>
</check>
</check>
</td>
</td>
</tr>
</tr>
</repeat>
</repeat>
</tbody>
</tbody>
</table>
</table>
</true>
</true>
<false>
<false>
<h2>
Pas de contreparties associées à cet utilisateur
</h2>
<h2>
Pas de contreparties associées à cet utilisateur
</h2>
</false>
</false>
</check>
</check>
</section>
</section>
<section
id=
"dons"
>
<section
id=
"dons"
>
<check
if=
"{{ count(@user.dons) > 0 }}"
>
<check
if=
"{{ count(@user.dons) > 0 }}"
>
<true>
<true>
<h2>
Dons associés à cet utilisateur
</h2>
<h2>
Dons associés à cet utilisateur
</h2>
</true>
</true>
<table
cellspacing=
"0"
cellpadding=
"0"
>
<table
cellspacing=
"0"
cellpadding=
"0"
>
<theader>
<theader>
<th>
ID
</th>
<th>
ID
</th>
<th>
Date
</th>
<th>
Date
</th>
<th>
Don
</th>
<th>
Don
</th>
<th>
PDF
</th>
<th>
PDF
</th>
<th>
Statut
</th>
<th>
Statut
</th>
<th>
Actions
</th>
<th>
Actions
</th>
</theader>
</theader>
<tbody>
<tbody>
<repeat
group=
"{{ @user.dons }}"
value=
"{{ @row }}"
>
<repeat
group=
"{{ @user.dons }}"
value=
"{{ @row }}"
>
<tr>
<tr>
<td>
{{ @row.id }}
</td>
<td>
{{ @row.id }}
</td>
<td
class=
"inline"
>
{{ @row.datec }}
</td>
<td
class=
"inline"
>
{{ @row.datec }}
</td>
<td>
{{ @row.somme }}
</td>
<td>
{{ @row.somme }}
</td>
<td>
<td>
<check
if=
"{{ @row.pdf == '' }}"
>
<check
if=
"{{ @row.pdf == '' }}"
>
<true>
<a
href=
"/cron/piplome/{{ @row.id }}"
>
PDF
</a>
</true>
<false>
<a
href=
"{{ PIPLOME_URL }}/{{ @row.pdf }}.pdf"
target=
"_blank"
>
PDF
</a>
</false>
</check>
</td>
<td
class=
"inline"
>
{{ @DONS_STATUTS[@row.status] }}
</td>
<td>
<a
href=
"{{ 'edit_support', 'id='.@row.id | alias }}"
>
Editer
</a>
-
<check
if=
"{{ @row.status==0 || @row.status==100 }}"
>
<true>
<true>
<a
href=
"
/cron/piplome/{{ @row.id }}"
>
PDF
</a>
<a
href=
"
{{ 'validate_support', 'id='.@row.id | alias }}"
>
Valider
</a>
</true>
</true>
<false>
<false>
<a
href=
"{{ PIPLOME_URL }}/{{ @row.pdf }}.pdf"
target=
"_blank"
>
PDF
</a>
<a
href=
"{{ 'invalidate_support', 'id='.@row.id | alias }}"
>
Invalider
</a>
-
</false>
</false>
</check>
</check>
</td>
</td>
<td
class=
"inline"
>
{{ @DONS_STATUTS[@row.status] }}
</td>
</tr>
<td>
</repeat>
<a
href=
"{{ 'edit_support', 'id='.@row.id | alias }}"
>
Editer
</a>
</tbody>
-
</table>
<check
if=
"{{ @row.status==0 || @row.status==100 }}"
>
</true>
<true>
<false>
<a
href=
"{{ 'validate_support', 'id='.@row.id | alias }}"
>
Valider
</a>
<h2>
Pas de dons enregistrés pour cet utilisateur
</h2>
</true>
</false>
<false>
</check>
<a
href=
"{{ 'invalidate_support', 'id='.@row.id | alias }}"
>
Invalider
</a>
-
</false>
</check>
</td>
</tr>
</repeat>
</tbody>
</table>
</true>
<false>
<h2>
Pas de dons enregistrés pour cet utilisateur
</h2>
</false>
</check>
</section>
</section>
<script
type=
"text/javascript"
>
<script
type=
"text/javascript"
>
document
.
forms
[
'
f
'
].
nom
.
focus
();
document
.
forms
[
'
f
'
].
nom
.
focus
();
function
select_span
()
{
function
select_span
()
{
if
(
document
.
forms
[
'
f
'
].
quoi
.
value
==
'
piplome
'
)
{
if
(
document
.
forms
[
'
f
'
].
quoi
.
value
==
'
piplome
'
)
{
$
(
'
#quoi_pdf
'
).
show
();
$
(
'
#quoi_pdf
'
).
show
();
$
(
'
#quoi_taille
'
).
hide
();
$
(
'
#quoi_taille
'
).
hide
();
}
else
{
}
else
{
$
(
'
#quoi_pdf
'
).
hide
();
$
(
'
#quoi_pdf
'
).
hide
();
$
(
'
#quoi_taille
'
).
show
();
$
(
'
#quoi_taille
'
).
show
();
}
}
select_taille
();
select_taille
();
}
}
function
select_taille
()
{
function
select_taille
()
{
if
(
document
.
forms
[
'
f
'
].
quoi
.
value
==
'
piplome
'
)
{
if
(
document
.
forms
[
'
f
'
].
quoi
.
value
==
'
piplome
'
)
{
document
.
forms
[
'
f
'
].
taille
.
value
=
document
.
forms
[
'
f
'
].
url
.
value
;
document
.
forms
[
'
f
'
].
taille
.
value
=
document
.
forms
[
'
f
'
].
url
.
value
;
}
else
{
}
else
{
document
.
forms
[
'
f
'
].
taille
.
value
=
document
.
forms
[
'
f
'
].
size
.
value
;
document
.
forms
[
'
f
'
].
taille
.
value
=
document
.
forms
[
'
f
'
].
size
.
value
;
}
}
}
}
window
.
onload
=
function
()
{
window
.
onload
=
function
()
{
select_span
();
select_span
();
select_taille
();
select_taille
();