$row = this.first().closest('.crm-entity');
ret.entity = $row.data('entity') || $row[0].id.split('-')[0];
ret.id = $row.data('id') || $row[0].id.split('-')[1];
- ret.action = $row.data('action') || 'setvalue';
+ ret.action = $row.data('action') || 'create';
if (!ret.entity || !ret.id) {
return false;
var settings = {
tooltip: $i.data('tooltip') || ts('Click to edit'),
- placeholder: $i.data('placeholder') || '<span class="crm-editable-placeholder">' + ts('Click to edit') + '</span>',
+ placeholder: $i.data('placeholder') || '<i class="crm-i fa-pencil crm-editable-placeholder"></i>',
onblur: 'cancel',
- cancel: '<button type="cancel"><span class="ui-icon ui-icon-closethick"></span></button>',
- submit: '<button type="submit"><span class="ui-icon ui-icon-check"></span></button>',
+ cancel: '<button type="cancel"><i class="crm-i fa-times"></i></button>',
+ submit: '<button type="submit"><i class="crm-i fa-check"></i></button>',
cssclass: 'crm-editable-form',
data: getData,
onreset: restoreContainer
}
var result,
info = $i.crmEditableEntity(),
- hash = info.entity + '.' + info.field,
+ // Strip extra id from multivalued custom fields
+ custom = info.field.match(/(custom_\d+)_\d+/),
+ field = custom ? custom[1] : info.field,
+ hash = info.entity + '.' + field,
params = {
- field: info.field,
+ field: field,
context: 'create'
};
$i.data('optionsHashKey', hash);