Skip to content

Commit f1ad14f

Browse files
authored
Merge pull request #5026 from LudiscapeXApi/patch-22
Update justification.php
2 parents 4803e8e + 047c8e2 commit f1ad14f

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

main/auth/justification.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,12 +177,25 @@
177177
}
178178
$actions .= ' '.Display::url(get_lang('Delete'), api_get_self().'?a=delete_justification&justification_id='.$userJustification['id'], ['class' => 'btn btn-danger']);
179179
$table->setCellContents($row, $col++, $actions);
180+
$code = $justification['code'];
181+
$htmlHeadXtra[] = '<script type="text/javascript" >$(function(){$("#file_'.$code.'_file label").css("color","green");});</script>';
180182
$row++;
181183
}
182184

183185
$userJustificationList .= $justificationContent.$table->toHtml();
184186
}
185187

188+
$htmlHeadXtra[] = '<script type="text/javascript" >
189+
$(function(){
190+
$("#justification label").each(function(){
191+
var colorG = $(this).css("color");
192+
var lgtxt = $(this).text().replace(/ /g,"").length;
193+
if (colorG!="green"&&colorG!="rgb(0, 128, 0)"&&lgtxt>3) {
194+
$(this).append("<img src=\"'.api_get_path(WEB_PATH).'main/img/icons/22/warning.png\" />");
195+
}
196+
});
197+
});</script>';
198+
186199
$tabs = SocialManager::getHomeProfileTabs('justification');
187200
$justification = $tabs.$formValidator->returnForm().$userJustificationList;
188201

0 commit comments

Comments
 (0)