mirror of
https://github.com/Combodo/iTop.git
synced 2026-05-20 15:52:24 +02:00
N°803 - Allow display & edition of attributes on n:n relations on Portal
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -1808,16 +1808,31 @@ table .group-actions .item-action-wrapper .panel-body > p:last-child{
|
||||
/**********************************************************/
|
||||
|
||||
/* Hide attributes label in link set edition, will be fixed during attributes refactoring */
|
||||
.form_linkedset_wrapper label {
|
||||
.form_linkedset_wrapper .form_field_label {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.form_linkedset_wrapper .form_field_control {
|
||||
width: 100%!important;
|
||||
}
|
||||
|
||||
/* Add mandatory field column label */
|
||||
.form_linkedset_wrapper .dataTables_scrollHead th.mandatory:after {
|
||||
content: "*";
|
||||
position: relative;
|
||||
left: 3px;
|
||||
color: #EA7D1E;
|
||||
color: $combodo-orange;
|
||||
font-size: 0.9em;
|
||||
}
|
||||
|
||||
/* Add style for invalid input */
|
||||
.form_linkedset_wrapper input:invalid {
|
||||
border-color: $state-danger-border;
|
||||
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
|
||||
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
|
||||
}
|
||||
.form_linkedset_wrapper input:invalid:focus {
|
||||
border-color: darken($state-danger-border, 10);
|
||||
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px lighten($state-danger-border, 10);
|
||||
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px lighten($state-danger-border, 10);
|
||||
}
|
||||
|
||||
@@ -103,6 +103,12 @@ $(function()
|
||||
oEvent.preventDefault();
|
||||
var me = this;
|
||||
|
||||
// Prevent form submit if input in invalid state
|
||||
// @see Bug N°803 - Allow display & edition of attributes on n:n relations on Portal
|
||||
if($('input:invalid', this.element).length > 0){
|
||||
return;
|
||||
}
|
||||
|
||||
// EasterEgg : Vibrate on submit
|
||||
if(window.navigator.vibrate)
|
||||
{
|
||||
|
||||
@@ -1365,7 +1365,7 @@ class ObjectController extends BrickController
|
||||
$oFieldOutput = $oFieldRenderer->Render();
|
||||
$sValue = $oFieldOutput->GetHtml();
|
||||
}
|
||||
$aObjectData['attributes'][$sAttCode] = [
|
||||
$aObjectData['attributes']['lnk__'.$sAttCode] = [
|
||||
'att_code' => $sAttCode,
|
||||
'value' => $sValue,
|
||||
'css_inline' => $oFieldOutput->GetCss(),
|
||||
|
||||
@@ -861,8 +861,8 @@ class ObjectFormManager extends FormManager
|
||||
{
|
||||
$oAttDefToDisplay = MetaModel::GetAttributeDef($oField->GetTargetClass(), $sAttCodeToDisplay);
|
||||
$aAttributesToDisplay[$sAttCodeToDisplay] = [
|
||||
'label' => $oAttDefToDisplay->GetLabel(),
|
||||
'mandatory' => !$oAttDefToDisplay->IsNullAllowed(),
|
||||
'att_code' => $sAttCodeToDisplay,
|
||||
'label' => $oAttDefToDisplay->GetLabel(),
|
||||
];
|
||||
}
|
||||
$oField->SetAttributesToDisplay($aAttributesToDisplay);
|
||||
|
||||
Reference in New Issue
Block a user