[hub] remove client hub_settings scripts
- multiline to single line messages to translate
This commit is contained in:
parent
04d051bb73
commit
b20c4e3184
@ -1,35 +1,3 @@
|
||||
frappe.ui.form.on("Hub Settings", {
|
||||
onload_post_render: function(frm) {
|
||||
if(frm.get_field("unregister_from_hub").$input)
|
||||
frm.get_field("unregister_from_hub").$input.addClass("btn-danger");
|
||||
},
|
||||
|
||||
hub_user_email: function(frm) {
|
||||
if(frm.doc.hub_user_email){
|
||||
frm.set_value("hub_user_name", frappe.user.full_name(frm.doc.hub_user_email));
|
||||
}
|
||||
},
|
||||
|
||||
call_register: (frm) => {
|
||||
this.frm.call({
|
||||
doc: this.frm.doc,
|
||||
method: "register",
|
||||
args: {},
|
||||
freeze: true,
|
||||
callback: function(r) {},
|
||||
onerror: function() {
|
||||
frappe.msgprint(__("Wrong Password"));
|
||||
frm.set_value("enabled", 0);
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
unregister_from_hub: (frm) => {
|
||||
frappe.verify_password(() => {
|
||||
var d = frappe.confirm(__('Are you sure you want to unregister?'), () => {
|
||||
frm.call('unregister');
|
||||
}, () => {}, __('Confirm Action'));
|
||||
d.get_primary_btn().addClass("btn-danger");
|
||||
});
|
||||
},
|
||||
onload_post_render: function() {},
|
||||
});
|
||||
|
@ -72,13 +72,11 @@ export default {
|
||||
item_id_fieldname: 'item_code',
|
||||
|
||||
// Constants
|
||||
// TODO: multiline translations don't work
|
||||
page_title: __('Publish Products'),
|
||||
search_placeholder: __('Search Items ...'),
|
||||
empty_state_message: __(`No Items selected yet.
|
||||
Browse and click on products below to publish.`),
|
||||
valid_products_instruction: __(`Only products with an image, description
|
||||
and category can be published. Please update them if an item in your
|
||||
inventory does not appear.`),
|
||||
empty_state_message: __(`No Items selected yet. Browse and click on products below to publish.`),
|
||||
valid_products_instruction: __(`Only products with an image and description can be published. Please update them if an item in your inventory does not appear.`),
|
||||
last_sync_message: (hub.settings.last_sync_datetime)
|
||||
? __(`Last sync was
|
||||
<a href="#marketplace/profile">
|
||||
|
Loading…
Reference in New Issue
Block a user